define('USER_NAME', 'Anonymous'); define('USER_GROUP', $USER_DATA['group_name']); define('USER_GROUP_SET', '(' . $USER_DATA['group_id'] . ')'); define('USER_IS_ADMIN', 0); define('USER_CAN_SEND_ECARDS', (int)$USER_DATA['can_send_ecards']); define('USER_CAN_RATE_PICTURES', (int)$USER_DATA['can_rate_pictures']); define('USER_CAN_POST_COMMENTS', (int)$USER_DATA['can_post_comments']); define('USER_CAN_UPLOAD_PICTURES', (int)$USER_DATA['can_upload_pictures']); define('USER_CAN_CREATE_ALBUMS', 0); define('USER_UPLOAD_FORM', (int)$USER_DATA['upload_form_config']); define('CUSTOMIZE_UPLOAD_FORM', (int)$USER_DATA['custom_user_upload']); define('NUM_FILE_BOXES', (int)$USER_DATA['num_file_upload']); define('NUM_URI_BOXES', (int)$USER_DATA['num_URI_upload']); mysql_free_result($results); } } // Test if admin mode $USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0; define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']); define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE); // Set error logging level if ($CONFIG['debug_notice']==1 && ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE ))) { error_reporting (E_ALL); } else { error_reporting (E_ALL ^ E_NOTICE); } // Process theme selection if present in URI or in user profile if (!empty($HTTP_GET_VARS['theme'])) { $USER['theme'] = $HTTP_GET_VARS['theme']; } // Load theme file if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) { $CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________'); } else { unset($USER['theme']); } if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic'; require "themes/{$CONFIG['theme']}/theme.php"; $THEME_DIR = "themes/{$CONFIG['theme']}/"; // Process language selection if present in URI or in user profile or try // autodetection if default charset is utf-8 if (!empty($HTTP_GET_VARS['lang'])) { $USER['lang'] = $HTTP_GET_VARS['lang']; } if (isset($USER['lang']) && !strstr($USER['lang'], '/') && file_exists('lang/' . $USER['lang'] . '.php')) { $CONFIG['default_lang'] = $CONFIG['lang']; // Save default language $CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>|`', '____________'); } elseif ($CONFIG['charset'] == 'utf-8') { include('include/select_lang.inc.php'); if (file_exists('lang/' . $USER['lang'] . '.php')) { $CONFIG['default_lang'] = $CONFIG['lang']; // Save default language $CONFIG['lang'] = $USER['lang']; } } else { unset($USER['lang']); } if (!file_exists("lang/{$CONFIG['lang']}.php")) $CONFIG['lang'] = 'english'; require "lang/{$CONFIG['lang']}.php"; // See if the fav cookie is set else set it if (isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_fav'])) { $FAVPICS = @unserialize(@base64_decode($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_fav'])); foreach ($FAVPICS as $key => $id ){ $FAVPICS[$key] = (int)$id; //protect against sql injection attacks } } else { $FAVPICS = array(); } // load the main template load_template(); // Remove expired bans $now = date('Y-m-d H:i:s'); db_query("DELETE FROM {$CONFIG['TABLE_BANNED']} WHERE expiry < '$now'"); // Check if the user is banned $user_id = USER_ID; $result = db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id=$user_id"); if (mysql_num_rows($result)) { pageheader($lang_error); msg_box($lang_info, $lang_errors['banned']); pagefooter(); exit; } mysql_free_result($result); // Retrieve the "private" album set if (!GALLERY_ADMIN_MODE && $CONFIG['allow_private_albums']) get_private_album_set(); if (!USER_IS_ADMIN && $CONFIG['offline'] && !strstr($_SERVER["SCRIPT_NAME"],'login')) { pageheader($lang_errors['offline_title']); msg_box($lang_errors['offline_title'], $lang_errors['offline_text']); pagefooter(); exit; } ?>
![]() |
|
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
![]() |
|
![]() |
||||||||||||||||
![]() |