GetOne("SELECT msg FROM `#@__guestbook` WHERE id='$reid' "); $msg = "
".addslashes($row['msg'])."
\n".$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 = " //成功发送或回复留言?/b>   我已经知道了,点击此返回>>"; // $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,1000); //} if($needCheck==1) { ShowMsg('成功发送一则留言!请耐心等待我们联系?,'/',0,1000); } 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(); }