<?php function checkedip(){ @include_once(ECMS_PATH."e/class/ckip.php"); $Clientip=$_SERVER["REMOTE_ADDR"]; $ClientCity=convertip($Clientip); if (findstr($ClientCity,'山东')){ $s='<input name=cncode value="1" type=hidden /><input name=cnpro type=hidden id="cnpro" value="'.md5($public_r['downpass']).'">'; }else{ $lguserid=intval(getcvar('mluserid'));//登陆用户ID $lgusername=RepPostVar(getcvar('mlusername'));//登陆用户 $lggroupid=intval(getcvar('mlgroupid'));//会员组ID $refer= 'http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"];
if($lggroupid) //登陆会员显示菜单 { if($lggroupid=='2') //登陆会员显示菜单 { $s='<input name=cncode value="1" type=hidden /><input name=cnpro type=hidden id="cnpro" value="'.md5($public_r['downpass']).'">'; } else { $s='<table class="post_table"> <tr> <th>验证码</td> <td><input name=cncode value="0" type=hidden /><input name=cnpro type=hidden id="cnpro" value="'.md5(mt_rand(1,10000)).'"><input name="key" type="text" size="6" class="ip1"> <img src="/e/ShowKey/?v=info" name="KeyImg" id="KeyImg" onclick="KeyImg.src=\'/e/ShowKey/?v=info&s=?\'+Math.random()" alt="看不清楚,点击刷新" align="bottom" style="cursor: pointer;border:1px solid #333" ><span class="notes" style="color:#080"> 如果看不清验证码,请点图片刷新</span></td></tr><tr><th></th><td><h3 style="font-weight:bold;font-size:14px;color:#f00;">您不在本地,<a href="/e/member/buygroup/">升级成为VIP会员</a>,直接发布不用审核!</h3></td></tr></table> '; } } else{ //echo '跳转';// Header("Location: /e/member/login/?from=".$refer.""); ?> <script language="JavaScript"> self.location='/e/member/login/?from=<?=$refer?>'; </script> <? } } return $s; } ?>
这样的不是也很好吗?
|