GetOne("SELECT msg FROM `#@__guestbook` WHERE id='$reid' "); $msg = "
".addslashes($row['msg'])."
\n".$msg; } $msg = addslashes($msg); $query = "INSERT INTO `#@__guestbook`(title,tid,mid,uname,email,homepage,qq,face,msg,ip,dtime,ischeck) VALUES ('$title','$tid','{$g_mid}','$uname','$email','$homepage','$qq','$img','$msg','$ip','$dtime','$needCheck'); "; $dsql->ExecuteNoneQuery($query); $gid = $dsql->GetLastID(); if($needCheck==1) { require_once(DEDEINC."/oxwindow.class.php"); $msg = " 乐成发送或回复留言!   我已经知道了,点击此返回>>"; $wintitle = "留言宣布乐成提示"; $wecome_info = "留言宣布乐成:"; $win = new OxWindow(); $win->Init("","js/blank.js","post"); $win->AddTitle("提示:"); $win->AddMsgItem("
$msg
"); $winform = $win->GetWindow("hand"); $win->Display(); } else { ShowMsg('乐成发送一则留言,但需审核后才气显示!','guestbook.php',0,3000); } exit(); } //显示所有留言 else { setcookie('GUEST_BOOK_POS',GetCurUrl(),time()+3600,'/'); if($g_isadmin) $sql = 'SELECT * FROM `#@__guestbook` ORDER BY id DESC'; else $sql = 'SELECT * FROM `#@__guestbook` WHERE ischeck=1 ORDER BY id DESC'; $dlist = new DataListCP(); $dlist->pageSize = 10; $dlist->SetParameter('gotopagerank',$gotopagerank); $dlist->SetTemplate(DEDETEMPLATE.'/plus/guestbook.htm'); $dlist->SetSource($sql); $dlist->Display(); }