本文整理汇总了PHP中get_variable函数的典型用法代码示例。如果您正苦于以下问题:PHP get_variable函数的具体用法?PHP get_variable怎么用?PHP get_variable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_variable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page_contact
function page_contact()
{
// Add departments
global $_CLASS;
$_CLASS['core_user']->user_setup();
$_CLASS['core_user']->add_lang();
$this->error = '';
$this->preview = !empty($_POST['preview']);
if ($this->preview || !empty($_POST['contact'])) {
$this->data['MESSAGE'] = trim(get_variable('message', 'POST', ''));
$this->data['NAME'] = get_variable('sender_name', 'POST', '');
$this->data['EMAIL'] = get_variable('sender_email', 'POST', '');
foreach ($this->data as $field => $value) {
if (!$value) {
$this->error .= $_CLASS['core_user']->lang['ERROR_' . $field] . '<br />';
unset($field, $value, $lang);
} elseif ($field == 'EMAIL' && !check_email($value)) {
$this->error .= $_CLASS['core_user']->lang['BAD_EMAIL'] . '<br />';
}
}
if (!$this->error) {
$this->send_feedback();
}
} else {
$this->data['NAME'] = $_CLASS['core_user']->is_user ? $_CLASS['core_user']->data['username'] : '';
$this->data['EMAIL'] = $_CLASS['core_user']->is_user ? $_CLASS['core_user']->data['user_email'] : '';
$this->data['MESSAGE'] = '';
}
$_CLASS['core_template']->assign_array(array('ERROR' => $this->error, 'MESSAGE' => $this->data['MESSAGE'], 'ACTION' => generate_link($_CLASS['core_display']->page['page_name']), 'SENDER_EMAIL' => $this->data['EMAIL'], 'SENDER_NAME' => $this->data['NAME']));
$_CLASS['core_template']->display('modules/contact/index.html');
}
示例2: add_event
function add_event()
{
global $_CLASS;
$data_array = array('calender_title' => mb_strtolower(htmlentities(get_variable('title', 'POST', ''), ENT_QUOTES, 'UTF-8')), 'calender_text' => strip_tags(get_variable('description', 'POST', false)), 'calender_notes' => strip_tags(get_variable('note', 'POST', false)), 'calender_starts' => get_variable('start', 'POST', false), 'calender_expires' => get_variable('end', 'POST', false));
$error = array();
if (empty($data_array['calender_title'])) {
$error[] = $_CLASS['core_user']->get_lang('NO_TITLE');
}
$start_time = strtotime($data_array['calender_starts']);
if (!$start_time || $start_time === -1) {
$error[] = $_CLASS['core_user']->get_lang('ERROR_START_TIME');
}
$end_time = strtotime($data_array['calender_expires']);
if (!$end_time || $end_time === -1) {
$error[] = $_CLASS['core_user']->get_lang('ERROR_END_TIME');
}
if (empty($error) && $start_time > $end_time) {
$error[] = $_CLASS['core_user']->get_lang('ERROR_');
}
if (!empty($error)) {
return false;
}
//$duration = $start_time - $end_time;
//$start_time = $date = implode(''. explode(':', date('H:i', $start_time)));;
$data_array['calender_starts'] = $_CLASS['core_user']->time_convert($start_time, 'gmt');
$data_array['calender_expires'] = $_CLASS['core_user']->time_convert($end_time, 'gmt');
$_CLASS['core_db']->query('INSERT INTO ' . CALENDER_TABLE . ' ' . $_CLASS['core_db']->sql_build_array('INSERT', $data_array));
$data_array['calender_id'] = $_CLASS['core_db']->insert_id(CALENDER_TABLE, 'calender_id');
return $data_array;
}
示例3: merge
function merge($width, $height)
{
$array_variable = get_variable();
$bg = $array_variable[0];
$over = $array_variable[1];
$outputFile = $array_variable[2];
$result = $array_variable[3];
$path_to_save = $array_variable[4];
$n = $array_variable[5];
$tmp_img = $path_to_save . "/tmp_" . $n . ".png";
// $result_jpg_compressed = $path_to_save.'/'.$n.'.JPG';
// $base_image = imagecreatefrompng($bg);
jpg2png($bg, $outputFile);
$base_image = imagecreatefrompng($outputFile);
$top_image = imagecreatefrompng($over);
// $merged_image = $result;
imagesavealpha($top_image, true);
imagealphablending($top_image, true);
imagecopy($base_image, $top_image, 0, 0, 0, 0, $width, $height);
imagepng($base_image, $result);
// rename to temp for compression
rename($result, $path_to_save . "/tmp_" . $n . ".png");
// compress IMG
$img = imagecreatefrompng($tmp_img);
// imagejpeg($img,$result_jpg_compressed,75);
imagejpeg($img, $result, 75);
unlink($tmp_img);
unlink($tmp_img);
// if necessery !!!!!!!!!!!!!!!!!!!
unlink($outputFile);
unlink($over);
}
示例4: get_userdata
function get_userdata($data)
{
if (isset($_SESSION[get_variable("prfx") . "_" . $data])) {
return $_SESSION[get_variable("prfx") . "_" . $data];
}
return "No user";
}
示例5: switchserver_main
function switchserver_main()
{
global $argc, $argv;
global $gbl, $sgbl, $login, $ghtml;
//sleep(60);
initProgram("admin");
if ($argc === 1) {
print "Usage: {$argv['0']} --class= --name= --v-syncserver= \n";
exit;
}
try {
$opt = parse_opt($argv);
$param = get_variable($opt);
dprintr($param);
$class = $opt['class'];
$name = $opt['name'];
if (lx_core_lock("{$class}-{$name}.switchserver")) {
exit;
}
$object = new $class(null, 'localhost', $name);
$object->get();
if ($object->dbaction === 'add') {
throw new lxException("no_object", '', '');
exit;
}
if (!$object->syncserver) {
print "No_synserver...\n";
throw new lxException("no_syncserver", '', '');
exit;
}
if ($param['syncserver'] === $object->syncserver) {
print "No Change...\n";
throw new lxException("no_change", '', '');
exit;
}
$driverapp_old = $gbl->getSyncClass('localhost', $object->syncserver, $object->get__table());
$driverapp_new = $gbl->getSyncClass('localhost', $param['syncserver'], $object->get__table());
if ($driverapp_new !== $driverapp_old) {
//throw new lxException ("the_drivers_are_different_in_two_servers", '', '');
}
$object->doupdateSwitchserver($param);
} catch (exception $e) {
print $e->getMessage();
/// hcak ahck... Chnage only the olddelete variable which is the mutex used for locking in the process of switch. The problem is we want to totally bail out if the switchserver fails. The corect way would be save after reverting the syncserve to the old value, but that's a bit risky. So we just use a hack to change only the olddeleteflag; Not a real hack.. This is the better way.
$message = "{$e->getMessage()}";
write_to_object($object, $message, $param['syncserver']);
$fullmesage = "Switch of {$object->get__table()}:{$object->nname} to {$object->syncserver} failed due to {$e->getMessage()}";
log_switch($fullmesage);
mail($login->contactemail, "Switch Failed:", "{$fullmesage}\n");
print "\n";
exit;
}
mail($login->contactemail, "Switch Succeeded", "Switch Succeeded {$object->get__table()}:{$object->nname} to {$param['syncserver']}\n");
}
示例6: do_print
function do_print($row_in)
{
global $today, $today_ref, $line_ctr, $units_str, $severities;
if (empty($today)) {
$today_ref = date("z", $row_in['problemstart']);
$today = substr(format_date($row_in['problemstart']), 0, 5);
} else {
if (!($today_ref == date("z", $row_in['problemstart']))) {
// date change?
$today_ref = date("z", $row_in['problemstart']);
$today = substr(format_date($row_in['problemstart']), 0, 5);
}
}
$def_city = get_variable('def_city');
$def_st = get_variable('def_st');
print "<TR CLASS= ''>\n";
print "<TD>{$today}</TD>\n";
// Date -
$problemstart = format_date($row_in['problemstart']);
$problemstart_sh = short_ts($problemstart);
print "<TD onMouseover=\"Tip('{$problemstart}');\" onmouseout='UnTip();'>{$problemstart_sh}</TD>\n";
// start
$problemend = format_date($row_in['problemend']);
$problemend_sh = short_ts($problemend);
print "<TD onMouseover=\"Tip('{$problemend}');\" onmouseout='UnTip();'>{$problemend_sh}</TD>\n";
// end
$elapsed = my_date_diff($row_in['problemstart'], $row_in['problemend']);
print "<TD>{$elapsed}</TD>\n";
// Ending time
print "<TD ALIGN='center'>{$severities[$row_in['severity']]}</TD>\n";
$scope = $row_in['tick_scope'];
$scope_sh = shorten($row_in['tick_scope'], 20);
print "<TD onMouseover=\"Tip('{$scope}');\" onmouseout='UnTip();'>{$scope_sh}</TD>\n";
// Call type
$comment = $row_in['comments'];
$short_comment = shorten($row_in['comments'], 50);
print "<TD onMouseover=\"Tip('{$comment}');\" onMouseout='UnTip();'>{$short_comment}</TD>\n";
// Comments/Disposition
$facility = $row_in['facy_name'];
$facility_sh = shorten($row_in['facy_name'], 16);
print "<TD onMouseover=\"Tip('{$facility}');\" onmouseout='UnTip();'>{$facility_sh}</TD>\n";
// Facility
$city = $row_in['tick_city'] == $def_city ? "" : ", {$row_in['tick_city']}";
$st = $row_in['tick_state'] == $def_st ? "" : ", {$row_in['tick_state']}";
$addr = "{$row_in['tick_street']}{$city}{$st}";
$addr_sh = shorten($row_in['tick_street'] . $city . $st, 20);
print "<TD onMouseover=\"Tip('{$addr}');\" onMouseout='UnTip();'>{$addr_sh}</TD>\n";
// Street addr
print "<TD>{$units_str}</TD>\n";
// Units responding
print "</TR>\n\n";
$line_ctr++;
}
示例7: admin_save
function admin_save($data)
{
global $_CLASS, $_CORE_CONFIG;
foreach ($data as $section => $option) {
foreach ($option as $db_name => $data_op) {
$value = get_variable($data_op['post_name'], 'POST', false);
if ($value != $_CORE_CONFIG[$section][$db_name]) {
set_core_config($section, $db_name, $value, false);
}
}
}
$_CLASS['core_cache']->destroy('core_config');
}
示例8: get_current_test
function get_current_test()
{
// 3/16/09, 7/25/09
$delay = 1;
// minimum time in minutes between queries - 7/25/09
$when = get_variable('_aprs_time');
// misnomer acknowledged
if (time() < $when) {
return;
} else {
$next = time() + $delay * 60;
$query = "UPDATE `{$GLOBALS['mysql_prefix']}settings` SET `value`='{$next}' WHERE `name`='_aprs_time'";
$result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
}
$aprs = $instam = $locatea = $gtrack = $glat = FALSE;
// 3/22/09
$query = "SELECT `id`, `aprs`, `instam`, `locatea`, `gtrack`, `glat` FROM `{$GLOBALS['mysql_prefix']}responder`WHERE ((`aprs` = 1) OR (`instam` = 1) OR (`locatea` = 1) OR (`gtrack` = 1) OR (`glat` = 1))";
$result = mysql_query($query) or do_error($query, ' mysql error=', mysql_error(), basename(__FILE__), __LINE__);
while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
if ($row['aprs'] == 1) {
$aprs = TRUE;
}
if ($row['instam'] == 1) {
$instam = TRUE;
}
if ($row['locatea'] == 1) {
$locatea = TRUE;
}
//7/29/09
if ($row['gtrack'] == 1) {
$gtrack = TRUE;
}
//7/29/09
if ($row['glat'] == 1) {
$glat = TRUE;
}
//7/29/09
}
// end while ()
unset($result);
if ($glat) {
$glat_func = do_glat_test();
}
print $glat_func;
$result_code = "Get Current Successful";
return $result_code;
}
示例9: get_butts
function get_butts($ticket_id, $unit_id)
{
global $patient;
$win_height = get_variable('map_height') + 120;
$win_width = get_variable('map_width') + 10;
if ($_SESSION['internet']) {
print "<INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Map' onClick = \"var popWindow = window.open('map_popup.php?id={$ticket_id}', 'PopWindow', 'resizable=1, scrollbars, height={$win_height}, width={$win_width}, left=250,top=50,screenX=250,screenY=50'); popWindow.focus();\" />\n";
// 7/3/10
}
if (can_edit()) {
// 5/23/11
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'New' onClick = \"var newWindow = window.open('add.php?mode=1', 'addWindow', 'resizable=1, scrollbars, height=640, width=800, left=100,top=100,screenX=100,screenY=100'); newWindow.focus();\" />\n";
// 8/9/10
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Edit' onClick = \"var newWindow = window.open('edit_nm.php?mode=1&id={$ticket_id}', 'editWindow', 'resizable=1, scrollbars, height=600, width=600, left=100,top=100,screenX=100,screenY=100'); newWindow.focus();\" />\n";
// 2/1/10
if (!is_closed($ticket_id)) {
// 10/5/09
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Close' onClick = \"var mailWindow = window.open('close_in.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=480, width=700, left=100,top=100,screenX=100,screenY=100'); mailWindow.focus();\" />\n";
// 8/20/09
}
}
// end if ($can_edit())
if (is_administrator() || is_super() || is_unit()) {
if (!is_closed($ticket_id)) {
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Action' onClick = \"var actWindow = window.open('action_w.php?mode=1&ticket_id={$ticket_id}', 'ActWindow', 'resizable=1, scrollbars, height=480, width=900, left=250,top=50,screenX=250,screenY=50'); ActWindow.focus();\" />\n";
// 7/3/10
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = '{$patient}' onClick = \"var patWindow = window.open('patient_w.php?mode=1&ticket_id={$ticket_id}', 'patWindow', 'resizable=1, scrollbars, height=480,width=720, left=250,top=50,screenX=250,screenY=50'); patWindow.focus();\" />\n";
// 7/3/10
}
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Notify' onClick = \"var notWindow = window.open('config.php?mode=1&func=notify&id={$ticket_id}', 'NotWindow', 'resizable=1, scrollbars, height=400, width=600, left=250,top=50,screenX=250,screenY=50'); notWindow.focus();\" />\n";
// 7/3/10
}
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Note' onClick = \"var noteWindow = window.open('add_note.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=240, width=600, left=100,top=100,screenX=100,screenY=100'); noteWindow.focus();\" />\n";
// 10/8/08
// print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Print' onClick='main.php?print=true&id=$ticket_id;'>\n ";
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'E-mail' onClick = \"var mailWindow = window.open('mail.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=600, width=600, left=100,top=100,screenX=100,screenY=100'); mailWindow.focus();\" />\n";
// 2/1/10
print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Dispatch' onClick = \"var dispWindow = window.open('routes_nm.php?frm_mode=1&ticket_id={$ticket_id}', 'dispWindow', 'resizable=1, scrollbars, height=480, width=" . round(0.8 * $_SESSION['scr_width']) . ", left=100,top=100,screenX=100,screenY=100'); dispWindow.focus();\" />\n";
// 2/1/10
}
示例10: add_event
function add_event()
{
global $_CLASS;
$data_array = array('title' => get_variable('title', 'POST', false), 'description' => get_variable('description', 'POST', false), 'note' => get_variable('note', 'POST', false), 'start_time' => get_variable('start', 'POST', false), 'end_time' => get_variable('end', 'POST', false), 'recur' => false);
$error = '';
if (($start_time = strtotime($data_array['start_time'])) === -1) {
$error .= $_CLASS['core_user']->get_lang('ERROR_START_TIME') . '<br />';
}
if (($end_time = strtotime($data_array['end_time'])) === -1) {
$error .= $_CLASS['core_user']->get_lang('ERROR_END_TIME') . '<br />';
}
if (!$error && $start_time > $end_time) {
$error .= $_CLASS['core_user']->get_lang('ERROR_') . '<br />';
}
if (!$error) {
//$duration = $start_time - $end_time;
//$start_time = $date = implode(''. explode(':', date('H:i', $start_time)));;
$data_array['start_time'] = $data_array['start_date'] = $start_time;
$data_array['end_time'] = $data_array['end_date'] = $end_time;
$_CLASS['core_db']->sql_query('INSERT INTO cms_calender ' . $_CLASS['core_db']->sql_build_array('INSERT', $data_array));
}
}
示例11: do_login
function do_login($login_options, $template)
{
global $_CLASS, $_CORE_CONFIG;
$user_name = !empty($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : getenv('PHP_AUTH_USER');
$user_password = !empty($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : getenv('PHP_AUTH_PW');
//list($user_name, $user_password) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
$error = '';
$login_array = array('redirect' => false, 'explain' => false, 'success' => '', 'admin_login' => false, 'full_login' => true, 'full_screen' => false);
if (is_array($login_options)) {
$login_array = array_merge($login_array, $login_options);
}
if ($user_name || $user_password) {
if (!$user_name || !$user_password) {
$error = 'INCOMPLETE_LOGIN_INFO';
}
if (!$error) {
$result = $this->user_auth($user_name, $user_password);
if (is_numeric($result)) {
$_CLASS['core_user']->login($result, $login_array['admin_login'], false);
$login_array['redirect'] = generate_link(get_variable('redirect', 'POST', $login_array['redirect']), array('admin' => $data['admin_login']));
$_CLASS['core_display']->meta_refresh(5, $login_array['redirect']);
$message = ($login_array['success'] ? $_CLASS['core_user']->get_lang($login_array['success']) : $_CLASS['core_user']->lang['LOGIN_REDIRECT']) . '<br /><br />' . sprintf($_CLASS['core_user']->lang['RETURN_PAGE'], '<a href="' . $login_array['redirect'] . '">', '</a> ');
trigger_error($message);
}
$error = is_string($result) ? $result : 'LOGIN_ERROR';
}
}
if (!$login_array['redirect']) {
$login_array['redirect'] = htmlspecialchars($_CLASS['core_user']->url);
}
// better realm needed, logout support needed
// Random realm for spoofers ?
header('WWW-Authenticate: Basic realm="Site Login"');
header('HTTP/1.0 401 Unauthorized');
//echo $error
}
示例12: strtolower
// -------------------------------------------------------------
if (!defined('VIPERAL') || VIPERAL != 'Admin') {
die;
}
// Some often used variables
$safe_mode = @ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on' ? true : false;
$file_uploads = @ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on' ? true : false;
$data = array('block_title' => 'Forum Administration', 'block_position' => BLOCK_LEFT, 'block_file' => 'block-Admin_Forums.php');
$_CLASS['core_blocks']->add_block($data);
load_class($site_file_root . 'includes/forums/auth.php', 'auth');
require_once $site_file_root . 'includes/forums/functions.php';
require_once $site_file_root . 'includes/forums/functions_admin.php';
$_CLASS['core_user']->add_lang('admin', 'Forums');
//$_CLASS['core_user']->add_img(false, 'Forums');
$_CLASS['auth']->acl($_CLASS['core_user']->data);
$file = get_variable('file', 'REQUEST', 'main');
if (file_exists($site_file_root . 'includes/forums/admin/' . $file . '.php')) {
require $site_file_root . 'includes/forums/admin/' . $file . '.php';
} else {
require $site_file_root . 'includes/forums/admin/main.php';
}
// -----------------------------
// Functions
function adm_page_header($sub_title, $meta = '', $table_html = true)
{
global $config, $db, $_CLASS;
$_CLASS['core_display']->display_header();
echo $_CLASS['core_display']->theme->table_open;
if ($table_html) {
?>
<a name="top"></a>
示例13: start
function start()
{
global $_CLASS, $_CORE_CONFIG, $SID, $mod;
$session_id = get_variable($_CORE_CONFIG['server']['cookie_name'] . '_sid', 'COOKIE');
$session_id_url = get_variable('sid', 'GET');
if ($session_id_url && (!$session_id || $session_id !== $session_id_url)) {
$session_id = $session_id_url;
} elseif (!defined('NEED_SID')) {
$this->need_sid = false;
}
if ($session_id) {
$sql = 'SELECT u.*, s.*
FROM ' . CORE_SESSIONS_TABLE . ' s, ' . CORE_USERS_TABLE . " u\n\t\t\t\tWHERE s.session_id = '" . $_CLASS['core_db']->escape($session_id) . "'\n\t\t\t\t\tAND u.user_id = s.session_user_id";
$result = $_CLASS['core_db']->query($sql);
$this->data = $_CLASS['core_db']->fetch_row_assoc($result);
$_CLASS['core_db']->free_result($result);
if (isset($this->data['user_id']) && ($this->data['user_id'] == ANONYMOUS || $this->data['user_status'] == STATUS_ACTIVE)) {
$valid = true;
if ($this->data['session_browser'] !== $this->browser) {
$valid = false;
}
if ($valid && $_CORE_CONFIG['server']['ip_check']) {
$check_ip = implode('.', explode('.', $this->data['session_ip'], $_CORE_CONFIG['server']['ip_check']));
if ($check_ip !== substr($this->ip, 0, strlen($check_ip))) {
$valid = false;
}
}
if ($valid) {
// Set session update a minute or so after last update or if page changes
if ($this->time - $this->data['session_time'] > 60 || $this->data['session_url'] !== $this->url) {
$this->save_session = true;
}
$this->data['session_data'] = $this->data['session_data'] ? unserialize($this->data['session_data']) : array();
$this->data['user_data'] = $this->data['user_data'] ? unserialize($this->data['user_data']) : array();
load_class(false, 'core_auth', 'auth_db');
$this->is_user = $this->data['user_type'] == USER_NORMAL;
$this->is_bot = $this->data['user_type'] == USER_BOT;
$this->is_admin = $this->data['session_admin'] == ADMIN_IS_ADMIN;
check_maintance_status();
if ($this->is_bot) {
$this->need_sid = false;
}
$this->autologin_code = $this->data['session_autologin'];
$this->load = check_load_status();
$this->sid_link = 'sid=' . $this->data['session_id'];
return true;
}
}
$this->data = array();
}
$user_id = ANONYMOUS;
$ali = get_variable($_CORE_CONFIG['server']['cookie_name'] . '_ali', 'COOKIE', false, 'int');
$alc = get_variable($_CORE_CONFIG['server']['cookie_name'] . '_alc', 'COOKIE');
if ($ali && $alc) {
if ($id = $this->autologin_retrieve($ali, $alc)) {
$user_id = $id;
}
}
check_maintance_status();
$this->load = check_load_status();
return $this->login($user_id);
}
示例14: str_replace
if (substr($path, -1) != '/') {
$path .= '/';
}
$path = str_replace('install/', '', $path);
$domain = empty($_SERVER['SERVER_NAME']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$_CLASS['core_template']->assign_array(array('site_name' => 'New CMS Site', 'site_domain' => $domain, 'site_path' => $path, 'site_port' => $_SERVER['SERVER_PORT'] == 80 ? '' : $_SERVER['SERVER_PORT'], 'cookie_domain' => $domain, 'cookie_path' => $path, 'cookie_name' => 'cms', 'username' => '', 'password' => '', 'password_confirm' => '', 'email' => '', 'email_confirm' => '', 'error' => empty($error) ? false : implode('<br/>', $error), 'config_content' => $config_data));
$_CLASS['core_template']->display('installer/stage3.html');
script_close();
}
}
}
if ($stage === 2) {
if (isset($_POST['test']) && empty($error)) {
$error[] = 'Database Setting Perfect :-)';
}
$_CLASS['core_template']->assign_array(array('database_options' => $database_options, 'error' => empty($error) ? false : implode('<br/>', $error), 'server' => isset($site_db['server']) ? $site_db['server'] : 'localhost', 'port' => isset($site_db['port']) ? $site_db['port'] : '', 'database' => isset($site_db['database']) ? $site_db['database'] : '', 'username' => isset($site_db['username']) ? $site_db['username'] : '', 'password' => isset($site_db['password']) ? $site_db['password'] : '', 'file' => isset($site_db['file']) ? $site_db['file'] : '', 'table_prefix' => get_variable('table_prefix', 'POST', 'cms_'), 'user_prefix' => get_variable('user_prefix', 'POST', 'cms_')));
$_CLASS['core_template']->display('installer/stage2.html');
script_close();
}
if ($stage === 1) {
$gd_info = gd_info();
$continue = true;
if (!($compatible = version_compare(PHP_VERSION, '4.2.0', '>='))) {
$continue = false;
}
$_CLASS['core_template']->assign_array(array('error' => false, 'magic_quotes_gpc' => (bool) ini_get('magic_quotes_gpc') === false, 'output_buffering' => (int) ini_get('output_buffering') === 0, 'register_globals' => (bool) ini_get('register_globals') === false, 'safe_mode' => (bool) ini_get('safe_mode') === false, 'php_version' => PHP_VERSION, 'workable_Version' => $compatible, 'recommended_Version' => version_compare(PHP_VERSION, '4.3.0', '>='), 'mbstring' => extension_loaded('mbstring'), 'zlib' => extension_loaded('zlib'), 'gd' => extension_loaded('gd'), 'gd_version' => $gd_info['GD Version'], 'continue' => $continue));
$_CLASS['core_template']->display('installer/stage1.html');
script_close();
}
if (!$stage) {
$_CLASS['core_template']->display('installer/agreement.html');
示例15: get_header
and open the template in the editor.
-->
<?php
include_once 'function.php';
get_header();
if (isset($_GET["logout"])) {
logout();
}
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php
out(get_variable("sitename"));
?>
</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="style/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="style/ihover.css">
<link rel="stylesheet" href="style/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="style/style.css">
<script src="js/jquery.min.js"></script>
<script src="js/jquery-ui/jquery-ui.js"></script>
<script src="style/bootstrap/js/bootstrap.min.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="image/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="image/apple-icon-60x60.png">