<?php
if (!defined('MOD')) die("access die");
$cupid = intval($_GET['cupid']);
$data = qbase::get_object('category', $channelid)->get();
$menus = array();
$start = 0;
foreach($data as &$val){
	if($val['cupid'] == 0 && $start == 1) break; 
	if($val['cupid'] == $cupid || $start == 1){
		$start = 1;
		$val['parent_url'] = qbase::GetCidHtmlDirType($channelid, $val['cid'], $val['ciddir'], $val['cfilename'], !($val['category_html'] || $val['pur_browse']));
		$val['preview_url'] = W_P . "admin/url.php?url=" . urlencode(W_P . "index.php?mod={$channelid}&ac={$_MODULE[$channel[$channelid][channelselect]]['user_list_php']}&cid={$val['cid']}&preview=1");
		$menus[] = $val;
	}
}
unset($val);

?>