You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
<?php
|
|
|
|
/**
|
|
|
|
* [Laike System] Copyright (c) 2017-2020 laiketui.com
|
|
|
|
* Laike is not a free software, it under the license terms, visited http://www.laiketui.com/ for more details.
|
|
|
|
*/
|
|
require_once(MO_LIB_DIR . '/DBAction.class.php');
|
|
|
|
class delAction extends Action {
|
|
|
|
public function getDefaultView() {
|
|
$db = DBAction::getInstance();
|
|
$request = $this->getContext()->getRequest();
|
|
// 获取分类id
|
|
$cat_id = intval($request->getParameter('cat_id'));
|
|
// 根据分类id,删除这条数据
|
|
$sql = "delete from lkt_news_class where cat_id = '$cat_id'";
|
|
$db->delete($sql);
|
|
|
|
header("Content-type:text/html;charset=utf-8");
|
|
echo "<script type='text/javascript'>" .
|
|
"alert('删除成功!');" .
|
|
"location.href='index.php?module=newsclass';</script>";
|
|
return;
|
|
}
|
|
|
|
public function execute(){
|
|
return $this->getDefaultView();
|
|
}
|
|
|
|
public function getRequestMethods(){
|
|
return Request :: NONE;
|
|
}
|
|
}
|
|
?>
|