當前位置: 首頁>>代碼示例>>PHP>>正文


PHP exchange類代碼示例

本文整理匯總了PHP中exchange的典型用法代碼示例。如果您正苦於以下問題:PHP exchange類的具體用法?PHP exchange怎麽用?PHP exchange使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了exchange類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: define

 * ECSHOP 包裝管理程序
 * ============================================================================
 * * 版權所有 2005-2012 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: pack.php 17217 2011-01-19 06:29:08Z liubo $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
include_once ROOT_PATH . 'includes/cls_image.php';
$image = new cls_image($_CFG['bgcolor']);
$exc = new exchange($ecs->table("pack"), $db, 'pack_id', 'pack_name');
/*------------------------------------------------------ */
//-- 包裝列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $smarty->assign('ur_here', $_LANG['06_pack_list']);
    $smarty->assign('action_link', array('text' => $_LANG['pack_add'], 'href' => 'pack.php?act=add'));
    $smarty->assign('full_page', 1);
    $packs_list = packs_list();
    $smarty->assign('packs_list', $packs_list['packs_list']);
    $smarty->assign('filter', $packs_list['filter']);
    $smarty->assign('record_count', $packs_list['record_count']);
    $smarty->assign('page_count', $packs_list['page_count']);
    assign_query_info();
    $smarty->display('pack_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
開發者ID:zhendeguoke1008,項目名稱:ecshop,代碼行數:31,代碼來源:pack.php

示例2: define

/**
 * ECSHOP 管理中心拍賣活動管理
 * ============================================================================
 * * 版權所有 2005-2012 歐嘉科技,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: auction.php 17217 2011-01-19 06:29:08Z liubo $
 */
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require ROOT_PATH . 'includes/lib_goods.php';
$exc = new exchange($ecs->table('goods_activity'), $db, 'act_id', 'act_name');
/*------------------------------------------------------ */
//-- 活動列表頁
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    /* 檢查權限 */
    admin_priv('auction');
    /* 模板賦值 */
    $smarty->assign('full_page', 1);
    $smarty->assign('ur_here', $_LANG['auction_list']);
    $smarty->assign('action_link', array('href' => 'auction.php?act=add', 'text' => $_LANG['add_auction']));
    $list = auction_list();
    $smarty->assign('auction_list', $list['item']);
    $smarty->assign('filter', $list['filter']);
    $smarty->assign('record_count', $list['record_count']);
    $smarty->assign('page_count', $list['page_count']);
開發者ID:xiaoxiaowu007,項目名稱:jicai,代碼行數:31,代碼來源:auction.php

示例3: define

 * ============================================================================
 * * 版權所有 2005-2012 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: article.php 17217 2011-01-19 06:29:08Z liubo $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require_once ROOT_PATH . "includes/fckeditor/fckeditor.php";
require_once ROOT_PATH . 'includes/cls_image.php';
/*初始化數據交換對象 */
$exc = new exchange($ecs->table("article"), $db, 'article_id', 'title');
//$image = new cls_image();
/* 允許上傳的文件類型 */
$allow_file_types = '|GIF|JPG|PNG|BMP|SWF|DOC|XLS|PPT|MID|WAV|ZIP|RAR|PDF|CHM|RM|TXT|';
/*------------------------------------------------------ */
//-- 文章列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    /* 取得過濾條件 */
    $filter = array();
    $smarty->assign('cat_select', article_cat_list(0));
    $smarty->assign('ur_here', $_LANG['03_article_list']);
    $smarty->assign('action_link', array('text' => $_LANG['article_add'], 'href' => 'article.php?act=add'));
    $smarty->assign('full_page', 1);
    $smarty->assign('filter', $filter);
    $article_list = get_articleslist();
開發者ID:norain2050,項目名稱:mhFault,代碼行數:31,代碼來源:article.php

示例4: define

/**
 * ECSHOP 會員等級管理程序
 * ============================================================================
 * 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: testyang $
 * $Id: reg_fields.php 15013 2008-10-23 09:31:42Z testyang $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
$exc = new exchange($ecs->table("reg_fields"), $db, 'id', 'reg_field_name');
/*------------------------------------------------------ */
//-- 會員注冊項列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $fields = array();
    $fields = $db->getAll("SELECT * FROM " . $ecs->table('reg_fields') . " ORDER BY dis_order, id");
    $smarty->assign('ur_here', $_LANG['021_reg_fields']);
    $smarty->assign('action_link', array('text' => $_LANG['add_reg_field'], 'href' => 'reg_fields.php?act=add'));
    $smarty->assign('full_page', 1);
    $smarty->assign('reg_fields', $fields);
    assign_query_info();
    $smarty->display('reg_fields.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $fields = array();
    $fields = $db->getAll("SELECT * FROM " . $ecs->table('reg_fields') . "ORDER BY id");
開發者ID:BGCX262,項目名稱:zuyii-svn-to-git,代碼行數:30,代碼來源:reg_fields.php

示例5: define

<?php

/**
 * ECSHOP 入庫管理 程序文件
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require_once ROOT_PATH . 'includes/cls_image.php';
/*初始化數據交換對象 */
$exc = new exchange($ecs->table("store_inout_list"), $db, 'rec_id', 'inout_sn');
/*  AJAX獲取庫房管理員 */
if ($_REQUEST['act'] == 'get_store_admin') {
    require ROOT_PATH . 'includes/cls_json.php';
    $json = new JSON();
    $opt['error'] = 0;
    $store_id = empty($_GET['store_id']) ? '0' : trim($_GET['store_id']);
    $sql = "select admin_name, admin_id  from " . $ecs->table('store_adminer') . " where store_id = '{$store_id}' ";
    $admin_row = $db->getRow($sql);
    if (!$admin_row) {
        $opt['error'] = 1;
        $opt['admin_name'] = '';
        $opt['admin_id'] = '';
    } else {
        $opt['admin_name'] = $admin_row['admin_name'];
        $opt['admin_id'] = $admin_row['admin_id'];
    }
    $sql = "select rec_id from " . $ecs->table('store_adminer') . " where admin_id='{$_SESSION['admin_id']}' and store_id = '{$store_id}' ";
    $rec_id = $db->getOne($sql);
    $opt['admin_isme'] = $rec_id ? '1' : '0';
    echo $json->encode($opt);
}
開發者ID:moonlight-wang,項目名稱:feilun,代碼行數:31,代碼來源:store_inout_in.php

示例6: define

 * ECSHOP 管理中心品牌管理
 * ============================================================================
 * 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liuhui $
 * $Id: brand.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
include_once ROOT_PATH . 'includes/cls_image.php';
$image = new cls_image($_CFG['bgcolor']);
$exc = new exchange($ecs->table("brand"), $db, 'brand_id', 'brand_name');
/*------------------------------------------------------ */
//-- 品牌列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $smarty->assign('ur_here', $_LANG['06_goods_brand_list']);
    $smarty->assign('action_link', array('text' => $_LANG['07_brand_add'], 'href' => 'brand.php?act=add'));
    $smarty->assign('full_page', 1);
    $brand_list = get_brandlist();
    $smarty->assign('brand_list', $brand_list['brand']);
    $smarty->assign('filter', $brand_list['filter']);
    $smarty->assign('record_count', $brand_list['record_count']);
    $smarty->assign('page_count', $brand_list['page_count']);
    assign_query_info();
    $smarty->display('brand_list.htm');
} elseif ($_REQUEST['act'] == 'add') {
開發者ID:dw250100785,項目名稱:ECShop-1,代碼行數:31,代碼來源:brand.php

示例7: define

/**
 * ECSHOP 會員等級管理程序
 * ============================================================================
 * 版權所有 2005-2010 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liuhui $
 * $Id: user_rank.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
$exc = new exchange($ecs->table("user_rank"), $db, 'rank_id', 'rank_name');
$exc_user = new exchange($ecs->table("users"), $db, 'user_rank', 'user_rank');
/*------------------------------------------------------ */
//-- 會員等級列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $ranks = array();
    $ranks = $db->getAll("SELECT * FROM " . $ecs->table('user_rank'));
    $smarty->assign('ur_here', $_LANG['05_user_rank_list']);
    $smarty->assign('action_link', array('text' => $_LANG['add_user_rank'], 'href' => 'user_rank.php?act=add'));
    $smarty->assign('full_page', 1);
    $smarty->assign('user_ranks', $ranks);
    assign_query_info();
    $smarty->display('user_rank.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $ranks = array();
    $ranks = $db->getAll("SELECT * FROM " . $ecs->table('user_rank'));
開發者ID:dw250100785,項目名稱:ECShop-1,代碼行數:31,代碼來源:user_rank.php

示例8: define

 * ECSHOP 供貨商等級管理程序
 * ============================================================================
 * * 版權所有 2005-2012 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.68ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: 68ecshop $
 * $Id: user_rank.php 17217 2011-01-19 06:29:08Z 68ecshop $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/supplier.php';
$smarty->assign('lang', $_LANG);
$exc = new exchange($ecs->table("supplier_rank"), $db, 'rank_id', 'rank_name');
$exc_user = new exchange($ecs->table("supplier"), $db, 'user_rank', 'user_rank');
/*------------------------------------------------------ */
//-- 會員等級列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    admin_priv('supplier_rank');
    $ranks = array();
    $ranks = $db->getAll("SELECT * FROM " . $ecs->table('supplier_rank') . " order by sort_order ");
    $smarty->assign('ur_here', $_LANG['supplier_rank_list']);
    $smarty->assign('action_link', array('text' => $_LANG['add_supplier_rank'], 'href' => 'supplier_rank.php?act=add'));
    $smarty->assign('full_page', 1);
    $smarty->assign('user_ranks', $ranks);
    assign_query_info();
    $smarty->display('supplier_rank.htm');
} elseif ($_REQUEST['act'] == 'query') {
開發者ID:firsteam,項目名稱:falcons,代碼行數:31,代碼來源:supplier_rank.php

示例9: define

<?php

define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require_once ROOT_PATH . '/' . ADMIN_PATH . '/includes/lib_goods.php';
include_once ROOT_PATH . '/includes/cls_image.php';
$image = new cls_image($_CFG['bgcolor']);
$exc = new exchange($ecs->table('goods'), $db, 'goods_id', 'goods_name');
if ($_REQUEST['act'] == 'list' || $_REQUEST['act'] == 'trash') {
    //print_r($_SESSION);die;
    $cat_id = empty($_REQUEST['cat_id']) ? 0 : intval($_REQUEST['cat_id']);
    $code = empty($_REQUEST['extension_code']) ? '' : trim($_REQUEST['extension_code']);
    if (!$code) {
        admin_priv('remove_back');
    }
    $suppliers_id = isset($_REQUEST['suppliers_id']) ? empty($_REQUEST['suppliers_id']) ? '' : trim($_REQUEST['suppliers_id']) : '';
    $is_on_sale = isset($_REQUEST['is_on_sale']) ? empty($_REQUEST['is_on_sale']) && $_REQUEST['is_on_sale'] === 0 ? '' : trim($_REQUEST['is_on_sale']) : '';
    $handler_list = array();
    $handler_list['virtual_card'][] = array('url' => 'virtual_card.php?act=card', 'title' => $_LANG['card'], 'img' => 'icon_send_bonus.gif');
    $handler_list['virtual_card'][] = array('url' => 'virtual_card.php?act=replenish', 'title' => $_LANG['replenish'], 'img' => 'icon_add.gif');
    $handler_list['virtual_card'][] = array('url' => 'virtual_card.php?act=batch_card_add', 'title' => $_LANG['batch_card_add'], 'img' => 'icon_output.gif');
    if ($_REQUEST['act'] == 'list' && isset($handler_list[$code])) {
        $smarty->assign('add_handler', $handler_list[$code]);
    }
    /* 供貨商名 */
    $suppliers_list_name = suppliers_list_name();
    $suppliers_exists = 1;
    if (empty($suppliers_list_name)) {
        $suppliers_exists = 0;
    }
    $smarty->assign('is_on_sale', $is_on_sale);
開發者ID:dlpc,項目名稱:ecshop,代碼行數:31,代碼來源:goods_stock_control.php

示例10: define

/**
 * NISHOP 管理中心優惠活動管理
 * ============================================================================
 * * 版權所有 2005-2012 上海吟澤信息技術有限公司,並保留所有權利。
 * 網站地址: http://http://www.nirvanainfo.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: favourable.php 17217 2011-01-19 06:29:08Z liubo $
 */
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require ROOT_PATH . 'includes/lib_goods.php';
$exc = new exchange($ecs->table('favourable_activity'), $db, 'act_id', 'act_name');
/*------------------------------------------------------ */
//-- 活動列表頁
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    admin_priv('favourable');
    /* 模板賦值 */
    $smarty->assign('full_page', 1);
    $smarty->assign('ur_here', $_LANG['favourable_list']);
    $smarty->assign('action_link', array('href' => 'favourable.php?act=add', 'text' => $_LANG['add_favourable']));
    $list = favourable_list();
    $smarty->assign('favourable_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']);
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:31,代碼來源:favourable.php

示例11: define

 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liuhui $
 * $Id: privilege.php 17063 2010-03-25 06:35:46Z liuhui $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
/* act操作項的初始化 */
if (empty($_REQUEST['act'])) {
    $_REQUEST['act'] = 'login';
} else {
    $_REQUEST['act'] = trim($_REQUEST['act']);
}
/* 初始化 $exc 對象 */
$exc = new exchange($ecs->table("admin_user"), $db, 'user_id', 'user_name');
/*------------------------------------------------------ */
//-- 退出登錄
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'logout') {
    /* 清除cookie */
    setcookie('ECSCP[admin_id]', '', 1);
    setcookie('ECSCP[admin_pass]', '', 1);
    $sess->destroy_session();
    $_REQUEST['act'] = 'login';
}
/*------------------------------------------------------ */
//-- 登陸界麵
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'login') {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
開發者ID:noikiy,項目名稱:mdwp,代碼行數:31,代碼來源:privilege.php

示例12: dirname

<?php

/**
 * Employee Management
 * @copyright Copyright (c) 2012, 21cake food co.ltd
 * @author 21Cake Dev Team
 */
require dirname(__FILE__) . '/includes/init.php';
$_REQUEST['act'] = empty($_REQUEST['act']) ? 'list' : trim($_REQUEST['act']);
$act = array('list', 'site', 'query', 'add', 'insert', 'edit', 'update', 'remove');
$excg = new exchange('hr_employees', $db_write, 'id', 'name');
$city_code = db_create_in(array_keys($_SESSION['city_arr']));
if (in_array($_REQUEST['act'], $act)) {
    switch ($_REQUEST['act']) {
        case 'site':
            include_once ROOT_PATH . 'includes/cls_json.php';
            $json = new JSON();
            $city_code = !empty($_REQUEST['city_code']) ? " IN ('" . intval($_REQUEST['city_code']) . "') " : db_create_in(array_keys($_SESSION['city_arr']));
            $sql = "SELECT station_id,station_name FROM ship_station WHERE city_code {$city_code}";
            $site = $db_read->getAll($sql);
            $arr['target'] = !empty($_REQUEST['station']) ? htmlspecialchars(stripslashes(trim($_REQUEST['station']))) : '';
            $arr['site'] = $site;
            echo $json->encode($arr);
            break;
        case 'query':
            $employee_list = get_employee_list();
            $smarty->assign('employee_list', $employee_list['list']);
            $smarty->assign('filter', $employee_list['filter']);
            $smarty->assign('record_count', $employee_list['record_count']);
            $smarty->assign('page_count', $employee_list['page_count']);
            make_json_result($smarty->fetch('employee_list.htm'), '', array('filter' => $employee_list['filter'], 'page_count' => $employee_list['page_count']));
開發者ID:songtaiwu,項目名稱:mordercms,代碼行數:31,代碼來源:employee.php

示例13: define

<?php

define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
include_once ROOT_PATH . 'includes/cls_image.php';
$image = new cls_image($_CFG['bgcolor']);
$exc = new exchange($ecs->table("card"), $db, 'card_id', 'card_name');
/*------------------------------------------------------ */
//-- 包裝列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    assign_query_info();
    $smarty->assign('ur_here', $_LANG['07_card_list']);
    $smarty->assign('action_link', array('text' => $_LANG['card_add'], 'href' => 'card.php?act=add'));
    $smarty->assign('full_page', 1);
    $cards_list = cards_list();
    $smarty->assign('card_list', $cards_list['card_list']);
    $smarty->assign('filter', $cards_list['filter']);
    $smarty->assign('record_count', $cards_list['record_count']);
    $smarty->assign('page_count', $cards_list['page_count']);
    $smarty->display('card_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
    $cards_list = cards_list();
    $smarty->assign('card_list', $cards_list['card_list']);
    $smarty->assign('filter', $cards_list['filter']);
    $smarty->assign('record_count', $cards_list['record_count']);
    $smarty->assign('page_count', $cards_list['page_count']);
    $sort_flag = sort_flag($cards_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('card_list.htm'), '', array('filter' => $cards_list['filter'], 'page_count' => $cards_list['page_count']));
} elseif ($_REQUEST['act'] == 'remove') {
開發者ID:duynhan07,項目名稱:ecshop-vietnam,代碼行數:31,代碼來源:card.php

示例14: define

 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: bonus.php 17217 2011-01-19 06:29:08Z liubo $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
/* act操作項的初始化 */
if (empty($_REQUEST['act'])) {
    $_REQUEST['act'] = 'list';
} else {
    $_REQUEST['act'] = trim($_REQUEST['act']);
}
/* 初始化$exc對象 */
$exc = new exchange($ecs->table('bonus_type'), $db, 'type_id', 'type_name');
/*------------------------------------------------------ */
//-- 紅包類型列表頁麵
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $smarty->assign('ur_here', $_LANG['04_bonustype_list']);
    $smarty->assign('action_link', array('text' => $_LANG['bonustype_add'], 'href' => 'bonus.php?act=add'));
    $smarty->assign('full_page', 1);
    $list = get_type_list();
    $smarty->assign('type_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();
開發者ID:norain2050,項目名稱:mhFault,代碼行數:31,代碼來源:bonus.php

示例15: define

/**
 * ECSHOP 配送區域管理程序
 * ============================================================================
 * * 版權所有 2005-2012 上海商派網絡科技有限公司,並保留所有權利。
 * 網站地址: http://www.ecshop.com;
 * ----------------------------------------------------------------------------
 * 這不是一個自由軟件!您隻能在不用於商業目的的前提下對程序代碼進行修改和
 * 使用;不允許對程序代碼以任何形式任何目的的再發布。
 * ============================================================================
 * $Author: liubo $
 * $Id: shipping_area.php 17217 2011-01-19 06:29:08Z liubo $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
$exc = new exchange($ecs->table('shipping_area'), $db, 'shipping_area_id', 'shipping_area_name');
/*------------------------------------------------------ */
//-- 配送區域列表
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'list') {
    $shipping_id = intval($_REQUEST['shipping']);
    $list = get_shipping_area_list($shipping_id);
    $smarty->assign('areas', $list);
    $smarty->assign('ur_here', '<a href="shipping.php?act=list">' . $_LANG['03_shipping_list'] . '</a> - ' . $_LANG['shipping_area_list'] . '</a>');
    $smarty->assign('action_link', array('href' => 'shipping_area.php?act=add&shipping=' . $shipping_id, 'text' => $_LANG['new_area']));
    $smarty->assign('full_page', 1);
    assign_query_info();
    $smarty->display('shipping_area_list.htm');
} elseif ($_REQUEST['act'] == 'add' && !empty($_REQUEST['shipping'])) {
    admin_priv('shiparea_manage');
    $shipping = $db->getRow("SELECT shipping_name, shipping_code FROM " . $ecs->table('shipping') . " WHERE shipping_id='{$_REQUEST['shipping']}'");
開發者ID:Ryan007,項目名稱:mybb,代碼行數:30,代碼來源:shipping_area.php


注:本文中的exchange類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。