login.php

来自「极限OA开源系统」· PHP 代码 · 共 48 行

PHP
48
字号
<?
/********************************************************************************/
/* 极限办公自动化系统 (极限OA)													*/
/* ========================      												*/
/* 欢迎使用 极限OA,在您开始使用之前,请务必完整阅读本软件附带的全部说明档				*/
/********************************************************************************/
/* Welcome to http://www.xsp.cn & http://oa.xsp.cn								*/
/* 技术支持论坛 http://www.1119.net												*/
/********************************************************************************/
/* 商业购买请联系 临海市极限网络有限公司											*/
/* 联系电话: (0576) 5131349	邮件: mkt@xsp.cn	QQ: 562873							*/
/********************************************************************************/
require "./includes/headinc.php";

if($action == 'logout') {
	$union_user = $union_pass = $gid = '';
	clearcookies();
	header("Location:login.php");
	exit;
}

if($action == 'login') {//echo $loginuser;exit;
	$UNION_USER = '';
	$loginpass2 = md5($loginpass);
	$UNION_USER = $db->query_fetch("SELECT uid AS union_uid, fig AS union_fig, username AS union_user, password AS union_pass FROM $table_members WHERE username='$loginuser' && password='$loginpass2'");
	if($UNION_USER[union_uid] && !$UNION_USER[union_fig])
		showmessage('此帐号不可用');
	if ($UNION_USER) {
		union_setcookie("union_user_", $UNION_USER['union_user']);
		union_setcookie("union_pass_", $UNION_USER['union_pass']);
	}else{
		clearcookies();
	}
	@extract($UNION_USER);
	if($cur_) {
		$url = "$cur_.php?action=$act_&sysaction=$sact_";
	}else
		$url = "index.php";
	//$show_message .= "<br><br><a href=\"$url\" style=\"font-size:12px\">如果您的浏览器没有自动跳转,请点击这里</a>";
	$show_message .= "<meta http-equiv=\"refresh\" content=\"0;url=$url\">";
	echo $show_message;
	exit;
}



include getData('login');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?