$date = smartDate($date); $r = htmlClean(stripslashes($r)); $response = "\r\n\t\t <li id=\"reply_{$rid}\" style=\"background-color:#FFEEAA\">\r\n\t\t <span class=\"name\">{$name}</span> {$r}<span class=\"time\">{$date}</span>\r\n\t\t <span><a href=\"javascript: hidereply({$rid},{$tid});\">隐藏</a></span> \r\n\t\t <a href=\"javascript: delreply({$rid},{$tid});\">删除</a> \r\n\t\t <em><a href=\"javascript:reply({$tid}, '@{$name}:');\">回复</a></em>\r\n\t\t </li>"; echo $response; } // 删除回复. if ($action == 'delreply') { $rid = isset($_GET['rid']) ? intval($_GET['rid']) : null; $tid = isset($_GET['tid']) ? intval($_GET['tid']) : null; $Reply_Model = new Reply_Model(); if ($Reply_Model->delReply($rid) == 'n') { $Twitter_Model->updateReplyNum($tid, '-1'); } echo $tid; } // 隐藏回复. if ($action == 'hidereply') { $rid = isset($_GET['rid']) ? intval($_GET['rid']) : null; $tid = isset($_GET['tid']) ? intval($_GET['tid']) : null; $Reply_Model = new Reply_Model(); $Reply_Model->hideReply($rid); $Twitter_Model->updateReplyNum($tid, '-1'); } // 审核回复. if ($action == 'pubreply') { $rid = isset($_GET['rid']) ? intval($_GET['rid']) : null; $tid = isset($_GET['tid']) ? intval($_GET['tid']) : null; $Reply_Model = new Reply_Model(); $Reply_Model->pubReply($rid); $Twitter_Model->updateReplyNum($tid, '+1'); }