gettotal("select count(*) as total from {$dbtbpre}enewsvglist where vgid='$vgid'"); $mlist=$membernum?1:0; $sql=$empire->query("update {$dbtbpre}enewsvg set mlist='$mlist' where vgid='$vgid'"); } //增加会员白名单 function AddViewGroupMList($add,$userid,$username){ global $empire,$dbtbpre; $vgid=(int)$add['vgid']; $usertype=(int)$add['usertype']; $adduserid=RepPostVar($add['adduserid']); if(!$vgid||!$usertype||!$adduserid) { printerror("EmptyViewGroupMList","history.go(-1)"); } $addtime=time(); $outtime=$add['outtime']; if($outtime) { $outtime=to_time($outtime); } $outtime=(int)$outtime; //会员 $havem=0; $r=explode(',',$adduserid); $count=count($r); for($i=0;$i<$count;$i++) { $thisuid=trim($r[$i]); if(empty($thisuid)) { continue; } //类型 if($usertype==2) { $thisuid=RepPostVar($thisuid); $mr=$empire->fetch1("select ".eReturnSelectMemberF('userid')." from ".eReturnMemberTable()." where ".egetmf('username')."='$thisuid' limit 1"); } else { $thisuid=(int)$thisuid; $mr=$empire->fetch1("select ".eReturnSelectMemberF('userid')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$thisuid' limit 1"); } if(!$mr['userid']) { continue; } //是否存在 $vgnum=$empire->gettotal("select count(*) as total from {$dbtbpre}enewsvglist where vgid='$vgid' and userid='$mr[userid]' limit 1"); if(!$vgnum) { $empire->query("insert into {$dbtbpre}enewsvglist(vgid,addtime,userid,outtime) values('$vgid','$addtime','$mr[userid]','$outtime');"); $havem=1; } } ToUpViewGroupMList($vgid); //操作日志 insert_dolog("vgid=".$vgid."&usertype=".$usertype."
adduserid=".$adduserid); printerror("AddViewGroupMListSuccess","ListVgMember.php?vgid=$vgid".hReturnEcmsHashStrHref2(0)); } //修改会员白名单 function EditViewGroupMList($add,$userid,$username){ global $empire,$dbtbpre; $vgid=(int)$add['vgid']; $adduserid=(int)$add['adduserid']; if(!$vgid||!$adduserid) { printerror("EmptyViewGroupMList","history.go(-1)"); } $outtime=$add['outtime']; if($outtime) { $outtime=to_time($outtime); } $outtime=(int)$outtime; $sql=$empire->query("update {$dbtbpre}enewsvglist set outtime='$outtime' where vgid='$vgid' and userid='$adduserid' limit 1"); if($sql) { //操作日志 insert_dolog("vgid=".$vgid."
userid=".$adduserid); printerror("EditViewGroupMListSuccess",EcmsGetReturnUrl()); } else {printerror("DbError","history.go(-1)");} } //删除会员白名单 function DelViewGroupMList($add,$userid,$username){ global $empire,$dbtbpre; $vgid=(int)$add['vgid']; $adduserid=(int)$add['adduserid']; if(!$vgid||!$adduserid) { printerror("EmptyViewGroupMList","history.go(-1)"); } $sql=$empire->query("delete from {$dbtbpre}enewsvglist where vgid='$vgid' and userid='$adduserid'"); ToUpViewGroupMList($vgid); if($sql) { //操作日志 insert_dolog("vgid=".$vgid."
userid=".$adduserid); printerror("DelViewGroupMListSuccess",EcmsGetReturnUrl()); } else {printerror("DbError","history.go(-1)");} } $enews=$_POST['enews']; if(empty($enews)) {$enews=$_GET['enews'];} if($enews) { hCheckEcmsRHash(); } if($enews=="AddViewGroupMList") { AddViewGroupMList($_POST,$logininid,$loginin); } elseif($enews=="EditViewGroupMList") { EditViewGroupMList($_POST,$logininid,$loginin); } elseif($enews=="DelViewGroupMList") { DelViewGroupMList($_GET,$logininid,$loginin); } else {} $vgid=(int)$_GET['vgid']; if(!$vgid) { printerror("ErrorUrl","history.go(-1)"); } $vgr=$empire->fetch1("select * from {$dbtbpre}enewsvg where vgid='$vgid'"); if(!$vgr['vgid']) { printerror("ErrorUrl","history.go(-1)"); } $page=(int)$_GET['page']; $page=RepPIntvar($page); $start=0; $line=30;//每页显示条数 $page_line=12;//每页显示链接数 $offset=$page*$line;//总偏移量 $search='&vgid='.$vgid; $search.=$ecms_hashur['ehref']; $totalquery="select count(*) as total from {$dbtbpre}enewsvglist"; $num=$empire->gettotal($totalquery); $query="select * from {$dbtbpre}enewsvglist order by addtime desc limit $offset,$line"; $sql=$empire->query($query); $returnpage=page2($num,$line,$page_line,$start,$page,$search); ?> 管理会员白名单
位置:管理会员访问组 >  > 会员白名单
增加会员白名单:
增加类型
会员ID或用户名(多个用半角逗号隔开) 过期时间 (留空为不限)
操作
fetch($sql)) { $mr=$empire->fetch1("select ".eReturnSelectMemberF('username')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$r[userid]'"); ?>
会员ID
用户名
增加时间
过期时间
操作
" size="28">