当前位置: 首页>>代码示例>>PHP>>正文


PHP exchange::is_only方法代码示例

本文整理汇总了PHP中exchange::is_only方法的典型用法代码示例。如果您正苦于以下问题:PHP exchange::is_only方法的具体用法?PHP exchange::is_only怎么用?PHP exchange::is_only使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在exchange的用法示例。


在下文中一共展示了exchange::is_only方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: intval

    /* 权限判断 */
    admin_priv('store_inout_type');
    $in_out = !empty($_REQUEST['in_out']) ? intval($_REQUEST['in_out']) : 0;
    $smarty->assign('ur_here', $_LANG['type_out_add' . $in_out]);
    $smarty->assign('action_link', array('text' => $_LANG['store_inout_type' . $in_out], 'href' => 'store_inout_type.php?act=list&in_out=' . $in_out));
    $smarty->assign('form_action', 'insert');
    $smarty->assign('in_out', $in_out);
    assign_query_info();
    $smarty->assign('type', array('is_valid' => 1));
    $smarty->display('store_inout_type_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    /*检查类型名是否重复*/
    admin_priv('store_inout_type');
    $is_valid = isset($_REQUEST['is_valid']) ? intval($_REQUEST['is_valid']) : 0;
    $in_out = isset($_REQUEST['in_out']) ? intval($_REQUEST['in_out']) : 0;
    $is_only = $exc->is_only('type_name', $_POST['type_name'], 0, "in_out=" . $in_out . " and supplier_id=" . $_SESSION['supplier_id']);
    if (!$is_only) {
        sys_msg(sprintf($_LANG['typename_exist'], stripslashes($_POST['type_name'])), 1);
    }
    /*插入数据*/
    $sql = "INSERT INTO " . $ecs->table('store_inout_type') . "(type_name,  is_valid, in_out, supplier_id, store_type_id) " . "VALUES ('{$_POST['type_name']}',  '{$is_valid}' , '{$in_out}', '{$_SESSION['supplier_id']}', '{$_REQUEST['storetypeid']}')";
    $db->query($sql);
    /* 清除缓存 */
    clear_cache_files();
    $link[0]['text'] = $_LANG['continue_add'];
    $link[0]['href'] = 'store_inout_type.php?act=add&in_out=' . $in_out;
    $link[1]['text'] = $_LANG['back_list'];
    $link[1]['href'] = 'store_inout_type.php?act=list&in_out=' . $in_out;
    sys_msg($_LANG['typeadd_succed'], 0, $link);
} elseif ($_REQUEST['act'] == 'edit') {
    /* 权限判断 */
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:store_inout_type.php

示例2: array

    $rank['discount'] = 100;
    $form_action = 'insert';
    $smarty->assign('rank', $rank);
    $smarty->assign('ur_here', $_LANG['add_user_rank']);
    $smarty->assign('action_link', array('text' => $_LANG['05_user_rank_list'], 'href' => 'user_rank.php?act=list'));
    $smarty->assign('ur_here', $_LANG['add_user_rank']);
    $smarty->assign('form_action', $form_action);
    assign_query_info();
    $smarty->display('user_rank_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    admin_priv('user_rank');
    $special_rank = isset($_POST['special_rank']) ? intval($_POST['special_rank']) : 0;
    $_POST['min_points'] = empty($_POST['min_points']) ? 0 : intval($_POST['min_points']);
    $_POST['max_points'] = empty($_POST['max_points']) ? 0 : intval($_POST['max_points']);
    /* 检查是否存在重名的会员等级 */
    if (!$exc->is_only('rank_name', trim($_POST['rank_name']))) {
        sys_msg(sprintf($_LANG['rank_name_exists'], trim($_POST['rank_name'])), 1);
    }
    /* 非特殊会员组检查积分的上下限是否合理 */
    if ($_POST['min_points'] >= $_POST['max_points'] && $special_rank == 0) {
        sys_msg($_LANG['js_languages']['integral_max_small'], 1);
    }
    /* 特殊等级会员组不判断积分限制 */
    if ($special_rank == 0) {
        /* 检查下限制有无重复 */
        if (!$exc->is_only('min_points', intval($_POST['min_points']))) {
            sys_msg(sprintf($_LANG['integral_min_exists'], intval($_POST['min_points'])));
        }
    }
    /* 特殊等级会员组不判断积分限制 */
    if ($special_rank == 0) {
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:31,代码来源:user_rank.php

示例3: array

    $smarty->assign('article', $article);
    $smarty->assign('cat_select', article_cat_list(0));
    $smarty->assign('ur_here', $_LANG['article_add']);
    $smarty->assign('action_link', array('text' => $_LANG['03_article_list'], 'href' => 'article.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('article_info.htm');
}
/*------------------------------------------------------ */
//-- 添加文章
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'insert') {
    /* 权限判断 */
    admin_priv('article_manage');
    /*检查是否重复*/
    $is_only = $exc->is_only('title', $_POST['title'], 0, " cat_id ='{$_POST['article_cat']}'");
    if (!$is_only) {
        sys_msg(sprintf($_LANG['title_exist'], stripslashes($_POST['title'])), 1);
    }
    /* 取得文件地址 */
    $file_url = '';
    if (isset($_FILES['file']['error']) && $_FILES['file']['error'] == 0 || !isset($_FILES['file']['error']) && isset($_FILES['file']['tmp_name']) && $_FILES['file']['tmp_name'] != 'none') {
        // 检查文件格式
        if (!check_file_type($_FILES['file']['tmp_name'], $_FILES['file']['name'], $allow_file_types)) {
            sys_msg($_LANG['invalid_file']);
        }
        // 复制文件
        $res = upload_article_file($_FILES['file']);
        if ($res != false) {
            $file_url = $res;
        }
开发者ID:norain2050,项目名称:mhFault,代码行数:31,代码来源:article.php

示例4: array

    $goods['option'] = '<option value="0">' . $_LANG['make_option'] . '</option>';
    $smarty->assign('goods', $goods);
    $smarty->assign('ur_here', $_LANG['exchange_goods_add']);
    $smarty->assign('action_link', array('text' => $_LANG['15_exchange_goods_list'], 'href' => 'exchange_goods.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('exchange_goods_info.htm');
}
/*------------------------------------------------------ */
//-- 添加商品
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'insert') {
    /* 权限判断 */
    admin_priv('exchange_goods');
    /*检查是否重复*/
    $is_only = $exc->is_only('goods_id', $_POST['goods_id'], 0, " goods_id ='{$_POST['goods_id']}'");
    if (!$is_only) {
        sys_msg($_LANG['goods_exist'], 1);
    }
    /*插入数据*/
    $add_time = gmtime();
    if (empty($_POST['goods_id'])) {
        $_POST['goods_id'] = 0;
    }
    $sql = "INSERT INTO " . $ecs->table('exchange_goods') . "(goods_id, exchange_integral, is_exchange, is_hot) " . "VALUES ('{$_POST['goods_id']}', '{$_POST['exchange_integral']}', '{$_POST['is_exchange']}', '{$_POST['is_hot']}')";
    $db->query($sql);
    $link[0]['text'] = $_LANG['continue_add'];
    $link[0]['href'] = 'exchange_goods.php?act=add';
    $link[1]['text'] = $_LANG['back_list'];
    $link[1]['href'] = 'exchange_goods.php?act=list';
    admin_log($_POST['goods_id'], 'add', 'exchange_goods');
开发者ID:muqidi,项目名称:PHP,代码行数:31,代码来源:exchange_goods.php

示例5: elseif

    assign_query_info();
    $smarty->display('brand_list.htm');
} elseif ($_REQUEST['act'] == 'add') {
    /* 权限判断 */
    admin_priv('brand_manage');
    $smarty->assign('ur_here', $_LANG['07_brand_add']);
    $smarty->assign('action_link', array('text' => $_LANG['06_goods_brand_list'], 'href' => 'brand.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->assign('brand', array('sort_order' => 50, 'is_show' => 1));
    $smarty->display('brand_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    /*检查品牌名是否重复*/
    admin_priv('brand_manage');
    $is_show = isset($_REQUEST['is_show']) ? intval($_REQUEST['is_show']) : 0;
    $is_only = $exc->is_only('brand_name', $_POST['brand_name']);
    if (!$is_only) {
        sys_msg(sprintf($_LANG['brandname_exist'], stripslashes($_POST['brand_name'])), 1);
    }
    /*对描述处理*/
    if (!empty($_POST['brand_desc'])) {
        $_POST['brand_desc'] = $_POST['brand_desc'];
    }
    /*处理图片*/
    $img_name = basename($image->upload_image($_FILES['brand_logo'], 'brandlogo'));
    /*处理URL*/
    $site_url = sanitize_url($_POST['site_url']);
    /*插入数据*/
    $sql = "INSERT INTO " . $ecs->table('brand') . "(brand_name, site_url, brand_desc, brand_logo, is_show, sort_order) " . "VALUES ('{$_POST['brand_name']}', '{$site_url}', '{$_POST['brand_desc']}', '{$img_name}', '{$is_show}', '{$_POST['sort_order']}')";
    $db->query($sql);
    admin_log($_POST['brand_name'], 'add', 'brand');
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:31,代码来源:brand.php

示例6: array

    /* 检查权限 */
    admin_priv('admin_manage');
    /* 模板赋值 */
    $smarty->assign('ur_here', $_LANG['admin_add']);
    $smarty->assign('action_link', array('href' => 'privilege.php?act=list', 'text' => $_LANG['admin_list']));
    $smarty->assign('form_act', 'insert');
    $smarty->assign('action', 'add');
    $smarty->assign('select_role', get_role_list());
    /* 显示页面 */
    assign_query_info();
    $smarty->display('privilege_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    admin_priv('admin_manage');
    /* 判断管理员是否已经存在 */
    if (!empty($_POST['user_name'])) {
        $is_only = $exc->is_only('user_name', stripslashes($_POST['user_name']));
        if (!$is_only) {
            sys_msg(sprintf($_LANG['user_name_exist'], stripslashes($_POST['user_name'])), 1);
        }
    }
    /* Email地址是否有重复 */
    if (!empty($_POST['email'])) {
        $is_only = $exc->is_only('email', stripslashes($_POST['email']));
        if (!$is_only) {
            sys_msg(sprintf($_LANG['email_exist'], stripslashes($_POST['email'])), 1);
        }
    }
    /* 获取添加日期及密码 */
    $add_time = gmtime();
    $password = md5($_POST['password']);
    $role_id = '';
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:privilege.php

示例7: array

    } else {
        $selected = $_REQUEST['cat_id'];
    }
    $cat_list = article_cat_list($selected, true, 'cat_id', 0);
    $cat_list = str_replace('select please', $_LANG['select_plz'], $cat_list);
    $smarty->assign('cat_list', $cat_list);
    $smarty->assign('ur_here', $_LANG['article_add']);
    $smarty->assign('action_link', array('text' => $_LANG['cat_list'], 'href' => 'shophelp.php?act=list_cat'));
    $smarty->assign('form_action', 'insert');
    $smarty->display('shophelp_info.htm');
}
if ($_REQUEST['act'] == 'insert') {
    /* 权限判断 */
    admin_priv('shophelp_manage');
    /* 判断是否重名 */
    $exc_article->is_only('title', $_POST['title'], $_LANG['title_exist']);
    /* 插入数据 */
    $add_time = gmtime();
    $sql = "INSERT INTO " . $ecs->table('article') . "(title, cat_id, article_type, content, add_time, author) VALUES('{$_POST['title']}', '{$_POST['cat_id']}', '{$_POST['article_type']}','{$_POST['FCKeditor1']}','{$add_time}', '_SHOPHELP' )";
    $db->query($sql);
    $link[0]['text'] = $_LANG['back_list'];
    $link[0]['href'] = 'shophelp.php?act=list_article&cat_id=' . $_POST['cat_id'];
    $link[1]['text'] = $_LANG['continue_add'];
    $link[1]['href'] = 'shophelp.php?act=add&cat_id=' . $_POST['cat_id'];
    /* 清除缓存 */
    clear_cache_files();
    admin_log($_POST['title'], 'add', 'shophelp');
    sys_msg($_LANG['articleadd_succeed'], 0, $link);
}
/*------------------------------------------------------ */
//-- 编辑文章
开发者ID:muqidi,项目名称:PHP,代码行数:31,代码来源:shophelp.php

示例8: array

    admin_priv('shopinfo_manage');
    /* 创建 html editor */
    create_html_editor('FCKeditor1');
    /* 初始化 */
    $article['article_type'] = 0;
    $smarty->assign('ur_here', $_LANG['shopinfo_add']);
    $smarty->assign('action_link', array('text' => $_LANG['shopinfo_list'], 'href' => 'shopinfo.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('shopinfo_info.htm');
}
if ($_REQUEST['act'] == 'insert') {
    /* 权限判断 */
    admin_priv('shopinfo_manage');
    /* 判断是否重名 */
    $is_only = $exc->is_only('title', $_POST['title']);
    if (!$is_only) {
        sys_msg(sprintf($_LANG['title_exist'], stripslashes($_POST['title'])), 1);
    }
    /* 插入数据 */
    $add_time = gmtime();
    $sql = "INSERT INTO " . $ecs->table('article') . "(title, cat_id, content, add_time) VALUES('{$_POST['title']}', '0', '{$_POST['FCKeditor1']}','{$add_time}' )";
    $db->query($sql);
    $link[0]['text'] = $_LANG['continue_add'];
    $link[0]['href'] = 'shopinfo.php?act=add';
    $link[1]['text'] = $_LANG['back_list'];
    $link[1]['href'] = 'shopinfo.php?act=list';
    /* 清除缓存 */
    clear_cache_files();
    admin_log($_POST['title'], 'add', 'shopinfo');
    sys_msg($_LANG['articleadd_succeed'], 0, $link);
开发者ID:nirvana-info,项目名称:old_bak,代码行数:31,代码来源:shopinfo.php

示例9: array

    /* 记录日志 */
    admin_log($_REQUEST['code'], 'uninstall', 'payment');
    $link[] = array('text' => $_LANG['back_list'], 'href' => 'payment.php?act=list');
    sys_msg($_LANG['uninstall_ok'], 0, $link);
} elseif ($_REQUEST['act'] == 'edit_name') {
    /* 检查权限 */
    check_authz_json('payment');
    /* 取得参数 */
    $code = json_str_iconv(trim($_POST['id']));
    $name = json_str_iconv(trim($_POST['val']));
    /* 检查名称是否为空 */
    if (empty($name)) {
        make_json_error($_LANG['name_is_null']);
    }
    /* 检查名称是否重复 */
    if (!$exc->is_only('pay_name', $name, $code)) {
        make_json_error($_LANG['name_exists']);
    }
    /* 更新支付方式名称 */
    $exc->edit("pay_name = '{$name}'", $code);
    make_json_result(stripcslashes($name));
} elseif ($_REQUEST['act'] == 'edit_desc') {
    /* 检查权限 */
    check_authz_json('payment');
    /* 取得参数 */
    $code = json_str_iconv(trim($_POST['id']));
    $desc = json_str_iconv(trim($_POST['val']));
    /* 更新描述 */
    $exc->edit("pay_desc = '{$desc}'", $code);
    make_json_result(stripcslashes($desc));
} elseif ($_REQUEST['act'] == 'edit_order') {
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:payment.php

示例10: array

    $smarty->assign('action_link', array('href' => 'store_manage.php?act=list_sub&pid=' . $parent_id, 'text' => $_LANG['list_sub']));
    $smarty->assign('provinces', get_regions(1, '1'));
    $sql = "select user_id,user_name from " . $ecs->table('supplier_admin_user') . " where supplier_id=" . $_SESSION[supplier_id] . " order by  user_id asc";
    $admin_list = $db->getAll($sql);
    $smarty->assign('admin_list', $admin_list);
    $smarty->assign('form_action', 'save_sub');
    $smarty->assign('store', array('parent_id' => $parent_id));
    assign_query_info();
    $smarty->display('store_sub_info.htm');
}
/* 保存仓储 */
if ($_REQUEST['act'] == 'save_sub') {
    admin_priv('store_manage');
    $parent_id = $_REQUEST['parent_id'] ? intval($_REQUEST['parent_id']) : 0;
    $store_name = $_REQUEST['store_name'] ? trim($_REQUEST['store_name']) : '';
    $is_only = $exc->is_only('store_name', $store_name, 0, "supplier_id=" . $_SESSION[supplier_id] . " and parent_id = '{$parent_id}'");
    if (!$is_only) {
        sys_msg(sprintf($_LANG['subname_exist'], stripslashes($_REQUEST['store_name'])), 1);
    }
    $sql = "INSERT INTO " . $ecs->table('store_main') . " (parent_id, store_name, province, city, district, mianji, supplier_id, store_type_id) " . "VALUES ('{$parent_id}', '{$store_name}', '{$_REQUEST['province']}', '{$_REQUEST['city']}', '{$_REQUEST['district']}',  '{$_REQUEST['mianji']}', '{$_SESSION['supplier_id']}', '{$_REQUEST['storetypeid']}')";
    $db->query($sql);
    $store_id = $db->insert_id();
    $admin_list = $_REQUEST['admin_id'];
    if (is_array($admin_list)) {
        foreach ($admin_list as $admin_item) {
            $mobile = $_REQUEST['mobile_' . $admin_item];
            $tel = $_REQUEST['tel_' . $admin_item];
            $admin_name = trim($_REQUEST['adminname_' . $admin_item]);
            $sql = "INSERT INTO " . $ecs->table('store_adminer') . " (store_id, admin_id, admin_name, mobile, tel, supplier_id, store_type_id) " . "VALUES ('{$store_id}', '{$admin_item}', '{$admin_name}', '{$mobile}', '{$tel}', '{$_SESSION['supplier_id']}', '{$_REQUEST['storetypeid']}')";
            $db->query($sql);
        }
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:store_manage.php

示例11: elseif

    $smarty->assign('ur_here', $_LANG['add_user_card']);
    $smarty->assign('form_action', $form_action);
    assign_query_info();
    $smarty->display('user_card_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    admin_priv('user_card');
    $arr = array();
    if ($_POST['user_name'] != '') {
        $_POST['user_name'] = trim($_POST['user_name']);
        $arr['user_id'] = $db->getOne(' select user_id from ' . $ecs->table('users') . " where user_name ='{$_POST['user_name']}'");
        if (!$arr['user_id']) {
            sys_msg(sprintf($_LANG['bind_user_name_not_exists'], $_POST['user_name']), 1);
        }
    }
    /* 检查是否存在重名的会员等级 */
    if (!$exc->is_only('card_no', trim($_POST['card_no']))) {
        sys_msg(sprintf($_LANG['card_no_exists'], trim($_POST['card_no'])), 1);
    }
    $arr['ct_id'] = intval($_POST['ct_id']);
    $arr['card_no'] = trim($_POST['card_no']);
    $arr['card_level'] = trim($_POST['card_level']);
    $arr['card_pass'] = trim($_POST['card_pass']);
    $arr['card_status'] = $arr['user_id'] > 0 ? 1 : 0;
    $arr['user_money'] = floatval($_POST['user_money']);
    $arr['pay_points'] = intval($_POST['pay_points']);
    $arr['rank_points'] = intval($_POST['rank_points']);
    $arr['true_name'] = trim($_POST['true_name']);
    $arr['address'] = trim($_POST['address']);
    $arr['mobile'] = trim($_POST['mobile']);
    $arr['email'] = trim($_POST['email']);
    $arr['is_show'] = intval($_POST['is_show']);
开发者ID:nanhuacrab,项目名称:ecshop,代码行数:31,代码来源:user_card.php

示例12: exchange

$exc = new exchange($weixinkeywordstable, $db, 'id', 'keyword');
if ($_REQUEST['act'] == 'list') {
    $smarty->display('wxch_keywords.html');
} elseif ($_REQUEST['act'] == 'add') {
    if ($_POST) {
        $image = new cls_image($_CFG['bgcolor']);
        $path = $image->upload_image($_FILES['path']);
        $name = $_POST['name'];
        $keyword = $_POST['keyword'];
        $type = $_POST['type'];
        $contents = $_POST['contents'];
        $pic_tit = $_POST['pic_tit'];
        $desc = $_POST['desc'];
        $pic_url = $_POST['pic_url'];
        /*检查关键词是否重复*/
        $is_only = $exc->is_only('keyword', $keyword);
        if (!$is_only) {
            sys_msg(sprintf($keyword . " 关键词已经存在!", stripslashes($keyword)), 1);
        }
        if ($keyword == 'new' or $keyword == 'best' or $keyword == 'hot' or $keyword == 'promote' or $keyword == 'cxbd' or $keyword == 'quit' or $keyword == 'member') {
            sys_msg(sprintf($keyword . " 系统保留关键词,不能占用!", stripslashes($keyword)), 1);
        }
        if ($type == 1) {
            $contents = $contents;
            $db->query("INSERT INTO " . $weixinkeywordstable . " (`name`, `keyword`, `type`, `contents`, `count`, `status`) VALUES ('{$name}', '{$keyword}', {$type}, '{$contents}', 0, 1);");
        } elseif ($type == 2) {
            $img_name = basename($image->upload_image($_FILES['pic'], 'weixin'));
            $db->query("INSERT INTO " . $weixinkeywordstable . " (`name`, `keyword`, `type`, `pic`, `pic_tit`, `desc`, `pic_url`, `count`, `status`) VALUES ('{$name}', '{$keyword}', {$type}, '{$img_name}', '{$pic_tit}', '{$desc}', '{$pic_url}', 0, 1);");
        }
        $link[] = array('href' => 'wxch.php?act=keywords', 'text' => '关键词自动回复');
        sys_msg('添加成功', 0, $link);
开发者ID:shiruolin,项目名称:hzzshop,代码行数:31,代码来源:wxch_keywords.php

示例13: array

    /* 权限判断 */
    admin_priv('card_manage');
    /*初始化显示*/
    $card['card_fee'] = 0;
    $card['free_money'] = 0;
    $smarty->assign('card', $card);
    $smarty->assign('ur_here', $_LANG['card_add']);
    $smarty->assign('action_link', array('text' => $_LANG['07_card_list'], 'href' => 'card.php?act=list'));
    $smarty->assign('form_action', 'insert');
    assign_query_info();
    $smarty->display('card_info.htm');
} elseif ($_REQUEST['act'] == 'insert') {
    /* 权限判断 */
    admin_priv('card_manage');
    /*检查包装名是否重复*/
    $is_only = $exc->is_only('card_name', $_POST['card_name']);
    if (!$is_only) {
        sys_msg(sprintf($_LANG['cardname_exist'], stripslashes($_POST['card_name'])), 1);
    }
    /*处理图片*/
    $img_name = basename($image->upload_image($_FILES['card_img'], "cardimg"));
    /*插入数据*/
    $sql = "INSERT INTO " . $ecs->table('card') . "(card_name, card_fee, free_money, card_desc, card_img)\r\n            VALUES ('{$_POST['card_name']}', '{$_POST['card_fee']}', '{$_POST['free_money']}', '{$_POST['card_desc']}', '{$img_name}')";
    $db->query($sql);
    admin_log($_POST['card_name'], 'add', 'card');
    /*添加链接*/
    $link[0]['text'] = $_LANG['continue_add'];
    $link[0]['href'] = 'card.php?act=add';
    $link[1]['text'] = $_LANG['back_list'];
    $link[1]['href'] = 'card.php?act=list';
    sys_msg($_POST['card_name'] . $_LANG['cardadd_succeed'], 0, $link);
开发者ID:duynhan07,项目名称:ecshop-vietnam,代码行数:31,代码来源:card.php

示例14: API_EditBrand

function API_EditBrand($post)
{
    /* 加载后台主操作函数 */
    require_once ROOT_PATH . ADMIN_PATH . '/includes/lib_main.php';
    require_once ROOT_PATH . ADMIN_PATH . '/includes/cls_exchange.php';
    require_once ROOT_PATH . 'includes/cls_image.php';
    /* 检查权限 */
    admin_privilege('brand_manage');
    $is_show = isset($_POST['is_show']) ? 1 : 0;
    $brand_id = !empty($_POST['brand_id']) ? intval($_POST['brand_id']) : 0;
    /*检查品牌名是否重复*/
    $exc = new exchange($GLOBALS['ecs']->table("brand"), $GLOBALS['db'], 'brand_id', 'brand_name');
    $is_only = $exc->is_only('brand_name', $_POST['brand_name'], '', '');
    if (!$is_only) {
        client_show_message(301);
    }
    $param = "brand_name = '{$_POST['brand_name']}', site_url='{$_POST['site_url']}', brand_desc='{$_POST['brand_desc']}', is_show='{$is_show}', sort_order='{$_POST['sort_order']}' ";
    /* 处理图片 */
    $img_name = upload_image($_POST['brand_logo'], 'brandlogo');
    if ($img_name !== false) {
        $param .= " ,brand_logo = '" . basename($img_name) . "' ";
    }
    /* 更新数据 */
    if ($exc->edit($param, $brand_id, '')) {
        /* 清除缓存 */
        clear_cache_files();
        admin_log($_POST['brand_name'], 'edit', 'brand');
        client_show_message(0, true);
    } else {
        client_show_message(302);
    }
}
开发者ID:Ryan007,项目名称:mybb,代码行数:32,代码来源:lib_api.php

示例15: array

    }
    $href = 'favourable.php?act=list';
    if (!$is_add) {
        $href .= '&' . list_link_postfix();
    }
    $smarty->assign('action_link', array('href' => $href, 'text' => $_LANG['favourable_list']));
    assign_query_info();
    $smarty->display('favourable_info.htm');
} elseif ($_REQUEST['act'] == 'insert' || $_REQUEST['act'] == 'update') {
    /* 检查权限 */
    admin_priv('favourable');
    /* 是否添加 */
    $is_add = $_REQUEST['act'] == 'insert';
    /* 检查名称是否重复 */
    $act_name = sub_str($_POST['act_name'], 255, false);
    if (!$exc->is_only('act_name', $act_name, intval($_POST['id']))) {
        sys_msg($_LANG['act_name_exists']);
    }
    /* 检查享受优惠的会员等级 */
    if (!isset($_POST['user_rank'])) {
        sys_msg($_LANG['pls_set_user_rank']);
    }
    /* 检查优惠范围扩展信息 */
    if (intval($_POST['act_range']) > 0 && !isset($_POST['act_range_ext'])) {
        sys_msg($_LANG['pls_set_act_range']);
    }
    /* 检查金额上下限 */
    $min_amount = floatval($_POST['min_amount']) >= 0 ? floatval($_POST['min_amount']) : 0;
    $max_amount = floatval($_POST['max_amount']) >= 0 ? floatval($_POST['max_amount']) : 0;
    if ($max_amount > 0 && $min_amount > $max_amount) {
        sys_msg($_LANG['amount_error']);
开发者ID:nirvana-info,项目名称:old_bak,代码行数:31,代码来源:favourable.php


注:本文中的exchange::is_only方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。