<?if($navinfor[mima]!=''){ ?><?php$password = "$navinfor[mima]"; // 这里是密码 $p = ""; if(isset($_COOKIE["isview"]) and $_COOKIE["isview"] == $password){ $isview = true; }else{ if(isset($_POST["pwd"])){ if($_POST["pwd"] == $password){ setcookie("isview",$_POST["pwd"],time()+3600*3); $isview = true; }else{ $p = (empty($_POST["pwd"])) ? "<script language='javascript'> alert('需要密码才能查看,请输入密码。');</script>" : "<script language='javascript'> alert('密码不正确,请重新输入。');</script>"; } }else{ $isview = false; $p = "请输入密码查看,获取密码请看如下说明。"; } } if($isview){ ?> [!--newstext--]<?php }else{ ?><div class="mima-box"><h3>此处内容需要输入密码才能查看</h3><img src="images/wx.png" class="wx-kf" alt="微信客服18649130945"> <form method="post"> <span>请输入密码后继续:</span> <input name="pwd" id="followwechatview_verifycode" type="text" value="" > <input id="followwechatview_verifybtn" name="" type="submit" value="提交查看"> </form> <p><?php echo $p; ?></p> <ul> <li>请添加客服微信后输入<span>密码</span> 等待客服审批提供密码。</li> <li>您可以使用微信搜索<span>18649130945</span> 或者 <span>QQ:476847113</span> 获取密码。</li> <li>您也可以用微信扫描二维码添加客服后索取密码查看。</li> </ul></div><?php } ?><?}else{?>[!--newstext--]<? }?>