functionget_search_result($modelName){global $db,$request;!checkSqlStr($request['keyword'])? $request['keyword'] = $request['keyword'] :exit('非法字符'); $keyword =urldecode($request['keyword']);switch($modelName) {case'article': $sql ="SELECT * FROM ".TB_PREFIX."article WHERE title LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%' ORDER BY id DESC";break;case'list': $sql="SELECT * FROM ".TB_PREFIX."list WHERE title LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%' ORDER BY id DESC";break;case'product': $sql="SELECT * FROM ".TB_PREFIX."product WHERE title LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%' ORDER BY id DESC";break;case'download': $sql="SELECT * FROM ".TB_PREFIX."download WHERE title LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%' ORDER BY id DESC";break;case'picture': $sql="SELECT * FROM ".TB_PREFIX."picture WHERE title LIKE '%".$keyword."%' OR description LIKE '%".$keyword."%' ORDER BY id DESC";break;case'video': $sql="SELECT * FROM ".TB_PREFIX."video WHERE title LIKE '%".$keyword."%' OR description LIKE '%".$keyword."%' ORDER BY id DESC";break;case'jobs': $sql="SELECT * FROM ".TB_PREFIX."jobs WHERE lastTime>='".date('Y-m-d')."' AND (title LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%') ORDER BY id DESC";break;case'poll': $sql="SELECT * FROM ".TB_PREFIX."poll_category WHERE title LIKE '%".$keyword."%' ORDER BY id DESC";break;default: break; }return $db->get_results($sql);}