<form name="search" action="/plus/search.php"> <input type="hidden" name="typeid" value="1,2,3"> </form> |
$typeid = (isset($typeid) && is_numeric($typeid)) ? $typeid : 0; |
$typeid = intval($typeid); |
$ksqls[] = " typeid IN (".GetSonIds($this->TypeID).") "; |
//指定了多个栏目时 if( preg_match('#,#', $this->TypeID) ) { $typeids = explode(',', $this->TypeID); foreach($typeids as $ttid) { $typeidss[] = GetSonIds($ttid); } $typeidStr = join(',', $typeidss); $typeidss = explode(',', $typeidStr); $typeidssok = array_unique($typeidss); $typeid = join(',', $typeidssok); $ksqls[] = " arc.typeid IN ($typeid) "; } else { $ksqls[] = " arc.typeid IN (".GetSonIds($this->TypeID).") "; } |