<?php 
require "../Run.php";
if($admin != 1 && $admin !=2){
	echo head('权限错误');
	echo '<div class="tip">您好，您不具备相应的权限</div>';
	echo footer(1);
	exit;
}
$act = $_GET['act'];
if($_GET['act'] == NULL){$act == 'yes';}

$sql="UPDATE user SET site_reg='".$act."' WHERE id='".MYID."'";
mysql_query($sql);
	echo head('注册开关');
	echo '<div class="tip">用户注册开关</div>';
	if(user('site_reg','id',WAPID) == 'no'){
		$con = '<a href="?act=yes">[注册已停止_开启注册]</a>';
	}else{
		$con = '<a href="?act=no">[注册已开启_关闭注册]</a>';
	}
	echo '<div class="content">';
	echo $con;
	echo '</div>';
	echo '<div class="mylink"><a href="wap_admin.php?">管理后台</a></div>';
	echo footer(1);
?>