0 '; $cat_children = $catid ? get_children($catid) : ''; $where .= $catid ? ' AND ' . $cat_children : ''; $where .= $keywords ? ' AND (title LIKE \'%' . $keywords . '%\' OR content LIKE \'%' . $keywords . '%\') ' : ''; $param = setparams(array('mod', 'keywords')); $rows_num = $db->getOne('SELECT COUNT(a.id) FROM `' . $db_mymps . 'information` AS a ' . $where); $totalpage = ceil($rows_num / $perpage); $num = intval($page - 1) * $perpage; $info_list = $db->getAll('SELECT a.* FROM `' . $db_mymps . 'information` AS a ' . $where . ' ORDER BY a.id DESC LIMIT ' . $num . ',' . $perpage); $pageview = pager(); include mymps_tpl('search'); ?>