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.

34 lines
772 B

2 years ago
<?php
require_once(MO_LIB_DIR . '/DBAction.class.php');
class ajaxAction extends Action {
public function getDefaultView() {
$db = DBAction::getInstance();
$request = $this->getContext()->getRequest();
$type = addslashes(trim($request->getParameter('type')));
$sql = "select id,name from lkt_software where type = '$type'";
$r = $db->select($sql);
foreach ($r as $key => $value) {
$res = '<option value="" >全部</option>';
foreach ($r as $key => $value) {
$res.= "<option value='{$value->id}'>{$value->name}</option>";
}
echo $res;
exit;
}
return;
}
public function execute(){
}
public function getRequestMethods(){
return Request :: NONE;
}
}
?>