Example #1
0
		}

		if($err==''){//进行注册操作
			$is_have=hkl_mysql_query("select * from webuser where email='{$website_email}'");
			if($is_have[0]==1010){
				//用户名或邮箱已被注册
				$tip=$Tip->warn('很抱歉,您填写的邮箱已被注册!');
			}else{
				//开始进行注册操作
				$pass=md5($website_pass);
				$time=time();
				$ip=get_client_ip();
				$ua=$_SERVER['HTTP_USER_AGENT'];
				$re=$mysqli->query("insert into webuser set pass='******',email='{$website_email}',regtime='{$time}',regip='{$ip}',regua='{$ua}' ");
				if($re){
					writeLog('['.date("Y-m-d H:i:s").']:用户['.hideStar($website_email).']完成初步注册');
					header('location:reg2.php?email='.urlencode($website_email));
					exit();
					// @setcookie('login','1',time()+7*24*60*60,'/');
					// @setcookie('email',$website_email,time()+7*24*60*60,'/');
					// @setcookie('pass',$pass,time()+7*24*60*60,'/');
					/*
					header('location:user.php');
					exit();*/
					// echo '<pre>';
					// print_r($re);
					// print_r($mysqli);
					// echo '</pre>';
				}else{
					$tip=$Tip->warn('注册失败,数据库写入失败!');
				}
Example #2
0
					$tip.=$Tip->info('帐号清空成功!');
					writeLog('['.date("Y-m-d H:i:s").']:用户['.hideStar($row['email']).']清空了他的易班挂机');
					$sql="DELETE FROM `ybuser` WHERE webuserid='{$row['id']}'";
					$mysqli->query($sql);
					$sql="UPDATE `webuser` SET gj_num='0' where id='{$row['id']}'";
					$mysqli->query($sql);
				}else{
					$ybusertxt='本账号下的全部挂机';
				}
			}else{
				if($ok==1){
					$go='admin_yiban.php';
					$title='管理易班帐号';
					$file='../tpl/goto.html';
					$tip.=$Tip->info('帐号删除成功!');
					writeLog('['.date("Y-m-d H:i:s").']:用户['.hideStar($row['email']).']删除了他的易班挂机['.hideStar($del).']');
					$sql="DELETE FROM `ybuser` WHERE webuserid='{$row['id']}' and ybuser='******'";
					$mysqli->query($sql);
					$sql="UPDATE `webuser` SET gj_num=gj_num-1 where id='{$row['id']}'";
					$mysqli->query($sql);
					if(file_exists('../cookie/'.md5($del).'.cookie')){
						unlink('../cookie/'.md5($del).'.cookie');
					}
					if(file_exists('../cookie/'.md5($del).'.cookie2')){
						unlink('../cookie/'.md5($del).'.cookie2');
					}
				}else{
					$ybusertxt=$del;
					$go='admin_yiban_more.php?user='******'易班挂机详情';
				}