示例#1
0
        $link[] = array('text' => $_LANG['back_list'], 'href' => 'category.php?act=list');
        sys_msg($_LANG['catedit_succed'], 0, $link);
    }
}
/*------------------------------------------------------ */
//-- 批量转移商品分类页面
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'move') {
    /* 权限检查 */
    admin_priv('cat_drop');
    $cat_id = !empty($_REQUEST['cat_id']) ? intval($_REQUEST['cat_id']) : 0;
    /* 模板赋值 */
    $smarty->assign('ur_here', $_LANG['move_goods']);
    $smarty->assign('action_link', array('href' => 'category.php?act=list', 'text' => $_LANG['03_category_list']));
    //$smarty->assign('cat_select', cat_list(0, $cat_id, true));
    $smarty->assign('cat_select', cat_list_2(0, $cat_id, true));
    $smarty->assign('form_act', 'move_cat');
    /* 显示页面 */
    assign_query_info();
    $smarty->display('category_move.htm');
}
/*------------------------------------------------------ */
//-- 处理批量转移商品分类的处理程序
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'move_cat') {
    /* 权限检查 */
    admin_priv('cat_drop');
    $cat_id = !empty($_POST['cat_id']) ? intval($_POST['cat_id']) : 0;
    $target_cat_id = !empty($_POST['target_cat_id']) ? intval($_POST['target_cat_id']) : 0;
    /* 商品分类不允许为空 */
    if ($cat_id == 0 || $target_cat_id == 0) {
示例#2
0
function get_sysnav()
{
    global $_LANG;
    /*
        $sysmain = array(
            array($_LANG['view_cart'],'flow.php'),
            array($_LANG['pick_out'],'pick_out.php'),
            array($_LANG['group_buy_goods'],'group_buy.php'),
            array($_LANG['snatch'],'snatch.php'),
            array($_LANG['tag_cloud'],'tag_cloud.php'),
            array($_LANG['user_center'],'user.php'),
            array($_LANG['wholesale'], 'wholesale.php'),
            array($_LANG['activity'], 'activity.php'),
            array($_LANG['myship'], 'myship.php'),
            array($_LANG['message_board'], 'message.php'),
            array($_LANG['quotation'], 'quotation.php'),
            );*/
    // $sysmain[] = array('-');
    //$catlist = array_merge(cat_list(0, 0, false), array('-'), article_cat_list(0, 0, false));
    $catlist = cat_list_2(0, 0, false);
    foreach ($catlist as $key => $val) {
        $val['view_name'] = $val['cat_name'];
        for ($i = 0; $i < $val['level']; $i++) {
            $val['view_name'] = '&nbsp;&nbsp;&nbsp;&nbsp;' . $val['view_name'];
        }
        $val['url'] = str_replace('&amp;', '&', $val['url']);
        $val['url'] = str_replace('&', '&amp;', $val['url']);
        $sysmain[] = array($val['cat_name'], $val['url'], $val['view_name']);
    }
    return $sysmain;
}