本文整理汇总了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') {
示例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']);
示例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();
示例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");
示例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);
}
示例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') {
示例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'));
示例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') {
示例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);
示例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']);
示例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");
示例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']));
示例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') {
示例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();
示例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']}'");