$key=UsualToolCMS::sqlcheck($_GET["key"]); $navname="search"; require_once(dirname(__FILE__).'/'.'mytop.php'); //搜索记录 if(!empty($key)): $asql="SELECT * FROM `cms_search` WHERE keyword ='$key'"; $adata=mysqli_query($mysqli,$asql); if(mysqli_num_rows($adata)>0): $mysqli->query("UPDATE `cms_search` SET `hit`=hit+1 WHERE keyword ='$key' and lang='$language'"); else: $mysqli->query("INSERT INTO `cms_search` (`lang`,`keyword`) VALUES ('$language','$key')");