protected function nodebug()
 {
     $url = Core::url('/opendebugger/logout');
     $str = '';
     if (isset($_GET['forward']) && $_GET['forward']) {
         $forward = HttpIO::GET('forward', HttpIO::PARAM_TYPE_URL);
         $str = '<a href="' . $forward . '">' . $forward . '</a>';
     }
     $view = new View('opendebugger');
     $view->str = $str;
     $view->url = $url;
     $view->open = false;
     $view->render();
 }
Exemple #2
0
 /**
  * Create a new session.
  *
  * @return  void
  */
 public function create()
 {
     $cookie_config = Core::config('cookie');
     $_SESSION = array();
     switch (Session::$config['type']) {
         case 'auto':
             $sid = HttpIO::REQUEST($this->session_name);
             break;
         case 'url':
             $sid = HttpIO::GET($this->session_name);
             break;
         default:
             $sid = HttpIO::COOKIE($this->session_name);
             break;
     }
     if (!$sid || !Session::check_session_id($sid)) {
         $sid = Session::create_session_id();
         if (Session::$config['type'] != 'url') {
             # 将session存入cookie
             Core::cookie()->set($this->session_name, $sid, !Session::$config['httponly'] && Session::$config['expiration'] > 0 ? Session::$config['expiration'] : null, $cookie_config['path'], $cookie_config['domain'], $cookie_config['secure'], Session::$config['httponly']);
         }
     }
     # 添加URL处理自动追加SESSION ID参数
     if (Session::$config['type'] == 'url') {
         Core::add_url_args(Session::$config['name'], $sid);
     }
     # 调试模式设置Session模式,避免开启缓存模式时获取不到Session
     if (IS_DEBUG) {
         $this->driver()->session_mode(true);
     }
     $_SESSION = $this->driver()->get($sid);
     if (IS_DEBUG) {
         $this->driver()->session_mode(false);
     }
     if (!is_array($_SESSION)) {
         $_SESSION = array();
     }
     # 将获取的值序列化MD5值
     Session_Driver_Cache::$OLD_SESSION_MD5 = md5(serialize($_SESSION));
     # 当前session id
     Session_Driver_Cache::$Session_ID = $sid;
 }
Exemple #3
0
 /**
  * 创建Session
  *
  * @return  void
  */
 public function create()
 {
     session_name(Session::$config['name']);
     $this->destroy();
     $cookie_config = Core::config('cookie');
     # 这里对IP+非80端口的需要特殊处理下,经试验,当这种情况下,设置session id的cookie的话会失败
     if (preg_match('#^([0-9]+.[0-9]+.[0-9]+.[0-9]+):[0-9]+$#', $cookie_config['domain'], $m)) {
         # IP:PORT 方式
         $cookie_config['domain'] = $m[1];
     }
     $s_name = session_name();
     switch (Session::$config['type']) {
         case 'auto':
             $sid = HttpIO::REQUEST($s_name);
             break;
         case 'url':
             $sid = HttpIO::GET($s_name);
             break;
         default:
             $sid = HttpIO::COOKIE($s_name);
             break;
     }
     if (!$sid || !Session::check_session_id($sid)) {
         # 如果检验的Session ID不合法,则重新生成一个
         session_id(Session::create_session_id());
     } else {
         session_id($sid);
     }
     # Session ID 通过uri传递
     if (Session::$config['type'] == 'url') {
         @ini_set('session.use_only_cookies', 0);
     } else {
         session_set_cookie_params(Session::$config['httponly'] ? 0 : (int) Session::$config['expiration'], $cookie_config['path'], $cookie_config['domain'], $cookie_config['secure'], Session::$config['httponly']);
     }
     session_start();
 }
Exemple #4
0
 /**
  * 返回query构造参数
  *
  * @param  array $params  array of GET parameters
  * @return string
  */
 public static function query(array $params = null)
 {
     if ($params === null) {
         // Use only the current parameters
         $params = HttpIO::GET(null, false);
     } else {
         // Merge the current and new parameters
         $params = array_merge(HttpIO::GET(null, false), $params);
     }
     if (empty($params)) {
         // No query parameters
         return '';
     }
     $query = http_build_query($params, '', '&');
     // Don't prepend '?' to an empty string
     return $query === '' ? '' : '?' . $query;
 }
Exemple #5
0
		if ( n==6 || n==0 )
		{
			t = -t;
		}
	}
	setInterval(run,80);
})();
</script>
</td>
</tr>
<tr>
<td height="200" valign="top">
<div id="login_form">
<form method="post" id="myform" autocomplete="off" onsubmit="return check_submit(this);">
    <input type="hidden" name="forward" value="<?php 
echo HttpIO::GET('forward', HttpIO::PARAM_TYPE_URL);
?>
" />
	<div style="position:absolute;margin-left:-60px;">
    	<h1><?php 
echo __('Administrator login');
?>
</h1>
    </div>
    <div class="input_div" style="margin-left:-60px;">
        <!--[if lt IE 6.9]><div class="input_bg_forie6"><div class="inputbg"></div></div><![endif]-->
    	<div style="padding:28px;">
        	<div class="input_bg_text" id="input_default_text_username"><?php 
echo __('Username');
?>
</div>