本文整理汇总了PHP中menu::getAllChildId方法的典型用法代码示例。如果您正苦于以下问题:PHP menu::getAllChildId方法的具体用法?PHP menu::getAllChildId怎么用?PHP menu::getAllChildId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类menu
的用法示例。
在下文中一共展示了menu::getAllChildId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getValue
$ff_redirect_fail = "";
$iAdm = getValue("iAdm");
$ff_table = "admin_user";
$fs_redirect = base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php")));
$record_id = getValue("iAdm","int","GET");
$field_id = "adm_id";
$errorMsg = "";
$Action = getValue("Action","str","POST","");
$arelate_select = getValue("arelate_select","arr","POST",array());
$menuid = new menu();
$menuid->getArray("categories_multi","cat_id","cat_parent_id"," lang_id = " . $lang_id);
$adm_access_category = '';
foreach($arelate_select as $key=>$value){
$adm_access_category .= '[' . str_replace(",","][",$menuid->getAllChildId($value)) . ']';
}
//Call Class generate_form();
$myform = new generate_form();
$myform->add("adm_email","adm_email",2,0,"",1," Email không chính xác !",0,"");
$myform->add("adm_name","adm_name",0,0,"",0,"",0,"");
$myform->add("adm_phone","adm_phone",0,0,"",0,"",0,"");
$myform->add("adm_all_category","adm_all_category",1,0,0,0,"",0,"");
$myform->add("adm_access_category","adm_access_category",0,1,"",0,"",0,"");
$myform->add("adm_edit_all","adm_edit_all",1,0,0,0,"",0,"");
$myform->add("admin_id","admin_id",1,1,0,0,"",0,"");
$myform->addTable($fs_table);
示例2: IN
*/
if($iCat != 0 || $sCat != ''){
$sql = $iCat != 0 ? " AND cat_id = " . $iCat : " AND cat_name_rewrite = '" . $sCat . "'";
$db_cat = new db_query("SELECT cat_id, cat_parent_id, cat_type, cat_name, cat_name_rewrite, cat_link
FROM categories_multi
WHERE cat_active = 1" . $sql . "
");
if($row = mysql_fetch_assoc($db_cat->result)){
$module = $module == '' ? $row["cat_type"] : $module;
$iCat = $iCat == 0 ? $row['cat_id'] : $iCat;
$cat_cha = $menuid->getCatcha($iCat);
$cat_cha_level_2 = $menuid->getCatcha($iCat,2);
$cat_cha_level_3 = $menuid->getCatcha($iCat,3);
$sqlmenusub = " AND cat_id IN(" . $menuid->getAllChildId($cat_cha) . ")";
$listiCat = $menuid->getAllChildId($iCat);
$sqlcategory = " AND cat_id IN(" . $listiCat . ")";
$cat_child = count(explode(",",$listiCat)); // tinh so cap con
// Thay doi 3 the meta
if($iData == 0){
$con_site_title = $row['cat_name'];
$con_site_title .= $page != '' ? ' - Trang ' . $page : '';
$con_meta_description = $row['cat_name'];
$con_meta_keywords = $row['cat_name'];
} // End if($iData == 0)
// Redirect neu ten bai viet khong dung
if( ($iData == 0 || $sData == '') && $sCat != $row['cat_name_rewrite']){
$link_redirect = createLink('cat', array('dat_id' => $row['cat_id'], 'dat_rewrite' => $row['cat_name_rewrite']) );