dsql = $GLOBALS['dsql']; } function TypeUnitSelector() { $this->__construct(); } //清理类 function Close() { } /** * 列出某一频道下的所有栏目 * * @access public * @param string $channel 频道ID * @return void */ function ListAllType($channel = 0) { global $cfg_admin_channel, $admin_catalogs, $targetid, $oldvalue; $oldvalues = array(); if (!empty($oldvalue)) $oldvalues = explode(',', $oldvalue); //检测用户有权限的顶级栏目 if ($cfg_admin_channel == 'array') { $admin_catalog = join(',', $admin_catalogs); $this->dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id IN($admin_catalog) GROUP BY reid "); $this->dsql->Execute(); $topidstr = ''; while ($row = $this->dsql->GetObject()) { if ($row->reid == 0) continue; $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid); } $admin_catalog .= ','.$topidstr; $admin_catalogs = explode(',', $admin_catalog); $admin_catalogs = array_unique($admin_catalogs); } $this->dsql->SetQuery("SELECT id,typedir,typename,ispart,channeltype FROM `#@__arctype` WHERE reid=0 ORDER BY sortrank"); $this->dsql->Execute(0); $lastid = GetCookie('lastCidMenu'); while ($row = $this->dsql->GetObject(0)) { if ($cfg_admin_channel == 'array' && !in_array($row->id, $admin_catalogs)) { continue; } $typeDir = $row->typedir; $typeName = $row->typename; $ispart = $row->ispart; $id = $row->id; $channeltype = $row->channeltype; $ischeck = in_array($id, $oldvalues) ? ' checked' : ''; $chackRadio = ""; if ($targetid == 'typeid2') $chackRadio = ""; if ((!empty($channel) && $channeltype != $channel) || $ispart != 0) { $chackRadio = ''; } $soncat = ''; $this->LogicListAllSunType($id, $channel, $soncat); if ($chackRadio == '' && $soncat == '') continue; echo "