public function register() { $userLogin = new userLogin(); $userLogin->userId = $this->_user->id; $userLogin->login = $this->_login; $userLogin->save(); }
public static function registerUser() { $sql = sql::factory(); $sql->setTable('community_user'); $sql->getPosts(['username' => 'string', 'password' => 'string', 'email' => 'string']); $validator = new validator(); $email = $sql->getPost('email'); $username = $sql->getPost('username'); $password = $sql->getPost('password'); $validUsername = $validator->costum($username, function () { preg_match('/\\w{4,}/', $username, $match); return $match[0] == $username; }); if (!$validUsername) { return 'Username darf nur aus Buchstaben Zahlen und Unterstrich bestehen und muss mindestens 4 Zeichen lang sein.'; } if ($sql->num('SELECT id FROM ' . sql::table('community_user') . ' WHERE `username`= "' . $sql->escape($username) . '"')) { return 'Benutzername schon vorhanden'; } if (!$validator->email($email)) { return 'Bitte geben Sie eine E-Mail Adresse an'; } $salt = userLogin::generateSalt(); $sql->addDatePost('registerdate', 'now'); $sql->addPost('salt', $salt); extension::get('COMMUNITY_USER_REGISTER', $sql); $password = userLogin::hash($password, $salt); $sql->addPost('password', $password); $sql->save(); //Mail send return true; }
public static function checkLogin() { $username = type::post('username', 'string', ''); $password = type::post('password', 'string', ''); if ($username == '' || $password == '') { echo message::info(lang::get('login_form_notfull'), true); return; } $sql = sql::factory(); $sql->query('SELECT password, salt, id FROM ' . sql::table('community_user') . ' WHERE `username` = "' . $sql->escape($username) . '"'); if (!$sql->num()) { echo message::danger(sprintf(lang::get('login_no_user'), $email), true); return; } $sql->result(); if (!userLogin::checkPassword($password, $sql->get('salt'), $sql->get('password'))) { echo message::danger(lang::get('login_pwd_false'), true); return; } $_SESSION['community-login'] = $sql->get('id'); self::checkSession(); // Für spätere Foren-Bridges extension::get('COMMUNITY_USER_LOGIN', $password); }
<?php /** * Í˳ö * * @version $Id: exit.php 1 19:09 2010Äê7ÔÂ12ÈÕZ tianya $ * @package DedeCMS.Administrator * @copyright Copyright (c) 2007 - 2010, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ require_once dirname(__FILE__) . '/../include/common.inc.php'; require_once DEDEINC . '/userlogin.class.php'; $cuserLogin = new userLogin(); $cuserLogin->exitUser(); if (empty($needclose)) { header('location:index.php'); } else { $msg = "<script language='javascript'>\r\n if(document.all) window.opener=true;\r\n window.close();\r\n </script>"; echo $msg; }
<?php //该页仅用于检测用户登录的情况,如要手工更改系统配置,请更改config_base.php require_once(dirname(__FILE__)."/../config_base.php"); require_once(dirname(__FILE__)."/../inc_userlogin.php"); //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 $dedeNowurl = ""; $s_scriptName=""; $dedeNowurl = GetCurUrl(); $dedeNowurls = explode("?",$dedeNowurl); $s_scriptName = $dedeNowurls[0]; //检验用户登录状态 $cuserLogin = new userLogin(); if($cuserLogin->getUserID()==-1) { if($cuserLogin->adminDir=='') exit('Request Error!'); $gurl = "../../{$cuserLogin->adminDir}/login.php?gotopage=".urlencode($dedeNowurl); echo "<script language='javascript'>location='$gurl';</script>"; exit(); } ?>
/** * 获取当前用户的ftp站点 * * @access public * @param string $current 当前站点 * @param string $formname 表单名称 * @return string */ function GetFtp($current = '', $formname = '') { global $dsql; $formname = empty($formname) ? 'serviterm' : $formname; $cuserLogin = new userLogin(); $row = $dsql->GetOne("SELECT servinfo FROM `#@__multiserv_config`"); $row['servinfo'] = trim($row['servinfo']); if (!empty($row['servinfo'])) { $servinfos = explode("\n", $row['servinfo']); $select = ""; echo '<select name="' . $formname . '" size="1" id="serviterm">'; $i = 0; foreach ($servinfos as $servinfo) { $servinfo = trim($servinfo); list($servname, $servurl, $servport, $servuser, $servpwd, $userlist) = explode('|', $servinfo); $servname = trim($servname); $servurl = trim($servurl); $servport = trim($servport); $servuser = trim($servuser); $servpwd = trim($servpwd); $userlist = trim($userlist); $checked = $current == $i ? ' selected="selected"' : ''; if (strstr($userlist, $cuserLogin->getUserName())) { $select .= "<option value='" . $servurl . "," . $servuser . "," . $servpwd . "'{$checked}>" . $servname . "</option>"; } $i++; } echo $select . "</select>"; } }
<?php require_once __DIR__ . '/functions.php'; require_once __DIR__ . '/user.class.php'; if (isset($_SESSION['logged_in_user_id'])) { header("Location: /index.php"); } $userCreate = new userCreate($connection); $userLogin = new userLogin($connection); $pw_error = ""; $username_error = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["username"])) { $username_error = "Name is required"; } else { $username = test_input($_POST["username"]); } } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["password"])) { $pw_error = "Password is required"; } else { $password = test_input($_POST["password"]); $password = hash(sha512, $password); } } if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($pw_error == "" and $username_error == "") { $response = $userCreate->createUser($username, $password); } }
include_once dirname(__FILE__) . '/../include/sbyou.net.pinyin.php'; include_once dirname(__FILE__) . '/../include/userlogin.class.php'; include_once dirname(__FILE__) . '/data.txt.php'; $wei = 'www.669977.net'; echo ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>火车头采集组件-697中文网-697原创源码独家开发</title> <link rel="stylesheet" type="text/css" href="css/common.css" /> </head> <body> '; //检验用户登录状态 $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() == -1) { if ($name != '') { $res = $cuserLogin->checkUser($name, $pwd); if ($res == 1) { $cuserLogin->keepUser(); } } if ($cuserLogin->getUserID() == -1) { header("location:" . $BOOK_URL . $www_669977_net_ADMIN . "/login.php?gotopage=" . $BOOK_URL . "/697_LocoySpider/"); exit; } } //内容主体 if (!$entry) { $www_669977_Net = $sbyou_Net_Words;
public static function logout() { unset($_SESSION['login']); self::$isLogin = false; setcookie("remember", "", time() - 3600); echo message::info(lang::get('logged_out'), true); }
if ($dopost == 'showad') { //include('templets/login_ad.htm'); exit; } //检测后台目录是否更名 $cururl = GetCurUrl(); if (preg_match('/dede\\/login/i', $cururl)) { $redmsg = '<div class=\'safe-tips\'>您的管理目录的名称中包含默认名称dede,建议在FTP里把它修改为其它名称,那样会更安全!</div>'; } else { $redmsg = ''; } //登录检测 $admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); $admindir = $admindirs[count($admindirs) - 1]; if ($dopost == 'login') { $cuserLogin = new userLogin($admindir); if (!empty($userid) && !empty($pwd)) { $res = $cuserLogin->checkUser($userid, $pwd); //success if ($res == 1) { $cuserLogin->keepUser(); if (!empty($gotopage)) { ShowMsg('成功登录,正在转向管理管理主页!', $gotopage); exit; } else { ShowMsg('成功登录,正在转向管理管理主页!', "index.php"); exit; } } else { if ($res == -1) { ResetVdValue();
autoload::addDir(dir::classes('utils')); new dyn(); if (dyn::get('setup') == true) { header('Location: install/'); exit; } if (isset($DYN['backend'])) { dyn::add('backend', $DYN['backend']); } else { dyn::add('backend', true); } unset($DYN); include dir::functions('html_stuff.php'); include dir::functions('url_stuff.php'); lang::setDefault(); lang::setLang(dyn::get('lang')); $DB = dyn::get('DB'); sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']); ob_start(); date_default_timezone_set(dyn::get('timezone', 'Europe/Berlin')); new userLogin(); dyn::add('user', new user(userLogin::getUser())); cache::setCache(dyn::get('cache')); addonConfig::loadAllConfig(); addonConfig::includeAllLangFiles(); addonConfig::includeAllLibs(); if (dyn::get('backend')) { include dir::backend('backend.php'); } else { include dir::backend('frontend.php'); }
public static function newInstall() { $sql = new sql(); $sql->query('DROP TABLE `' . sql::table('module') . '`'); $sql->query('CREATE TABLE `' . sql::table("module") . '` ( `id` int(16) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `input` text NOT NULL, `output` text NOT NULL, `sort` int(16) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); $sql->query('DROP TABLE `' . sql::table('structure') . '`'); $sql->query('CREATE TABLE `' . sql::table("structure") . '` ( `id` int(16) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `template` varchar(255) NOT NULL, `sort` int(16) unsigned NOT NULL, `parent_id` int(16) unsigned NOT NULL, `online` int(1) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); $sql->query('DROP TABLE `' . sql::table('user') . '`'); $sql->query('CREATE TABLE `' . sql::table("user") . '` ( `id` int(11) unsigned NOT NULL auto_increment, `firstname` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `perms` varchar(255) NOT NULL, `admin` int(1) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); $sql->setTable('user'); $sql->addPost('firstname', type::post('firstname')); $sql->addPost('name', type::post('name')); $sql->addPost('email', type::post('email')); $sql->addPost('password', userLogin::hash(type::post('password'))); $sql->addPost('admin', 1); $sql->save(); $sql->query('DROP TABLE `' . sql::table('structure_area') . '`'); $sql->query('CREATE TABLE `' . sql::table("structure_area") . '` ( `id` int(16) unsigned NOT NULL auto_increment, `structure_id`int(16) unsigned NOT NULL, `sort` int(16) unsigned NOT NULL, `modul` int(16) unsigned NOT NULL, `online` int(1) unsigned NOT NULL, `value1` text NOT NULL, `value2` text NOT NULL, `value3` text NOT NULL, `value4` text NOT NULL, `value5` text NOT NULL, `value6` text NOT NULL, `value7` text NOT NULL, `value8` text NOT NULL, `value9` text NOT NULL, `value10` text NOT NULL, `value11` text NOT NULL, `value12` text NOT NULL, `value13` text NOT NULL, `value14` text NOT NULL, `value15` text NOT NULL, `link1` int(11) NOT NULL, `link2` int(11) NOT NULL, `link3` int(11) NOT NULL, `link4` int(11) NOT NULL, `link5` int(11) NOT NULL, `link6` int(11) NOT NULL, `link7` int(11) NOT NULL, `link8` int(11) NOT NULL, `link9` int(11) NOT NULL, `link10` int(11) NOT NULL, `linklist1` varchar(255) NOT NULL, `linklist2` varchar(255) NOT NULL, `linklist3` varchar(255) NOT NULL, `linklist4` varchar(255) NOT NULL, `linklist5` varchar(255) NOT NULL, `linklist6` varchar(255) NOT NULL, `linklist7` varchar(255) NOT NULL, `linklist8` varchar(255) NOT NULL, `linklist9` varchar(255) NOT NULL, `linklist10` varchar(255) NOT NULL, `php1` text NOT NULL, `php2` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); $sql->query('DROP TABLE `' . sql::table('addons') . '`'); $sql->query('CREATE TABLE `' . sql::table("addons") . '` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `active` int(1) NOT NULL, `install` int(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); $sql->query('DROP TABLE `' . sql::table('slots') . '`'); $sql->query('CREATE TABLE `' . sql::table("slots") . '` ( `id` int(11) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `description` varchar(255) NOT NULL, `template` varchar(255) NOT NULL, `modul` int(11) unsigned NOT NULL, `is-structure`int(1) unsigned NOT NULL DEFAULT "1", `structure` varchar(255) NOT NULL, `value1` text NOT NULL, `value2` text NOT NULL, `value3` text NOT NULL, `value4` text NOT NULL, `value5` text NOT NULL, `value6` text NOT NULL, `value7` text NOT NULL, `value8` text NOT NULL, `value9` text NOT NULL, `value10` text NOT NULL, `value11` text NOT NULL, `value12` text NOT NULL, `value13` text NOT NULL, `value14` text NOT NULL, `value15` text NOT NULL, `link1` int(11) NOT NULL, `link2` int(11) NOT NULL, `link3` int(11) NOT NULL, `link4` int(11) NOT NULL, `link5` int(11) NOT NULL, `link6` int(11) NOT NULL, `link7` int(11) NOT NULL, `link8` int(11) NOT NULL, `link9` int(11) NOT NULL, `link10` int(11) NOT NULL, `linklist1` varchar(255) NOT NULL, `linklist2` varchar(255) NOT NULL, `linklist3` varchar(255) NOT NULL, `linklist4` varchar(255) NOT NULL, `linklist5` varchar(255) NOT NULL, `linklist6` varchar(255) NOT NULL, `linklist7` varchar(255) NOT NULL, `linklist8` varchar(255) NOT NULL, `linklist9` varchar(255) NOT NULL, `linklist10` varchar(255) NOT NULL, `php1` text NOT NULL, `php2` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); }
define('DEDEADMIN',dirname(__FILE__)); require_once(DEDEADMIN."/../include/config_base.php"); require_once(DEDEADMIN."/../include/inc_userlogin.php"); require_once(DEDEADMIN."/inc/inc_admin_pub.php"); header("Cache-Control:private"); //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 $dedeNowurl = ""; $s_scriptName=""; $dedeNowurl = GetCurUrl(); $dedeNowurls = explode("?",$dedeNowurl); $s_scriptName = $dedeNowurls[0]; //检验用户登录状态 $cuserLogin = new userLogin(); if($cuserLogin->getUserID()==-1) { header("location:login.php?gotopage=".urlencode($dedeNowurl)); exit(); } if($cfg_dede_log=='Y') { $s_nologfile = "_main|_list|index"; $s_needlogfile = "sys_|file_"; isset($_SERVER['REQUEST_METHOD']) ? $s_method=$_SERVER['REQUEST_METHOD'] : $s_method=""; isset($dedeNowurls[1]) ? $s_query = $dedeNowurls[1] : $s_query = ""; $s_scriptNames = explode('/',$s_scriptName); $s_scriptNames = $s_scriptNames[count($s_scriptNames)-1]; $s_userip = GetIP();
if ($form->get('admin') == 1) { $field->addAttribute('style', 'display:none;'); } $field->setMultiple(true); $field->setId('pageadmin-content'); $field->setSize(8); foreach (userPerm::getAll() as $name => $value) { $field->add($name, $value); } } if ($action == 'edit') { $form->addHiddenField('id', $id); } if ($form->isSubmit()) { if ($form->get('password') != $form->sql->getValue('password')) { $form->addPost('password', userLogin::hash($form->get('password'))); } } ?> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> <?php if ($action == 'edit') { ?> <h3 class="panel-title pull-left">"<?php echo $form->get('firstname') . " " . $form->get('name'); ?> " <?php echo lang::get('edit');
* * @version 2011/2/11 沙羡 $ * @package DedeCMS.Libraries * @copyright Copyright (c) 2007 - 2011, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com * **/ $page_start_time = microtime(TRUE); require_once dirname(__FILE__) . '/../include/common.inc.php'; require_once DEDEINC . '/userlogin.class.php'; require_once DEDEINC . '/request.class.php'; $dsql->safeCheck = false; $dsql->SetLongLink(); //检验用户登录状态 $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() == -1) { ShowMsg("需要是管理员登陆才能够访问", 'index.php'); exit; } define('DEDEASK', dirname(__FILE__)); if ($cfg_dede_log == 'Y') { $s_nologfile = '_main|_list'; $s_needlogfile = 'sys_|file_'; $s_method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ''; $s_query = isset($dedeNowurls[1]) ? $dedeNowurls[1] : ''; $s_scriptNames = explode('/', $s_scriptName); $s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; $s_userip = GetIP(); if ($s_method == 'POST' || !preg_match($s_nologfile, $s_scriptNames) && $s_query != '' || preg_match($s_needlogfile, $s_scriptNames)) { $inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime)\r\n VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');";
<?php require_once dirname(__FILE__) . "/../../include/common.inc.php"; require_once DEDEINC . "/dedetemplate.class.php"; require_once DEDEINC . "/datalistcp.class.php"; require_once DEDEINC . "/request.class.php"; require_once DEDEINC . '/userlogin.class.php'; define(SEOINC, DEDEROOT . "/xapp/include"); define(SEOTEMPLETS, DEDEROOT . "/xapp/templets"); define(SEOCONTROL, DEDEROOT . "/xapp/control"); define(SEOMODEL, DEDEROOT . "/xapp/moudle"); define(SEODATA, DEDEROOT . "/xapp/data"); //检验用户登录状态 $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() == -1 && $m == 'admin') { ShowMsg("您无权登录此页面", '/'); exit; } //引入控制器基类 require_once SEOINC . "/base.class.php"; $base = new Base(); function RunSeoApp($m, $c, $a) { $m = request("m", "index"); $c = request("c", "index"); $a = request("a", "index"); $appfile = SEOCONTROL . '/' . $m . '/action_' . $c . '.php'; if (file_exists($appfile)) { require_once $appfile; } else { die("CONTROL NOT EXISTS");
<?php include_once('cores/class.login.php'); $userLogin = new userLogin(true); $task = $_REQUEST['task']; switch ($task) { case 'login': $username = $_REQUEST['username']; $pwd = $_REQUEST['pwd']; $result = $userLogin->doLogin($username,$pwd); echo $result; break; case 'logout': unset($_SESSION["userid"]); unset($_SESSION["user_name"]); $result['success']=true; echo json_encode($result); break; case 'loadUser': echo $userLogin->loadUser(); break; case 'saveUser': echo $userLogin->saveUser($_REQUEST); break; } ?>
echo message::success($success); } layout::addNav(lang::get('dashboard'), 'dashboard', 'home', ['refresh'], true); layout::addNav(lang::get('settings'), 'settings', 'settings', [], false); layout::addNav(lang::get('server'), 'server', 'list', ['add'], true); layout::addNav(lang::get('addons'), 'addons', 'alt', [], true); layout::addNav(lang::get('user'), 'user', 'users', ['add'], true); foreach (addonConfig::includeAllConfig() as $file) { include $file; } if (userLogin::isLogged()) { $path = 'pages/' . $page . '.php'; $path = extension::get('PAGE_PATH', $path); if (file_exists($path)) { include $path; } else { echo message::danger(lang::get('page_not_found'), false); } } $content = ob_get_contents(); ob_end_clean(); rp::add('content', $content); if (ajax::is()) { echo ajax::getReturn(); die; } if (userLogin::isLogged()) { include dir::layout('index.php', rp::get('layout')); } else { include dir::layout('login.php', rp::get('layout')); }
public static function logout() { unset($_SESSION['login']); self::$isLogin = false; echo message::info(lang::get('login_logout_success'), true); }
$field->setMultiple(true); $field->setId('pageadmin-content'); $field->setSize(8); foreach (userPerm::getAll() as $name => $value) { $field->add($name, $value); } } if ($action == 'edit') { $form->addHiddenField('id', $id); $title = '"' . $form->get('firstname') . ' ' . $form->get('name') . '" ' . lang::get('edit'); } else { $title = lang::get('add'); } if ($form->isSubmit()) { if ($form->get('password') != $form->sql->getValue('password')) { $form->addPost('password', userLogin::hash($form->get('password'), $form->sql->getValue('salt'))); } } $button = '<a href="' . url::backend('user', ['subpage' => 'overview']) . '" class="btn btn-sm btn-default">' . lang::get('back') . '</a>'; ?> <div class="row"><?php echo bootstrap::panel($title, [$button], $form->show()); ?> </div> <?php } if ($action == '') { $table = table::factory(); $table->addCollsLayout('*, 250,110'); $table->addRow()->addCell("Name")->addCell(lang::get('email'))->addCell(lang::get('action')); $table->addSection('tbody');
</form> <?php } else { if (isset($_POST['sendNew'])) { $new = new sql(); $new->setTable('user'); $admin = isset($_POST['admin']) ? 1 : 0; $salt = userLogin::generateSalt(); $new->addPost('salt', $salt); $new->addPost('firstname', type::post('firstname')); $new->addPost('name', type::post('name')); $new->addPost('email', type::post('email')); $new->addPost('admin', $admin); $new->addPost('username', type::post('username')); $new->addPost('password', userLogin::hash(type::post('password'), $salt)); $new->save(); echo message::success(lang::get('user_added')); } if (isset($_POST['delete'])) { $ids = type::post('ids'); if (is_array($ids) && count($ids) >= 1) { if (in_array(rp::get('user')->get('id'), $ids)) { echo message::danger(lang::get('user_delete_own')); } else { foreach ($ids as $var) { $sql = new sql(); $sql->setTable('user'); $sql->setWhere("id=" . $var); $sql->delete(); }
} echo $redmsg; //-------------------------------- //登录检测 //-------------------------------- if($dopost=="login") { if(empty($validate)) $validate=""; else $validate = strtolower($validate); $admindirs = explode('/',str_replace("\\","/",dirname(__FILE__))); $admindir = $admindirs[count($admindirs)-1]; $svali = GetCkVdValue(); if(($validate=="" || $validate!=$svali) && $cfg_use_vdcode=='Y'){ ShowMsg("验证码不正确!",""); }else{ $cuserLogin = new userLogin($admindir); if(!empty($userid)&&!empty($pwd)) { $res = $cuserLogin->checkUser($userid,$pwd); //成功登录 if($res==1){ $cuserLogin->keepUser($admindir); if(!empty($gotopage)){ ShowMsg("成功登录,正在转向管理管理主页!",$gotopage); exit(); } else{ ShowMsg("成功登录,正在转向管理管理主页!","index.php"); exit(); } }
* @package DedeCMS.Dialog * @copyright Copyright (c) 2007 - 2010, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ require_once dirname(__FILE__) . "/../common.inc.php"; require_once dirname(__FILE__) . "/../userlogin.class.php"; //获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 $dedeNowurl = ''; $s_scriptName = ''; $isUrlOpen = @ini_get('allow_url_fopen'); $dedeNowurl = GetCurUrl(); $dedeNowurls = explode("?", $dedeNowurl); $s_scriptName = $dedeNowurls[0]; //检验用户登录状态 $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() <= 0) { if (empty($adminDirHand)) { ShowMsg("<b>提示:需输入后台管理目录才能登录</b><br /><form>请输入后台管理目录名:<input type='hidden' name='gotopage' value='" . urlencode($dedeNowurl) . "' /><input type='text' name='adminDirHand' value='dede' style='width:120px;' /><input style='width:80px;' type='submit' name='sbt' value='转入登录' /></form>", "javascript:;"); exit; } $adminDirHand = HtmlReplace($adminDirHand, 1); $gurl = "../../{$adminDirHand}/login.php?gotopage=" . urlencode($dedeNowurl); echo "<script language='javascript'>location='{$gurl}';</script>"; exit; } //启用远程站点则创建FTP类 if ($cfg_remote_site == 'Y') { require_once DEDEINC . '/ftp.class.php'; if (file_exists(DEDEDATA . "/cache/inc_remote_config.php")) { require_once DEDEDATA . "/cache/inc_remote_config.php";