參考網站
連動選單
script
//---引入Js //-----------------------------------------------------------
OP
//連動選單
case "get_ugm_search_class_json":
$get_ugm_search_class_json[] = get_ugm_search_class_json($_GET['_value']);
echo json_encode($get_ugm_search_class_json);
exit;
# ------------------------------------------------------------------------
//選項
function get_ugm_search_class_json($kind_sn="0"){
global $xoopsDB;
$sql = "select * from ".$xoopsDB->prefix("ugm_search_class")." where `kind_sn`='{$kind_sn}' order by `sn`";
$result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'],3, mysql_error());
//$opt[]="請選擇";
while(list($sn,$kind_sn,$title)=$xoopsDB->fetchRow($result)){
$opt[$sn]=$title;
}
return $opt;
}
html
$main=""._MA_UGMSEARCH_KIND_SN." " "._MA_UGMSEARCH_CLASS_SN."
沒有留言:
張貼留言