コード例 #1
0
ファイル: virtual_goods.php プロジェクト: firsteam/falcons
            /* 修改商品库存 */
            if (update_goods_stock($goods_id, -$sum)) {
                //记录日志
                admin_log('', 'update', 'goods');
            }
            /* 返回 */
            sys_msg($_LANG['product_batch_del_success'], 0, $link);
        } else {
            /* 错误 */
            sys_msg($_LANG['cannot_found_products'], 1, $link);
        }
    }
    /* 返回 */
    sys_msg($_LANG['no_operation'], 1, $link);
} elseif ($_REQUEST['act'] == 'ajax_category') {
    $cat_list = cat_list1(0, $selected, false);
    $json = cat_list_to_json_string($cat_list, $goods['cat_id']);
    print $json;
}
/**
 * 列表链接
 * @param   bool    $is_add         是否添加(插入)
 * @param   string  $extension_code 虚拟商品扩展代码,实体商品为空
 * @param   int     $supp           是否入驻商商品,自营商品默认为空,增加此参数修改提示链接不正确
 * @return  array('href' => $href, 'text' => $text)
 */
function list_link($is_add = true, $extension_code = '', $supp = '')
{
    if (!empty($supp)) {
        $href = 'virtual_goods.php?act=list&extension_code=virtual_good&supp=1';
    } else {
コード例 #2
0
ファイル: category.php プロジェクト: firsteam/falcons
    $smarty->assign('form_act', 'move_cat');
    /* 显示页面 */
    assign_query_info();
    $smarty->display('category_move.htm');
}
/*------------------------------------------------------ */
//-- 批量转移虚拟商品分类页面
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'move_virtual') {
    /* 权限检查 */
    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=virtual_list', 'text' => $_LANG['04_category_list']));
    $smarty->assign('cat_select', cat_list1(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) {