table="`user`"; } function checkLogin(){ if(!isset($_SESSION['client'])||$_SESSION['client']==''){ echo''; exit; } } function userRegister($arr){ $member_query=RunQuery("select * from ".$this->table." where `login`='".$arr['user_id']."' or `email`='".$arr['email']."'"); if(mysql_num_rows($member_query)>0){ mysql_free_result($member_query); echo''; exit; } RunQuery("insert into ".$this->table." set `login`='".$arr['user_id']."',`password`='".@$arr['password']."',`level`=1,`name`='".$arr['name']."',`mobile`='".$arr['mobile']."',`tel`='".$arr['tel']."',`email`='".$arr['email']."',`address`='".$arr['address']."',`postcode`='".$arr['postcode']."',`create_user`='".$arr['user_id']."',`create_date`='".time()."'"); $id = mysql_insert_id(); $query = RunQuery("select * from ".$this->table." where `id`='".$id."'"); $_SESSION['client'] = mysql_fetch_assoc($query); mysql_free_result($query); RunQuery("update ".$this->table." set `last_login`='".time()."',`last_login_date`='".time()."' where `id`='".$id."'" ); echo''; } function userLogin($arr){ $member_query=RunQuery("select * from ".$this->table." where `login`='".$arr['user_id']."'"); if(mysql_num_rows($member_query)==0){ echo''; exit; }else{ $member=mysql_fetch_assoc($member_query); if($arr['password']!=$member['password']){ echo''; exit; }else{ $_SESSION['client'] = $member; RunQuery("update ".$this->table." set `last_login`='".time()."',`last_login_date`='".time()."' where `id`='".$member_query['id']."'" ); } } mysql_free_result($member_query); } function changeInfo($arr){ $this->checkLogin(); RunQuery("update ".$this->table." set `name`='".$arr['name']."',`mobile`='".$arr['mobile']."',`tel`='".$arr['tel']."',`email`='".$arr['email']."',`address`='".$arr['address']."',`postcode`='".$arr['postcode']."',`update_date`='".time()."' where id='".$_SESSION['client']['id']."'"); $query = RunQuery("select * from ".$this->table." where `id`='".$_SESSION['client']['id']."'"); $_SESSION['client'] = mysql_fetch_assoc($query); mysql_free_result($query); echo''; } function changePassword($arr){ $this->checkLogin(); if($_SESSION['client']['password']!=$arr['old_password']) { echo''; exit; } RunQuery("update ".$this->table." set `password`='".$arr['new_password']."',`update_date`='".time()."' where id='".$_SESSION['client']['id']."'"); $query = RunQuery("select * from ".$this->table." where `id`='".$_SESSION['client']['id']."'"); $_SESSION['client'] = mysql_fetch_assoc($query); mysql_free_result($query); echo''; } function userLogout(){ session_destroy(); } } ?> Fatal error: Class 'Member' not found in /var/www/vhosts/jethobby.com/httpdocs/_shop/member/profile.php on line 9