getContext()->getRequest();
$kw = addslashes(trim($request -> getParameter('keyword')));
$countsql = 'select count(keyword) from lkt_hotkeywords';
$count = $db -> selectarray($countsql);
list($count) = $count;
$count = intval($count['count(keyword)']);
if($count >= 6){
header("Content-type:text/html;charset=utf-8");
echo "";die;
}
if($kw !== '') {
$sql = 'insert into lkt_hotkeywords(keyword) values("' . $kw . '");';
$res = $db->insert($sql);
if ($res > 0) {
header("Content-type:text/html;charset=utf-8");
echo "";
} else {
header("Content-type:text/html;charset=utf-8");
echo "";
}
}
return;
}
public function getRequestMethods(){
return Request :: POST;
}
}
?>