本文整理汇总了PHP中kekezu::get_tree方法的典型用法代码示例。如果您正苦于以下问题:PHP kekezu::get_tree方法的具体用法?PHP kekezu::get_tree怎么用?PHP kekezu::get_tree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kekezu
的用法示例。
在下文中一共展示了kekezu::get_tree方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Keke_witkey_industry_class
$indus_table_obj = new Keke_witkey_industry_class();
$indus_obj = keke_table_class::get_instance("witkey_industry");
$file_obj = new keke_file_class();
$indus_arr = kekezu::get_industry(0);
isset($indus_id) and intval($indus_id) > 0 and $indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
empty($art_info) or extract($art_info);
if (isset($indus_id) && intval($indus_id) > o) {
$indus_info = $indus_obj->get_table_info('indus_id', $indus_id);
$indus_pid = $indus_info['indus_pid'];
}
if ($sbt_edit) {
$indus_table_obj->setWhere("indus_name = '" . $fs['indus_name'] . "'");
$res = $indus_table_obj->count_keke_witkey_industry();
!$pk && $res and kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, $_lang['indus_has']);
$fs['on_time'] = time();
isset($fs['is_recommend']) or $fs['is_recommend'] = 0;
isset($fs['totask']) or $fs['totask'] = 0;
isset($fs['togoods']) or $fs['togoods'] = 0;
$fs = kekezu::escape($fs);
$res = $indus_obj->save($fs, $pk);
$indus_info = $indus_obj->get_table_info('indus_id', $pk['indus_id']);
$url = "index.php?do=task&view=industry";
!$pk and kekezu::admin_system_log($_lang['add_industry']) or kekezu::admin_system_log($_lang['edit_industry'] . ':' . $indus_info['indus_name']);
$file_obj->delete_files(S_ROOT . "./data/data_cache/");
$file_obj->delete_files(S_ROOT . './data/tpl_c/');
$res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning');
}
$temp_arr = array();
kekezu::get_tree($indus_arr, $temp_arr, 'option', $indus_pid, 'indus_id');
$indus_arr = $temp_arr;
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view);
示例2: array
case "freeze":
$res = keke_task_config::task_freeze($task_id);
break;
case "unfreeze":
$res = keke_task_config::task_unfreeze($task_id);
break;
case "pass":
$res = keke_task_config::task_audit_pass(array($task_id));
break;
case "nopass":
$res = keke_task_config::task_audit_nopass($task_id);
break;
}
} else {
$process_arr = keke_task_config::can_operate($task_info['task_status'], $task_info['is_top']);
$file_list = db_factory::query(sprintf(" select * from %switkey_file where task_id='%d' and obj_type='task' ", TABLEPRE, $task_id));
$status_arr = sreward_task_class::get_task_status();
$payitem_list = keke_payitem_class::get_payitem_config('employer');
$indus_arr = $kekezu->_indus_arr;
$temp_arr = array();
$indus_option_arr = $indus_arr;
kekezu::get_tree($indus_option_arr, $temp_arr, "option", $task_info['indus_id']);
$indus_option_arr = $temp_arr;
}
if ($res) {
kekezu::admin_show_msg($_lang['task_operate_success'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'success');
}
} else {
require S_ROOT . '/task/' . $model_info['model_dir'] . '/admin/task_misc.php';
}
require $kekezu->_tpl_obj->template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_' . $op);
示例3: strval
strval($w[indus_name]) and $where .= " and indus_name like '%{$w['indus_name']}%'";
$ord[1] and $where .= " order by {$ord['0']} {$ord['1']}";
}
$indus_arr = kekezu::get_table_data("*", "witkey_industry", $where, "", "", "", "", 0);
sort($indus_arr);
if (!$w) {
$t_arr = array();
kekezu::get_tree($indus_arr, $t_arr, 'cat', NULL, 'indus_id', 'indus_pid', 'indus_name');
$indus_show_arr = $t_arr;
unset($t_arr);
} else {
$indus_show_arr = $indus_arr;
}
$temp_arr = array();
$indus_option_arr = kekezu::get_industry();
kekezu::get_tree($indus_option_arr, $temp_arr, "option", $w[indus_pid]);
$indus_option_arr = $temp_arr;
unset($temp_arr);
$indus_index_arr = kekezu::get_indus_by_index();
}
function sortTree($nodeid, $arTree)
{
$res = array();
for ($i = 0; $i < sizeof($arTree); $i++) {
if ($arTree[$i]["indus_pid"] == $nodeid) {
array_push($res, $arTree[$i]);
$subres = sortTree($arTree[$i]["indus_id"], $arTree);
for ($j = 0; $j < sizeof($subres); $j++) {
array_push($res, $subres[$j]);
}
}
示例4: while
}
$flag = $art_cat_arr[$slt_cat_id];
while ($flag['art_cat_pid']) {
$flag = $art_cat_arr[$flag['art_cat_pid']];
}
if ($hdn_art_cat_id) {
$art_cat_obj->setArt_cat_id($hdn_art_cat_id);
$art_index = $art_index . "{{$hdn_art_cat_id}}";
$art_cat_obj->setArt_index($art_index);
$res = $art_cat_obj->edit_keke_witkey_article_category();
if ($res) {
kekezu::admin_system_log($_lang['edit_article_cat'] . $txt_cat_name);
kekezu::admin_show_msg($_lang['edit_article_cat_success'], 'index.php?do=' . $do . '&view=' . $view . '&type=' . $type . '&art_cat_id=' . $hdn_art_cat_id, 3, '', 'success');
}
} else {
$res = $art_cat_obj->create_keke_witkey_article_category();
$art_index = $art_index . "{{$res}}";
if ($res) {
$art_cat_obj->setWhere("art_cat_id='{$res}'");
$art_cat_obj->setArt_index($art_index);
$art_cat_obj->edit_keke_witkey_article_category();
kekezu::admin_system_log($_lang['add_article_cat'] . $txt_cat_name);
kekezu::admin_show_msg($_lang['add_article_cat_success'], 'index.php?do=' . $do . '&view=cat_list&type=' . $type, 3, '', 'success');
}
}
}
$temp_arr = array();
kekezu::get_tree($art_cat_arr, $temp_arr, 'option', $art_cat_pid, 'art_cat_id', 'art_cat_pid', 'cat_name');
$cat_arr = $temp_arr;
unset($temp_arr);
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
示例5: array
case 'help':
kekezu::admin_check_role(42);
$art_cat_arr = kekezu::get_table_data('*', "witkey_article_category", "cat_type = 'help'", " art_cat_id desc", '', '', 'art_cat_id', null);
$where .= " and cat_type = 'help' ";
break;
case 'bulletin':
kekezu::admin_check_role(156);
$where .= " and cat_type = 'bulletin' ";
break;
case 'about':
kekezu::admin_check_role(157);
$where .= " and cat_type = 'about' ";
break;
}
$temp_arr = array();
kekezu::get_tree($art_cat_arr, $temp_arr, 'option', intval($w[art_cat_id]), 'art_cat_id', 'art_cat_pid', 'cat_name');
$cat_arr_list = $temp_arr;
unset($temp_arr);
$page_size and $page_size = intval($page_size) or $page_size = 10;
$page and $page = intval($page) or $page = 1;
$w[art_id] and $where .= " and art_id = " . intval($w[art_id]);
strval($w[art_title]) and $where .= " and art_title like '%{$w['art_title']}%'";
$w[art_cat_id] and $w[art_cat_id] = intval($w[art_cat_id]) and $where .= " and art_cat_id in (select art_cat_id from " . TABLEPRE . "witkey_article_category where art_index like '%{{$w[art_cat_id]}}%')";
strval($w[username]) and $where .= " and username like '%{$w['username']}%' ";
if ($type == 'about') {
$ord[0] && $ord[1] and $where .= ' order by ' . $ord[0] . ' ' . $ord[1] or $where .= " order by listorder asc,art_id desc ";
} else {
$ord[0] && $ord[1] and $where .= ' order by ' . $ord[0] . ' ' . $ord[1] or $where .= " order by art_id desc ";
}
$r = $table_obj->get_grid($where, $url, $page, $page_size, null, 1, 'ajax_dom');
$art_arr = $r[data];