www.gusucode.com > 仿51.com的php源码 1.1 > yijian/index.php
<?php include("../User/CheckLogined.php"); include("../include/dbclass.php"); $dbc=new DbConn(); $uid=$_COOKIE["uid"]; if($_GET["action"]=="save") { $tag=$_POST["tag"]; $qq=$_POST["qq"]; $name=$_POST["name"]; $account=$_POST["account"]; $ug_type=$_POST["ug_type"]; $memo=$_POST["memo"]; $T=date("Y-m-d h:i:s",strftime(time())); $SQL="insert into yijian (User_Account,ug_type,memo,name,qq,tag,AddDate) values ('$account','$ug_type','$memo','$name','$qq','$tag','$T')"; $dbc->Execute($SQL); echo "<script>alert('你的问题已提交!');location.href='../User/MyFeedback.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" /> <style type="text/css"> <!-- body{margin:0px;font-family:Arial;background-color:#FFFFFF;}td{font-size:14px;} .xl { border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #BEBEBE; } .b { font-weight: bold; } img { border: 0px; } .j{margin-top:5px;} .yj td{font-size:12px;font-weight:bold} .n { border: 1px solid #C4C5BF; } .h12 { font-size: 12px; font-weight: normal; color: #909090; } --> </style> </head> <script> try{ if(top!=window){ document.domain ="www.wu-liao.com"; }else{ top.location.href="/webin.php?refer=%2Fyijian%2Findex.php"; } }catch(e){} function showNewMessage(user){ top.showNewMessage(user); } </script> <script language="JavaScript"> function check(obj) { if(obj.ug_type.value.length==0) { obj.ug_type.focus(); alert("请选择留言类型!"); return false; } if(obj.memo.value.length==0) { obj.memo.focus(); alert("内容不能为空!"); return false; } if(obj.name.value.length==0) { obj.name.focus(); alert("请输入姓名!"); return false; } if(obj.qq.value.length==0) { obj.qq.focus(); alert("请输入联系方式"); return false; } return true; } function insertFace() { var w=250,h=280; var theDes="status:no;center:yes;help:no;minimize:yes;maximize:no;dialogWidth:"+w+"px;scroll:no;dialogHeight:"+h+"px;border:think"; var rv=self.showModalDialog("/i/pub/insertface.html",null,theDes); if(rv) try { doInsert("[img="+rv+"]","",true); } catch(e) { document.all("memo").value+="[img="+rv+"]"; } } function doInsert(ibTag, ibClsTag, isSingle) { var isClose = false; var obj_ta = document.all("memo"); if(obj_ta.isTextEdit){ obj_ta.focus(); var sel = document.selection; var rng = sel.createRange(); rng.collapse; if((sel.type == "Text" || sel.type == "None") && rng != null){ if(ibClsTag != "" && rng.text.length > 0) ibTag += rng.text + ibClsTag; else if(isSingle) isClose = true; else ibTag+=ibClsTag; rng.text = ibTag; } } else{ if(isSingle) isClose = true; obj_ta.value += ibTag; } obj_ta.focus(); return isClose; } </script> </head> <body> <div id="top"> <div id="logo"><a href="/User/Main.php"></a></div> <div id="topr"> <div id="exit"><?php require("../menu.php"); ?> <div id="menu"> <div class="m2"> <div class="mg"><a href="/User/Main.php">用户管理中心</a></div> <div class="mh"><a href="/Diary/DiaryList.php">日记文集</a></div> <div class="ma" ><a href="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=reg> <table width="764" border="0" align="center" cellpadding="0" cellspacing="0" class="j"> <tr> <td width="549" valign="bottom"><table width="774" height="350" border="0" cellspacing="0" class="n"> <tr> <td valign="top"><table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="38" class="xl b" align="left">当前位置: <a href="/" style="color:blue;">烦恼驿站</a> >> 意见簿 <a href='/Help/faq.php' style="color:blue;font-weight:normal;text-decoration:underline;">[常见问题解答]</a></td> </tr> <tr> <td> <table width="590" border="0" align="center" cellpadding="0" cellspacing="0" class="j yj"> <tr> <td height="318" align="center"> <form action="?action=save" method="post" onsubmit="return check(this)"> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> <td width="20%" align="right" style="padding-top:5">留言类型:</td> <td align="left"><select name="ug_type"> <option value="">请选择</option> <option value="建议">建议</option> <option value="咨询">咨询</option> <option value="举报">举报</option> <option value="其它">其它</option> </select> </td> </tr> <tr> <td width="20%" align="right" style="padding-top:5">留言内容:<br><br><!-- <input style="border-width:1px" type="Button" value="插入表情" onclick="insertFace()"> --></td> <td align="left"><textarea name="memo" rows="10" cols="50"></textarea></td> </tr> <tr> <td width="20%" align="right" style="padding-top:5">姓名:</td> <td align="left"><input name="name" size="20" maxlength="20" type="Text"></td> </tr> <tr> <td width="20%" align="right" style="padding-top:5">联系方式:</td> <td align="left"><input name="qq" size="20" maxlength="20" type="Text"> (QQ、Email、电话皆可)</td> </tr> <input name="account" size="20" value="<?php echo $uid; ?>" maxlength="20" type="hidden"> <tr> <td colspan="2" height="20"></td> </tr> <tr> <td colspan="2" align="center"> <input name="tag" value="<?php echo $_COOKIE["vip"]; ?>" type="hidden"> <input type="Submit" value=" 提交 "> <input type="Button" value=" 取消 " onclick="if(self.opener){self.close();} else{location.href='/';}"></td> </tr> </table> </form> </td> </tr> </table> <br /></td> </tr> </table></td> </tr> </table></td> </tr> </table></div> <div id="bottom"> <div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div> </div> </body> </html>