コード例 #1
0
ファイル: group_buy.php プロジェクト: dlpc/ecshop
        $smarty->assign('if_agency', if_agency());
    }
    $smarty->assign('group_buy_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $sort_flag = sort_flag($list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    /* 显示商品列表页面 */
    assign_query_info();
    $smarty->display('group_buy_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $list = group_buy_list();
    /* 重写团购活动订单url */
    if (isset($list['item'][0]['admin_agency_id'])) {
        $url = and_agency_url($list['item'][0]['admin_agency_id']);
        $smarty->assign('url', $url);
    }
    /* 代理商列表 */
    $arr_res = agency_list();
    $GLOBALS['smarty']->assign('agency_list', $arr_res);
    /*判断代理商或管理员*/
    if (if_agency()) {
        $smarty->assign('if_agency', if_agency());
    }
    $smarty->assign('group_buy_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
    $sort_flag = sort_flag($list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
コード例 #2
0
ファイル: goods.php プロジェクト: dlpc/ecshop
    $smarty->assign('page_count', $goods_list['page_count']);
    $smarty->assign('full_page', 1);
    /* 排序标记 */
    $sort_flag = sort_flag($goods_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    /* 获取商品类型存在规格的类型 */
    $specifications = get_goods_type_specifications();
    $smarty->assign('specifications', $specifications);
    /*add by hg for date 2014-04-23 代理商列表 begin*/
    $smarty->assign('agency_list', agency_list());
    $smarty->assign('admin_agency_id', $admin_agency_id);
    $action_list = if_agency() ? 'all' : '';
    $smarty->assign('all', $action_list);
    /*end*/
    /* 重写预览链接 */
    $goods_url = and_agency_url() ? 'http://' . and_agency_url() : 'http://' . agency_url();
    $smarty->assign('url', $goods_url);
    /* 显示商品列表页面 */
    assign_query_info();
    $smarty->display('goods_special_list.htm');
} elseif ($_REQUEST['act'] == 'add' || $_REQUEST['act'] == 'edit' || $_REQUEST['act'] == 'special_edit' || $_REQUEST['act'] == 'copy') {
    //echo $_REQUEST['act'];
    include_once ROOT_PATH . 'includes/fckeditor/fckeditor.php';
    // 包含 html editor 类文件
    $smarty->assign('act', $_REQUEST['act']);
    /*add by hg for date 2014-03-26 判断代理商是否非法操作商品*/
    if ($_REQUEST['act'] == 'edit' || $_REQUEST['act'] == 'special_edit') {
        static_goods($_REQUEST['goods_id']);
        $smarty->assign('edit', 1);
    }
    /*end*/
コード例 #3
0
ファイル: article.php プロジェクト: dlpc/ecshop
    $smarty->assign('record_count', $article_list['record_count']);
    $smarty->assign('page_count', $article_list['page_count']);
    $sort_flag = sort_flag($article_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    assign_query_info();
    $smarty->display('article_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
    check_authz_json('article_manage');
    $article_list = get_articleslist();
    /*判断代理商或管理员*/
    if (if_agency()) {
        $smarty->assign('if_agency', if_agency());
    }
    /* 重写预览链接 */
    if (isset($article_list['arr'][0]['admin_agency_id'])) {
        $url = and_agency_url($article_list['arr'][0]['admin_agency_id']);
        if ($url) {
            $url = 'http://' . $url;
        }
        $smarty->assign('url', $url);
    }
    $smarty->assign('article_list', $article_list['arr']);
    $smarty->assign('filter', $article_list['filter']);
    $smarty->assign('record_count', $article_list['record_count']);
    $smarty->assign('page_count', $article_list['page_count']);
    $sort_flag = sort_flag($article_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('article_list.htm'), '', array('filter' => $article_list['filter'], 'page_count' => $article_list['page_count']));
}
/*------------------------------------------------------ */
//-- 添加文章