function assign_sub_list($sel_ssid)
{
    global $smarty;
    $col_size = 4;
    $sid = empty($_REQUEST['sid']) ? 0 : intval($_REQUEST['sid']);
    $sub_list = get_stock_list($sid);
    array_unshift($sub_list, array('store_id' => '0', 'store_name' => '全部库房'));
    $sub_list_new = array();
    $i = 1;
    foreach ($sub_list as $key => $val) {
        $cur_scr = ceil($i / $col_size);
        $sub_list_new[$cur_scr][] = $val;
        if ($val['store_id'] == $sel_ssid) {
            $smarty->assign('sel_sub', $val);
        }
        $i++;
    }
    $sub_list = $sub_list_new;
    $sub_list_count = count($sub_list);
    $smarty->assign('sub_list_count', $sub_list_count);
    $smarty->assign('sub_list', $sub_list);
}
Exemple #2
0
            $integral = integral_to_give($order);
            log_account_change($order['user_id'], 0, 0, -1 * intval($integral['rank_points']), -1 * intval($integral['custom_points']), sprintf($_LANG['return_order_gift_integral'], $order['order_sn']));
            /* todo 计算并退回红包 */
            return_order_bonus($order_id);
        }
    }
    /* 清除缓存 */
    clear_cache_files();
    /* 操作成功 */
    $links[] = array('text' => $_LANG['delivery_sn'] . $_LANG['detail'], 'href' => 'order.php?act=delivery_info&delivery_id=' . $delivery_id);
    sys_msg($_LANG['act_ok'], 0, $links);
} elseif ($_REQUEST['act'] == 'back_list') {
    /* 检查权限 */
    admin_priv('back_view');
    /* 代码增加_start  By  morestock_morecity */
    get_stock_list();
    /* 代码增加_end  By  morestock_morecity */
    /* 查询 */
    $result = back_list();
    /* 模板赋值 */
    $smarty->assign('ur_here', $_LANG['10_back_order']);
    $smarty->assign('os_unconfirmed', OS_UNCONFIRMED);
    $smarty->assign('cs_await_pay', CS_AWAIT_PAY);
    $smarty->assign('cs_await_ship', CS_AWAIT_SHIP);
    $smarty->assign('full_page', 1);
    $smarty->assign('back_list', $result['back']);
    $smarty->assign('filter', $result['filter']);
    $smarty->assign('record_count', $result['record_count']);
    $smarty->assign('page_count', $result['page_count']);
    $smarty->assign('sort_update_time', '<img src="images/sort_desc.gif">');
    /* 显示模板 */
Exemple #3
0
<?php

require_once "database.php";
require_once "classes.php";
require_once "model.php";
if ($_REQUEST['do'] == 'stockList') {
    $letter = $_REQUEST['l'];
    $cap = $_REQUEST['cap'];
    $price = $_REQUEST['price'];
    $eps = $_REQUEST['eps'];
    $ppe = $_REQUEST['ppe'];
    if ($letter == "") {
        $letter = "a";
    }
    $stockTable = get_stock_list($letter, $cap, $price, $eps, $ppe);
    include 'html/stock_list.php';
} else {
    if ($_REQUEST['do'] == 'updateStockDetails') {
        $start = $_REQUEST['s'];
        if ($start == "") {
            $start = 0;
        }
        $query = mysql_query("SELECT ticker FROM stocks WHERE status = '" . STATUS_ACTIVE . "' LIMIT {$start},1");
        if (mysql_num_rows($query) < 1) {
            echo -1;
            return;
        }
        while ($array = mysql_fetch_array($query)) {
            update_stock_info($array['ticker']);
        }
        $start = $start + 1;