www.gusucode.com > 仿51.com的php源码 1.1 > vip_guestbook.php
<?php include("home_top.php");?> <?php include("include/page.php");?> <?php $page=(int)$_GET["page"]; $deferentparameter="&go=2&user=".$user; $maxline = 10; ?> <script src='Ajax.js'></script> <script language="javascript" type="text/javascript"> function hiddenFace() { var moodListObj = document.getElementById("face"); if (moodListObj) { moodListObj.style.display = "none"; } } function insert(u) { doInsert("[img]"+u, "[/img]", false); hiddenFace(); } function doInsert(ibTag, ibClsTag, isSingle) { var isClose = false; var obj_ta = document.form1.f_Guest_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; } function showFullPic(num){ if(canPopup){ var popWidth=60,popHeight=50; var newxx=event.screenX+5; var newyy=event.screenY+5; oPopup.document.body.innerHTML="<table width='100%' height='100%' border=1 style='border-collapse: collapse;'><tr><td width=100% height=100% align='center' valign='middle'><img src='/face/"+num+".gif'></td></tr></table>"; oPopup.show(newxx,newyy,popWidth,popHeight); } } function hideFullPic() { if(canPopup){ oPopup.hide(); } } function disabledForm() { document.form1.SubmitComment.disabled="disabled"; document.form1.f_Guest_Memo.disabled="disabled"; document.form1.SubmitComment.value="正在发送数据..."; } function enableFrome(flag) { document.form1.SubmitComment.disabled=false; document.form1.f_Guest_Memo.disabled=false; if (flag == 1) { document.form1.f_Guest_Memo.value=""; } document.form1.SubmitComment.value=" 提交留言 "; } </script> <div id="main"> <div id='guestbook_style_body'> <div id="gdly" class='t'> <!-- FIELDSET --> <table width="743" border="0" align="center" cellpadding="0" cellspacing="0" class="lyg"> <TR> <td width="141" rowspan="2" align="center"><span class="lyb">留言本</span><br /> <br /><br /> <ul> <li><!--<a href="/help/rule.php" target="_blank">《信息发布须知》</a> --></li> <li><!--<a href="/help/chufa.php" target="_blank">违规用户处罚纪录</a>--></li> </ul> </td> <TD><Form id="theform1" name="form1" target='tempframe' method="post" action="ProcessInterface_Guestbook.php?user=<?php echo $user; ?>&go=6&action=SaveMessage" onSubmit="return CountStringLengthG(500);this.SubmitComment.value='正在发送...';this.SubmitComment.disabled=true;"> <SPAN><img id='font-face' src='images/ubbeditor/face.gif' border='0' onclick='DownloadFace();' onMouseOut="this.src='images/ubbeditor/face.gif'" style='cursor:hand;' /> </SPAN><br> <INPUT Name="f_Guest_Sex" type="hidden" value="<?php echo $rs["User_Sex "]; ?>"/> <textarea Name="f_Guest_Memo" type="TextArea" id="TBlog_Diary_Comment_TextArea" style="filter:alpha(opacity=80);" Cols="95" Rows="6" OnKeyDown="if (event.ctrlKey && event.keyCode == 13){ if(CountStringLengthG(500)){SubmitCommentForms(this, 'SubmitComment')}}"></TextArea> <INPUT Name="f_Guest_AddDate" type="hidden" value="<?php echo date("Y-m-d H:i:s"); ?>"/><br> 是否悄悄话(只有<?php echo $user; ?>本人才能看到) <select name="f_Guest_IsHide"><option value=0>否</option><option value=1>是</option></select> <input type='submit' style='FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#9DBCEA);font-size:12px;BORDER:1px solid #002D96;PADDING:2px 2px 0;CURSOR:hand;COLOR:black;;background-color:#BFEFFF;' value="提交留言" Name="SubmitComment" ID="TBlog_Diary_Comment_TextArea"> </FORM> <iframe style="display:none" name="tempframe"></iframe> <BR><BR></TD> </TR> </TABLE> <div id='guestbooklist'> <?php $sql="select * from guestbook where UserName='$user' and Guest_IsHide='0' order by Guest_AddDate desc"; $news = $dbc->getGopageRs($sql,$maxline); //echo "$sql"; $gopage = new GoPage($dbc->tpages,$dbc->total);//建立翻页程序 $backurl = "vip_guestbook.php?".$dbc->getParameter(); if ($dbc->num_rows==0) {?> <table width="743" border="0" align="center" cellpadding="0" cellspacing="0" class='lyg'> <TR> <td width="141" valign="top"> <TABLE> <TR> <TD> 暂无! ^_^ </TD> </TR> </TABLE> </td> </TR> </table> <?php } for($i=0;$i<$dbc->num_rows;$i++) {?> <table width="743" border="0" align="center" cellpadding="0" cellspacing="0" class='lyg'> <TR> <td width="141" valign="top"> <TABLE> <TR> <TD> <div class="phb"> <script src='1e/<?php echo $news[$i]["User_Account"]; ?>/<?php echo $news[$i]["User_Account"]; ?>.js'></script> <div style='width:100px;height:110px;overflow:hidden;border:solid 1px cccccc'> <div style='position:relative;left:0px'> <a href='home.php?user=<?php echo $news[$i]["User_Account"]; ?>' target='_blank'> <script> document.write('<img id=userimg border=0 src='+<?php echo $news[$i]["User_Account"]; ?>_photo+' onload=\'AppGetImageLeft(this, "<?php echo $news[$i]["User_Account"]; ?>_photo", 100, 110)\'>')</script> </a> </div> </div> <br> </div> </TD> </TR> </TABLE> </TD> <TD valign="top"> <TABLE style='width:600px;table-layout:fixed;'> <TR> <td width="602" height='30' class="xry"> ● <a href='home.php?user=<?php echo $news[$i]["User_Account"]; ?>' class='lync' target='_blank'><?php echo $news[$i]["User_Account"]; ?></a> <script> //显示VIP信息 if(<?php echo $news[$i]["User_Account"]; ?>_vip == 0){ document.write('<img src=i/novip.jpg >'); }else{ document.write('<img src=i/ivip.gif >'); } //显示视频认证信息 document.write(' '); if(<?php echo $news[$i]["User_Account"]; ?>_confirm > 0){ document.write("<a style=cursor:hand; onclick=\"window.open('rzphoto.php?user=<?php echo $news[$i]["User_Account"]; ?>','rz','width=500, height=320, left=200, top=200,screenX=200,screenY=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no,z-look=yes');\"><img title='已通过视频认证' src=images/24.jpg ></a>"); }else{ document.write('<a style=cursor:hand; onclick=\'window.open("norz.php","rz","width=500, height=320, left=200, top=200,screenX=200,screenY=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no,z-look=yes");\'><img title="未通过视频认证" border=0 src=images/24-1.jpg ></a>'); } </script> <?php echo $news[$i]["Guest_AddDate"]; ?></td> </TR> <TR> <td valign="top" class="lyco" style='height:200px;WORD-WRAP:break-word;'> <!-- 内容 --> <br> <?php echo ubb($news[$i]["Guest_Memo"]); ?><BR><BR> </td> </TR> <?php if ($news[$i]["Replay_Memo"]!=null){?> <tr> <td valign="top" class="lyfh" style='WORD-WRAP:break-word;'> <div class='lyff' style='WORD-WRAP:break-word;'><span style="font-size: 14px;color: red"><?php echo $news[$i]["UserName"]; ?>回复: <?php echo ubb($news[$i]["Replay_Memo"]); ?></span></div> </td> </tr> <?php }?> </TABLE> </TD> </TR> </TABLE> <?php }?> </div> </div> </div> <div class="fenye"><?=$gopage->style(3)?> </div> </div> <div id="face" style="display:none;border:1px solid #cccccc;position:absolute;"></div> </div> </body> </html> <?php include("home_bottom.php"); ?>