'SET NAMES \'UTF8\'')); // Create a new PDO Object } catch (PDOException $err) { //Datenbankverbindung nicht erfolgreich $xml_output=new SimpleXMLElement($xml); $response=$xml_output->addChild("response"); $response->addChild("error", "Database connection could not be established"); $response->addChild("information","Please contact ". Configuration::$eMail_address_Support); if (Configuration::$betarelease==true) { $response->addChild("information",$err); } header("Content-Type: text/xml"); echo($xml_output->asXML()); exit; } $customer=$db->prepare("SELECT id FROM customers WHERE UPPER(eMail)=:eMail"); $customer->bindValue('eMail', strtoupper($_SESSION['eMail'])); $customer->execute(); if ($customer->rowCount()>0) { $customer=$customer->fetchObject(); $customer_id=$customer->id; $objects_id=$db->prepare("SELECT * FROM filemanager_files WHERE id=:id"); $objects_id->bindValue('id', $_GET['file']); $objects_id->execute(); $objects_id=$objects_id->fetchObject(); $relation=$db->prepare("SELECT * FROM customers_relations WHERE customers_id=:customers_id AND relation_type=:relation_type AND relation_id=:relation_id"); $relation->bindValue('customers_id', $customer_id); $relation->bindValue('relation_type', 'Objekte'); $relation->bindValue('relation_id', $objects_id->objects_id); $relation->execute(); if($relation->rowCount()>0) { //Download file //!!!!!!!!!!!!!!!!!!!!!!SERVER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $dir="../../Objekt-Plattform/ADMIN/api/filemanager/tmp/" . $objects_id->objects_id . "/"; //SERVER!!!! //$dir="../Objekt-Plattform/ADMIN/api/filemanager/tmp/" . $objects_id->objects_id . "/"; $file=$_GET['file'].".file"; if ($_REQUEST['Action']=='get_thumb') { // load image and get image size $img=imagecreatefromjpeg($dir.$file); $width=imagesx( $img ); $height=imagesy( $img ); $thumbWidth=200; // calculate thumbnail size $new_width=$thumbWidth; $new_height=floor( $height * ( $thumbWidth / $width ) ); // create a new temporary image $tmp_img = imagecreatetruecolor( $new_width, $new_height ); // copy and resize old image into new image imagecopyresized( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); header('Content-Type: image/jpeg'); imagejpeg( $tmp_img, NULL, 90); } else { header('Content-Description: File Transfer'); header('Content-Type: '.mime_content_type($dir.$file)); header('Content-Disposition: attachment; filename="'.$objects_id->filename.'"'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: '.filesize($dir.$file)); readfile($dir.$file); } } } exit; } //$basehref="http://srvsbs2003-1:70/webseiten/641/aquiron.de/"; //$basehref="http://641.svb-net.de/"; $basehref="http://www.aquiron.de/"; //$basehref="http://192.168.0.2:70/webseiten/641/aquiron.de/"; ?> AQUIRON Unternehmensgruppe
  
AQUIRON
 Consulting GmbH Geschäftsbereich Immobilien
Logo AQUIRON Consulting GmbH
AQUIRON Consulting GmbH
Feldkirchner Strasse 12 a
D-85551 Kirchheim