startSession(); if( !$noHtml ) { $this->showLayoutTop(); } $this->showContent(); if( !$noHtml ) { $this->showLayoutBottom(); } } protected function getDbMySQL() { if( $this->dbMySQL == NULL ) { $this->dbMySQL = new MySQL(MYSQL_URI, MYSQL_USER, MYSQL_PWD, MYSQL_DB, $this); } return $this->dbMySQL; } protected abstract function showContent(); protected function echoln($t, $noNewline = false) { if( DEBUG ) { echo $t; if( !$noNewline ) { echo "\n"; } }else { echo rtrim(ltrim($t), "\n\r\0\x0B"); } } protected function formatDate($date) { if( $date == "0000-00-00 00:00:00" || $date == "0000-00-00" ) { return ""; }elseif( strlen($date)==10 ) { return date("d.m.Y", strtotime($date)); }elseif( strlen($date)==16 ) { return date("d.m.Y H:i", strtotime($date)); }elseif( strlen($date)==19 ) { return date("d.m.Y H:i:s", strtotime($date)); }else { return $date; } } public function debug($message) { if( DEBUG ) { echo "
" . htmlspecialchars($message) . "
"; } } protected function debugArray($array) { if( DEBUG ) { $src = array(); $repl = array(); $src[] = "/\'sess_pwd\' => .*\n/"; $repl[] = "'sess_pwd' => ********\n"; $src[] = "/\'sess_mysqlpwd\' => .*\n/"; $repl[] = "'sess_mysqlpwd' => ********\n"; echo "
" . preg_replace($src, $repl, var_export($array, true)) . "
"; } } private function startSession() { session_name("AEGEE_Photo"); session_set_cookie_params(0, dirname($_SERVER['REQUEST_URI'] . "x"), $_SERVER['HTTP_HOST'], true); session_start(); } private function showLayoutTop() { header("Content-Type: text/html; charset=UTF-8"); $this->echoln(""); $this->echoln(""); $this->echoln(" "); $this->echoln(" "); $this->echoln(" AEGEE photos"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
"); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln(" "); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln("
"); $this->echoln("
Photos
"); $this->echoln("
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
"); $this->echoln("
"); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" \"\""); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln(" \"\""); $this->echoln(" "); $this->echoln(" \"\""); $this->echoln("  
"); $this->echoln("
\"\"
"); $this->echoln("
"); $this->echoln("

"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
\"\"\"\"\"\"\"\"
\"\"\"\"\"\"\"\"
"); $this->echoln("
"); $this->echoln(" Home"); $this->echoln("
"); $this->echoln("
\"\"
\"\"\"\"
\"\"\"\"
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
\"\"\"\"\"\"\"\"
\"\"\"\"\"\"\"\"
"); $this->echoln("
"); $this->echoln(" Events by date"); $this->echoln("
"); $this->echoln("
\"\"
\"\"\"\"
\"\"\"\"
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
\"\"\"\"\"\"\"\"
\"\"\"\"\"\"\"\"
"); $this->echoln("
"); $this->echoln(" Events by title"); $this->echoln("
"); $this->echoln("
\"\"
\"\"\"\"
\"\"\"\"
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
\"\"\"\"\"\"\"\"
\"\"\"\"\"\"\"\"
"); $this->echoln("
"); $this->echoln(" About"); $this->echoln("
"); $this->echoln("
\"\"
\"\"\"\"
\"\"\"\"
"); $this->echoln("

"); $this->echoln("
"); $this->echoln("
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
"); $this->echoln("
"); $this->echoln(" aegee.org account"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
\"\" Your user name
"); $this->echoln(" Anonymous"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln("
"); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln(" "); $this->echoln("
"); } private function showLayoutBottom() { $this->echoln("
"); $this->echoln("
\"\"\"\"
"); $this->echoln(" "); $this->echoln(""); } } ?>