|
楼主 |
发表于 2011-1-11 09:53:57
|
显示全部楼层
function __construct()
{
parent::Controller();
$this->load->helper(array('url','html','form'));
$this->load->library('form_validation');
$this->load->library('pagination');
$this->load->library('session');
$this->load->model('Mwww','',TRUE);
$this->title = $this->config->item('WebTitle');
}
function UserLogin()//表单中心--登录判定
{
$data['title'] = $this->title;
$SendSite=$this->input->post('SendSite',true);
if($SendSite!=720){
$SendSite=1;
}
$UserName=$this->input->post('MemberUser',true);
$UserPwd=$this->input->post('MemberPwd',true);
$V_Check="";
$query=$this->Mwww->checkUserAndPwd($UserName,md5($UserPwd));
if($query->num_rows()>0){
$UserName="";
$ZhenName="";
$V_Id="";
$V_EndTime="";
foreach ($query->result() as $row)
{
$UserName=$row->U_Name;
$ZhenName=$row->U_RealName;
$Departments=$row->U_Departments;
$V_Id=$row->U_Id;
$V_EndTime=$row->U_LastLoginTime;
}
$userdata = array(
'VipUser'=>$UserName,
'VipName'=>$ZhenName,
'VipId'=>$V_Id,
'Departments'=>$Departments,
'BeginTime'=>$V_EndTime,
'SendSite'=>$SendSite,
'logged_in'=>TRUE
);
$this->session->set_userdata($userdata);
$this->Mwww->updateVipDate($V_Id);
redirect('sqxx');
}else{
redirect('sqxx');//用户名或密码错误跳转
}
}
在公司服务器上测OK的,上传到服务器商哪就不行了! |
|