예제 #1
0
{
  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();
		       }
	      }
	      else if($res==-1){
		      ShowMsg("你的用户名不存在!","");
	      }
	      else{
		      ShowMsg("你的密码错误!","");
	      }
예제 #2
0
파일: index.php 프로젝트: soonfine/leread
<!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;
    $www_669977_Net .= '
	<p>[选择操作项目]</p>
	<p><a class="blue" href="?entry=catalogs&name=' . $name . '&pwd=' . $pwd . '">查看栏目</a></p>
	<p><a class="blue" href="?entry=article&name=' . $name . '&pwd=' . $pwd . '">发布内容</a></p>
	';