function dodefault() { global $firstcount, $pagenav; Admin::MP("menu_message"); $_GET['keywords'] && ($sql[] = " CONCAT(author,email,url,ip) REGEXP '{$_GET['keywords']}'"); isset($_GET['status']) && ($sql[] = " `status`='" . $_GET['status'] . "'"); $where = $sql ? ' where ' . implode(' AND ', (array) $sql) : ''; $maxperpage = (int) $_GET['perpage'] > 0 ? $_GET['perpage'] : 20; $total = iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__plugins_message` {$where} order by id DESC"); page($total, $maxperpage, "条留言"); $rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__plugins_message` {$where} order by id DESC LIMIT {$firstcount},{$maxperpage}"); $_count = count($rs); include plugin::acptpl(); }