false ) ); $conn = NULL; } catch( PDOException $pdoe ) { die( "Exception: " . $pdoe -> getCode() . "\n" ); } catch( Exception $e ) { die( "Exception: " . $e -> getCode() . "\n" ); } ?> true //persistent connection ); //tablenames $cfg['db_tables'] = array(); $cfg['db_tables']['configuration'] = "configuration"; $cfg['db_tables']['exception'] = "exception"; $cfg['db_tables']['images'] = "images"; $cfg['db_tables']['css'] = "css"; $cfg['db_tables']['text'] = "text"; /* Paths [end dir with a forward slash!] --------------------------------------------------------------------------------------------------------------*/ $cfg['path'] = array(); //base $cfg['path']['base'] = "/websites/awarox/awaroxweb/"; //attention!: requires automatic determination! //homepage $cfg['path']['homepage'] = "pages/home/"; //dirs $cfg['path']['js_dir'] = "javascript/"; $cfg['path']['image_dir'] = "images/"; $cfg['path']['css_dir'] = "css/"; $cfg['path']['module_dir'] = "modules/"; /* Modules --------------------------------------------------------------------------------------------------------------*/ $cfg['module']['include_file'] = "include.php"; $cfg['module']['action_file'] = "action.php"; $cfg['module']['install_file'] = "install.php"; $cfg['module']['uninstall_file'] = "uninstall.php"; $cfg['module']['check_file'] = "check.php"; ?> output() ); /* HTTP Headers --------------------------------------------------------------------------------------------------------------*/ header( "Content-Type: text/css" ); header( "Pragma: no-cache" ); /* Close --------------------------------------------------------------------------------------------------------------*/ require_once( 'close.inc.php' ); ?> makePathSafe(); $file = (string) $file; //make sizes secure //attention!: requires class for secure input if( !is_numeric( $newheight ) || !is_numeric( $newwidth ) ) { throw new AwaroxException( "One of the specified REQUEST width / height is not an Integer.", 6401, $db ); } //file to path $file= $cfg['path']['image_dir'] . $file; //file exists + is image if( !file_exists( $file ) ) { throw new AwaroxException( "Requested image does not exist.", 6501, $db ); } if( !is_file( $file ) ) { throw new AwaroxException( "Image is not a regular file, though does exist.", 6502, $db ); } $size = getimagesize( $file ); if( $size === "false" ) { throw new AwaroxException( "Requested image does not seem an image.", 6503, $db ); } //image properties $oldheight = $size[1]; $oldwidth = $size[0]; $mime = $size["mime"]; //useless to increase the size by the server, we only want to decrease it if( $newheight > $oldheight || $newwidth > $oldwidth ) { header( "Location: " . $cfg['path']['base'] . $file ); } //get old image switch( $mime ) { case "image/png": $oldimg = imagecreatefrompng( $file ); break; case "image/jpeg": $oldimg = imagecreatefromjpeg( $file ); break; case "image/gif": $olding = imagecreatefromgif( $file ); break; default: header( "Location: " . $cfg['path']['base'] . $file ); die(); } //create new image $newimg = imagecreatetruecolor( $newwidth, $newheight ); //resize image imagecopyresampled( $newimg, $oldimg, 0, 0, 0, 0, $newwidth, $newheight, $oldwidth, $oldheight ) or die( "Troubles..." ); //sent header header( "Content-Type: " . $mime ); //sent image switch( $mime ) { case "image/png": imagepng( $newimg ); break; case "image/jpeg": imagejpeg( $newimg ); break; case "image/gif": imagegif( $newimg ); break; default: } } catch( AwaroxException $awe ) { echo $awe; } require_once( 'close.inc.php' ); ?> setPage( $_REQUEST['p'] ); /* Page //attention: needs a mod_error( "Inactive"... --------------------------------------------------------------------------------------------------------------*/ //int page $page = $_REQUEST['p']; //page set? if( !isset( $page ) ) { header( "Location: " . $cfg['path']['base'].$cfg['path']['homepage'] ); } //get config $stmt = $db -> prepare( "select ConfigName from page where PagePath = :page" ); $stmt -> bindParam( ":page", $page ); $stmt -> execute(); foreach( $stmt -> fetchAll() as $modcfg ) { $configname = $modcfg["ConfigName"]; } $stmt = $db -> prepare( "select ModuleConfigModuleName from moduleconfig where ModuleConfigName = :configname" ); $stmt -> bindParam( ":configname", $configname ); $stmt -> execute(); $ispage = false; foreach( $stmt -> fetchAll() as $modcfg ) { $ispage = true; $pagemodule = $modcfg["ModuleConfigModuleName"]; } if( !$ispage ) { echo( "
We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text.
We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text.
" ) ), 2 => array( 0 => array( "id" => "Homepage20", "class" => "text", "corners" => false, "content" => "We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text.
We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text. We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text.
We, Awarox, are proudly announcing the start of our company. This is a dummy-text. We deliver Internet Security services, Penetration Testings and Webapplication-development. Please feel free to browse our website to learn more about our products and services. Have a very special and nice day, the Awarox Security Team. This is a dummy-text.
" ), 1 => array( "id" => "Homepage21", "class" => "head", "corners" => false, "content" => "