error_reporting(E_ALL);
ob_start("ob_gzhandler");
session_start();
if (isset($_GET['Menu'])) {
$Menu=$_GET['Menu'];
if($Menu=='Logout') {
$Menu='Login';
session_destroy();
session_start();
}
} else {
$Menu='';
}
if (isset($_GET['Action']) and isset($_SESSION['eMail'])) {
require_once("dll/config.php");
try {
global $db;
$dsn = globale_DB_Configuration::$DB_TYPE . ':dbname=' . globale_DB_Configuration::$DB_DATABASE . ';host=' . globale_DB_Configuration::$DB_HOST . ';port=' . globale_DB_Configuration::$DB_PORT;
$db = new PDO($dsn, globale_DB_Configuration::$DB_USER, globale_DB_Configuration::$DB_PASSWORD, array(PDO::MYSQL_ATTR_INIT_COMMAND => '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
|
|
|
|
Wir suchen
- Grundstücke mit oder ohne Altbestand für Einzelhäuser, Villen, Doppelhäuser oder Mehrfamilienhäuser
- Desweiteren suchen wir denkmalgeschützte Altbauten, bevorzugt mit Leerstand, renovierungsbedürftig.
Ihre Angebote werden selbstverständlich vertraulich behandelt.
Unter Kontakt können Sie uns Ihre Anfrage übermitteln.
|
switch ($Menu) {
default:
include("html/start.html");
break;
case 'Über_uns':
include("html/über_uns.html");
break;
case 'AktuelleProjekte':
include("html/akutelle_projekte.html");
break;
case 'Referenzen':
include("html/referenzen.html");
break;
case 'Kontakt':
include("html/kontakt.html");
break;
case 'Impressum':
include("html/impressum.html");
break;
case 'Login':
include("html/login.html");
break;
case 'Objektdatenbank':
include("html/objektdatenbank.html");
break;
}
?>
|
|
|
AQUIRON Consulting GmbH
Feldkirchner Strasse 12 a
D-85551 Kirchheim
|
|
|