substr( dirname( __FILE__ ), 0, strlen( dirname( __FILE__ ) ) - 3 ), 'site_url' => "http://agenda.naturpark.lu/", 'admin_email' => 'aquarius@pt.lu', 'admin_name' => 'Pierre Obertin', 'site_title' => 'agenda.naturpark.lu', 'version_de' => TRUE, 'version_fr' => TRUE, 'version_en' => TRUE, 'version_nl' => TRUE ); $langs = array( "de", "fr", "en", "nl" ); foreach( $langs as $cur_lang ) { if( $GLOBALS['common']['version_'.$cur_lang] ) { $GLOBALS['lang_versions'][] = $cur_lang; }; }; $GLOBALS['default_lang'] = 'de'; $GLOBALS['event_cat_colors'] = array( 1 => 'D0D1D3', 2 => '19171C', 3 => 'E30073', 4 => '5D7E8D', 5 => 'FFDD00' ); $GLOBALS['out_versions'] = array( "web", "print", "text" ); $GLOBALS['notify_recipients'] = array( "aquarius@pt.lu" ); // default includes for all pages // $GLOBALS[
][] = array( , ... ) // $GLOBALS['left']['first'] = array( "menu.php", "newsletter_form.php" ); // $GLOBALS['right']['first'] = array( "submenu.php" ); // $GLOBALS['right']['last'] = array( "logos.php" ); // images ******************************************************** $GLOBALS['images'] = array ( 'dir' => $GLOBALS['common']['site_root'] . "cms/images/", 'url' => $GLOBALS['common']['site_url'] . "cms/images/", 'dim_tn' => 70, // dimension of different image types 'dim_small' => 100, 'dim_big' => 200, 'dim_gallery' => 359, 'dim_event' => 100, 'keep_original' => true // keep the file of the original photo ); // files ********************************************************* $GLOBALS['files'] = array ( 'dir' => $GLOBALS['common']['site_root'] . "cms/files/", 'url' => "", 'tn_dir' => $GLOBALS['common']['site_root'] . "cms/files/tn/", 'tn_url' => "" ); // mySQL settings ************************************************ $GLOBALS['mysql'] = array ( 'host' => getenv('DB_HOST') ? getenv('DB_HOST') : 'localhost', 'user' => getenv('DB_USER') ? getenv('DB_USER') : 'agenda', 'pwd' => getenv('DB_PASS') ? getenv('DB_PASS') : '', 'db' => getenv('DB_NAME') ? getenv('DB_NAME') : 'agenda' ); $GLOBALS['reg_exp_email'] = "[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,6}"; $GLOBALS['reg_exp_url'] = "https?://"; // http:// $GLOBALS['reg_exp_url'] .= "(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?"; // username:password@ $GLOBALS['reg_exp_url'] .= "(([0-9]{1,3}\.){3}[0-9]{1,3}"; // IP- 199.194.52.184 $GLOBALS['reg_exp_url'] .= "|"; // allows either IP or domain $GLOBALS['reg_exp_url'] .= "([0-9a-z_!~*'()-]+\.)*"; // tertiary domain(s)- www. $GLOBALS['reg_exp_url'] .= "([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\."; // second level domain $GLOBALS['reg_exp_url'] .= "[a-z]{2,6})"; // first level domain- .com or .museum $GLOBALS['reg_exp_url'] .= "(:[0-9]{1,4})?"; // port number- :80 $GLOBALS['reg_exp_url'] .= "((/?)|"; // a slash isn't required if there is no file name $GLOBALS['reg_exp_url'] .= "(/[0-9a-z_!~*'().;?:@&=+$,%#-]+[0-9a-z_!~*'();?:@&=+$,%#-]+)+/?)"; // "." cannot be the last sign $GLOBALS['the_months'] = array( "JANVIER", "F�VRIER", "MARS", "AVRIL", "MAI", "JUIN", "JUILLET", "AO�T", "SEPTEMBRE", "OCTOBRE", "NOVEMBRE", "D�CEMBRE" ); ?> Bitte loggen Sie sich erneut ein.'; $GLOBALS['req']['content_type'] = 'loginform'; }; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'login' ) { if( !isset( $_REQUEST['user'] ) ) { $logged_in = FALSE; $login_form_info = 'Bitte loggen Sie sich ein.'; $GLOBALS['req']['content_type'] = 'loginform'; } else { if ( $mysql_conn && mysql_select_db( $GLOBALS['mysql']['db'] ) ) { $sql = "SELECT `user_id`, `user_type`, `user_name_1`, `user_name_2`, `user_lang` FROM `users` WHERE `user_login` = '" . mysql_real_escape_string( $_REQUEST['user'] ) . "'"; $sql .= " AND `user_pwd` = '" . md5( mysql_escape_string( $_REQUEST['pwd'] ) ) . "'"; $result = mysql_query( $sql ); if ( $result ) { if ( mysql_num_rows( $result ) > 0 ) { // login was successful, set the $_SESSION vars session_name( 'sid' ); session_start(); $row = mysql_fetch_array( $result ); $_SESSION['user_id'] = $row['user_id']; $_SESSION['user_type'] = $row['user_type']; $_SESSION['user_lang'] = $row['user_lang']; $_SESSION['user_name'] = $row['user_name_1'] . " " . $row['user_name_2']; header( "Location: index.php?sid=" . session_id() ); exit; } else { // login failed, show the login form again $logged_in = FALSE; $login_form_info = 'Benutzer oder Passwort sind ungltig.
Bitte korrigieren Sie Ihre Eingabe'; $GLOBALS['req']['content_type'] = 'loginform'; }; } else { if( $GLOBALS['debug'] ) { print( mysql_error() ); }; $logged_in = FALSE; $login_form_info = 'DB error'; $GLOBALS['req']['content_type'] = 'loginform'; }; mysql_close(); } else { // login failed, show the login form again $logged_in = FALSE; $login_form_info = 'no connection to DB'; $GLOBALS['req']['content_type'] = 'loginform'; }; }; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'presslogin' ) { if( !isset( $_REQUEST['user'] ) ) { $logged_in = FALSE; $login_form_info = 'Bitte loggen Sie sich ein.'; $GLOBALS['req']['content_type'] = 'presslogin'; } else { if ( $mysql_conn && mysql_select_db( $GLOBALS['mysql']['db'] ) ) { $sql = "SELECT `user_id`, `user_type`, `user_name_1`, `user_name_2`, `user_lang` FROM `users` WHERE `user_login` = '" . mysql_real_escape_string( $_REQUEST['user'] ) . "'"; $sql .= " AND `user_pwd` = '" . md5( mysql_real_escape_string( $_REQUEST['pwd'] ) ) . "' AND `user_type` = 'press'"; $result = mysql_query( $sql ); if ( $result ) { if ( mysql_num_rows( $result ) > 0 ) { // login was successful, set the $_SESSION vars session_name( 'sid' ); session_start(); $row = mysql_fetch_array( $result ); $_SESSION['user_id'] = $row['user_id']; $_SESSION['user_type'] = $row['user_type']; $_SESSION['user_lang'] = $row['user_lang']; $_SESSION['user_name'] = $row['user_name_1'] . " " . $row['user_name_2']; header( "Location: index.php?do=press;sid=" . session_id() ); exit; } else { // login failed, show the login form again $logged_in = FALSE; $login_form_info = 'Benutzer oder Passwort sind ungltig.
Bitte korrigieren Sie Ihre Eingabe'; $GLOBALS['req']['content_type'] = 'presslogin'; }; } else { if( $GLOBALS['debug'] ) { print( mysql_error() ); }; $logged_in = FALSE; $login_form_info = 'DB error'; $GLOBALS['req']['content_type'] = 'presslogin'; }; mysql_close(); } else { // login failed, show the login form again $logged_in = FALSE; $login_form_info = 'no connection to DB'; $GLOBALS['req']['content_type'] = 'presslogin'; }; }; }; if ( strpos( $GLOBALS['req']['user_type'], 'admin' ) !== false ) { $GLOBALS['admin_mode'] = true; // app ************************************************************** if( isset( $_REQUEST['app_pri'] ) && $_REQUEST['app_pri'] != '' ) { $GLOBALS['req']['app'] = $_REQUEST['app_pri']; } else { if( isset( $_REQUEST['app'] ) && $_REQUEST['app'] != '' ) { $GLOBALS['req']['app'] = $_REQUEST['app']; } else { $GLOBALS['req']['app'] = 'events'; }; }; // app 2 ************************************************************ if( isset( $_REQUEST['app2_pri'] ) && $_REQUEST['app2_pri'] != '' ) { $GLOBALS['req']['app2'] = $_REQUEST['app2_pri']; } else { if( isset( $_REQUEST['app2'] ) && $_REQUEST['app2'] != '' ) { $GLOBALS['req']['app2'] = $_REQUEST['app2']; } else { $GLOBALS['req']['app2'] = ''; }; }; // app3 ************************************************************* if( isset( $_REQUEST['app3_pri'] ) && $_REQUEST['app3_pri'] != '' ) { $GLOBALS['req']['app3'] = $_REQUEST['app3_pri']; } else { if( isset( $_REQUEST['app3'] ) && $_REQUEST['app3'] != '' ) { $GLOBALS['req']['app3'] = $_REQUEST['app3']; } else { $GLOBALS['req']['app3'] = ''; }; }; if( isset( $_REQUEST['last_app'] ) && $GLOBALS['req']['app'] != $_REQUEST['last_app'] ) { $GLOBALS['req']['app2'] = ''; $GLOBALS['req']['app3'] = ''; // print( "app change" ); }; // action *********************************************************** if( isset( $GLOBALS['req']['app2'] ) && $GLOBALS['req']['app2'] != '' ) { $GLOBALS['req']['action'] = $GLOBALS['req']['app2']; } else { if ( isset( $GLOBALS['req']['app3'] ) && $GLOBALS['req']['app3'] != '' ) { $GLOBALS['req']['action'] = $GLOBALS['req']['app3']; } else { $GLOBALS['req']['action'] = ''; }; }; // edit id ********************************************************** $GLOBALS['req']['edit_id'] = isset( $_REQUEST['edit_id'] ) ? $_REQUEST['edit_id'] : ''; // lang ************************************************************* if( strpos( $GLOBALS['req']['action'], "langversion" ) ) { $GLOBALS['req']['lang'] = substr( $GLOBALS['req']['action'], strlen( $GLOBALS['req']['action'] ) - 2 ); }; }; if ( $GLOBALS['req']['user_type'] == 'press' ) { $GLOBALS['req']['content_type'] = 'press'; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'download' ) { $GLOBALS['req']['content_type'] = 'download'; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'geo' ) { $GLOBALS['req']['content_type'] = 'geo'; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'map' ) { $GLOBALS['req']['content_type'] = 'map'; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'gallery' ) { $GLOBALS['req']['content_type'] = 'gallery'; }; if( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'logoff' ) { $GLOBALS['req']['content_type'] = 'logoff'; }; /* print( "
" ); print_r( $_REQUEST ); print( "
" ); print( "
" ); print_r( $GLOBALS['req'] ); print( "
" ); */ ?>