www.gusucode.com > 仿51.com的php源码 1.1 > User/MyAccessRight.php
<?php include("CheckLogined.php"); include("../include/dbclass.php"); $db=new DbConn(); include "functions.php"; $function=new functions(); include "user.php"; $globalvars->set_vars(); $user_dat = $user->process_user($globalvars); if ($_GET["action"]=="add") { $IsHomepageClose=$_POST["f_User_IsHomepageClose"]; $MessagePrivilege=$_POST["f_User_MessagePrivilege"]; $LeaveWordPrivilege=$_POST["f_User_LeaveWordPrivilege"]; $uid=$_COOKIE["uid"]; $sql="update userdata set IsHomepageClose='$IsHomepageClose',MessagePrivilege='$MessagePrivilege',LeaveWordPrivilege='$LeaveWordPrivilege' where User_Account='$uid'"; $db->Execute($sql); echo "<script>alert('保存成功!');location.href='Main.php';</script>"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>村委会档案管理中心 - 首页</title> <link href="../images/User_Main.css" rel="stylesheet" type="text/css" /> <script> try{ if(top!=window){ document.domain ="www.wu-liao.com"; }else{ top.location.href="/webin.php?refer=%2FUser%2FMyAccessRight.php"; } }catch(e){} function showNewMessage(user){ top.showNewMessage(user); } </script> </head> <body> <div id="top"> <div id="logo"><a href="Main.php"></a></div> <div id="topr"> <div id="exit"><a href="http://www.wu-liao.com/" target="_top">网站首页</a><!--| <a href="/User/Online.php">在线列表</a> | <a href="http://bbs.51.com/gourl.php?refer=/index.html" target=_blank>论坛</a> | <a href="http://qun.51.com/gourl.php?refer=/index.php" style="color:#0000cc;text-decoration: underline;">群组</a> --><?php if($_COOKIE["uid"] !=""){?> | <a href="http://www.wu-liao.com/home.php?user=<?php echo $_COOKIE["uid"]; ?>" target="_blank" style="color:#0000cc;text-decoration: underline;" id="myhomepage">我的主页</a> | <a href="../User/Logout.php" target="_top">安全退出</a></div><?php } ?> <div id="menu"> <div class="m2"> <div class="mg"><a href="Main.php">用户管理中心</a></div> <div class="mh"><a href="../Diary/DiaryList.php">日记文集</a></div> <div class="ma"><a href="../Photo/PhotoList.php">相册</a></div> <div class="ma"><a href="../Image/ImageList.php">图库</a></div> <div class="mb"><a href="../Music/MusicList.php">音乐</a></div> <div class="mc"><div id="ms"><a href="../Memo/MemoList.php"><img src="../images/suo2.gif" width="10" height="12" /> 秘密记事本</a></div> </div> <div class="me"><a href="../Fav/FavList.php">网址收藏夹</a></div> <div class="mf"><a href="../Addr/AddrList.php">通讯录</a></div> </div> </div> </div> <div id="nav"> <div id="navt"></div> </div> <div id="mjx"></div> <div id="main"> <div id="left"> <div class="leme"> <div class="imxle"><a href="MyPersonalInfo.php">个人资料设置</a></div><div class="imxle"><a href="MyHomepageTemplate.php">个人主页设置</a></div><div class="imxle" id="ixzle">高级权限设置</div> <div class="pawo"><!-- <a href="http://pay.51.com" target="_blank">支付中心</a><br />--><a href="MyPassword.php">密码设置</a></div> <div id=IdMyQun> </div> <!-- 广告 --> <!-- XML 文件读取失败! --><!-- XML 文件读取失败! --> <div style="margin-top:20px;"></div> </div> </div> <div id="right"> <div id="fenle"> <div class="qxk"> <form action="?action=add" method="post" name="form1"> <table width="570" border="0" cellpadding="5" cellspacing="0" class="tb"> <tr ><TD width="150" height="20" align="right"class="qxbt"> 主页开放:</TD><TD align="left"><select name="f_User_IsHomepageClose" ><option value=0 >公开</option><option value=1 >隐藏</option></select></TD></tr> <tr ><TD height="20" align="right" class="qxbt"> 谁能给我发消息:</TD><TD align="left"><select name="f_User_MessagePrivilege" ><option value=0 >我的好友</option><option value=1 >VIP用户</option></select></TD></tr><tr ><TD height="20" align="right" class="qxbt"> 留言评论防骚扰级别:</TD><TD align="left"><select name="f_User_LeaveWordPrivilege" ><option value=0 >低级</option><option value=1 >高级</option><option value=2 >特级</option></select></TD></tr> <tr ><td width="150" height="20" align="right"class="qxbt" colspan=2><input name="Submit" type="submit" class="btn" value="修 改"></td></tr> <script> if (document.all("f_User_IsHomepageClose").options && "<?php echo $user_dat['IsHomepageClose'];?>" == "" ){ document.all("f_User_IsHomepageClose").options[0].selected=true; }else{ document.all("f_User_IsHomepageClose").value="<?php echo $user_dat['IsHomepageClose'];?>"; }; if (document.all("f_User_MessagePrivilege").options && "<?php echo $user_dat['MessagePrivilege'];?>" == "" ){ document.all("f_User_MessagePrivilege").options[0].selected=true; }else{ document.all("f_User_MessagePrivilege").value="<?php echo $user_dat['MessagePrivilege'];?>"; }; if (document.all("f_User_LeaveWordPrivilege").options && "<?php echo $user_dat['LeaveWordPrivilege'];?>" == "" ){ document.all("f_User_LeaveWordPrivilege").options[0].selected=true; }else{ document.all("f_User_LeaveWordPrivilege").value="<?php echo $user_dat['LeaveWordPrivilege'];?>"; }; </script> </table> </form> <table width="570" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td align="left" style="color:#FF0000;line-height:20px"> </td> <td> </td> </tr> <tr> <td width="61"> </td> <td width="402" align="left" style="color:#FF0000;line-height:20px">当您的人气较旺时,系统会自动将您的防骚扰级别设置为“高级”状态。<br /> 这将有效地防止骚扰性的留言或评论!</td> <td width="107"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td align="left"><span style="color:#FFFFFF;background:#008000; padding:5px;line-height:16px">防骚扰级别说明</span></td> <td> </td> </tr> <tr> <td> </td> <td align="left"style="line-height:20px">低级:任何人都可以对您进行留言或评论<br /> 高级:只有VIP或您的好友才能对您进行留言或评论<br /> 特级:拒绝任何人对您进行留言或评论 (请慎用此级别)</td> <td> </td> </tr> </table> </div> </div> </div> </div> <div id="bottom"> <div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div> </div> </body> </html>