本文整理汇总了PHP中Uk86Language::uk86_getGBK方法的典型用法代码示例。如果您正苦于以下问题:PHP Uk86Language::uk86_getGBK方法的具体用法?PHP Uk86Language::uk86_getGBK怎么用?PHP Uk86Language::uk86_getGBK使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Uk86Language
的用法示例。
在下文中一共展示了Uk86Language::uk86_getGBK方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkmemberOp
public function checkmemberOp()
{
$name = trim($_GET['name']);
if (!$name) {
echo '';
die;
}
/**
* 转码
*/
if (strtoupper(CHARSET) == 'GBK') {
$name = Uk86Language::uk86_getGBK($name);
}
$obj_member = Model('member');
$member_info = $obj_member->getMemberInfo(array('member_name' => $name));
if (is_array($member_info) && count($member_info) > 0) {
if (strtoupper(CHARSET) == 'GBK') {
$member_info['member_name'] = Uk86Language::uk86_getUTF8($member_info['member_name']);
}
echo json_encode(array('id' => $member_info['member_id'], 'name' => $member_info['member_name'], 'points' => $member_info['member_points']));
} else {
echo '';
die;
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
if (strtoupper(CHARSET) == 'GBK') {
$_GET = Uk86Language::uk86_getGBK($_GET);
$_POST = Uk86Language::uk86_getGBK($_POST);
}
Uk86Language::uk86_read('web_config');
}
示例3: __construct
/**
* 构造函数
*/
public function __construct()
{
/**
* 读取通用、布局的语言包
*/
Uk86Language::uk86_read('common');
Uk86Language::uk86_read('microshop');
/**
* 判断微商城是否关闭
*/
if (C('microshop_isuse') != '1') {
header('location: ' . SHOP_SITE_URL);
die;
}
/**
* 设置布局文件内容
*/
Tpl::setLayout('microshop_layout');
/**
* 转码
*/
if ($_GET['column'] && strtoupper(CHARSET) == 'GBK') {
$_GET = Uk86Language::uk86_getGBK($_GET);
}
/**
* 获取导航
*/
Tpl::output('nav_list', ($nav = F('nav')) ? $nav : H('nav', true, 'file'));
/**
* 搜索类型列表
*/
$search_type = array();
$search_type['goods'] = Uk86Language::uk86_get('nc_microshop_goods');
$search_type['personal'] = Uk86Language::uk86_get('nc_microshop_personal');
$search_type['store'] = Uk86Language::uk86_get('nc_microshop_store');
//$search_type['album'] = Uk86Language::uk86_get('nc_microshop_album');
Tpl::output('search_type', $search_type);
/**
* 登录后读取用户头像
*/
if (!empty($_SESSION['member_id']) && intval($_SESSION['member_id']) > 0) {
self::get_member_avatar($_SESSION['member_id']);
}
/**
* 系统状态检查
*/
if (!C('site_status')) {
uk86_halt(C('closed_reason'));
}
/**
* seo
*/
Tpl::output('html_title', Uk86Language::uk86_get('nc_microshop') . '-' . C('site_name') . ' ');
Tpl::output('seo_keywords', C('microshop_seo_keywords'));
Tpl::output('seo_description', C('microshop_seo_description'));
}
示例4: stracelistOp
/**
* 买家中心店铺动态
*/
public function stracelistOp()
{
//查询收藏的店铺
$model_favorites = Model('favorites');
//条件
$where = array('member_id' => $_SESSION['member_id']);
$fav_store_id = $model_favorites->getStoreFavoritesList($where, 'fav_id');
// 整理
if (!empty($fav_store_id) && is_array($fav_store_id)) {
$storeid_array = '';
foreach ($fav_store_id as $val) {
$storeid_array[] = $val['fav_id'];
}
$where = array('strace_storeid' => array('in', $storeid_array), 'strace_state' => 1);
$model_stracelog = Model('store_sns_tracelog');
$count = $model_stracelog->getStoreSnsTracelogCount($where);
//分页
$page = new Uk86Page();
$page->uk86_setEachNum(30);
$page->uk86_setStyle('admin');
$page->uk86_setTotalNum($count);
$delaypage = intval($_GET['delaypage']) > 0 ? intval($_GET['delaypage']) : 1;
//本页延时加载的当前页数
$lazy_arr = uk86_lazypage(10, $delaypage, $count, true, $page->uk86_getNowPage(), $page->uk86_getEachNum(), $page->uk86_getLimitStart());
//动态列表
$limit = $lazy_arr['limitstart'] . "," . $lazy_arr['delay_eachnum'];
$strace_array = $count = $model_stracelog->getStoreSnsTracelogList($where, '*', 'strace_id desc', $limit);
if (!empty($strace_array)) {
foreach ($strace_array as $key => $val) {
if ($val['strace_content'] == '') {
$val['strace_goodsdata'] = json_decode($val['strace_goodsdata'], true);
if (CHARSET == 'GBK') {
foreach ((array) $val['strace_goodsdata'] as $k => $v) {
$val['strace_goodsdata'][$k] = Uk86Language::uk86_getGBK($v);
}
}
$content = $model_stracelog->spellingStyle($val['strace_type'], $val['strace_goodsdata']);
$strace_array[$key]['strace_content'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $content);
}
}
}
Tpl::output('show_page', $page->uk86_show());
}
Tpl::output('hasmore', $lazy_arr['hasmore']);
Tpl::output('strace_array', $strace_array);
Tpl::output('type', 'index');
Tpl::showpage('member_storesns.tracelist', 'null_layout');
}
示例5: __construct
protected function __construct()
{
Uk86Language::uk86_read('common,layout');
/**
* 验证用户是否登录
* $admin_info 管理员资料 name id
*/
$this->admin_info = $this->systemLogin();
if ($this->admin_info['id'] != 1) {
// 验证权限
$this->checkPermission();
}
//转码 防止GBK下用ajax调用时传汉字数据出现乱码
if (($_GET['branch'] != '' || $_GET['op'] == 'ajax') && strtoupper(CHARSET) == 'GBK') {
$_GET = Uk86Language::uk86_getGBK($_GET);
}
}
示例6: stracelistOp
/**
* 动态列表
*/
public function stracelistOp()
{
// where条件
$where = array();
if ($_GET['search_sname'] != '') {
$where['strace_storename'] = array('like', '%' . trim($_GET['search_sname']) . '%');
}
if ($_GET['search_scontent'] != '') {
$where['search_scontent'] = array('like', '%' . trim($_GET['search_scontent']) . '%');
}
if ($_GET['search_type'] != '') {
$where['strace_type'] = trim($_GET['search_type']);
}
if ($_GET['search_stime'] != '' || $_GET['search_etime'] != '') {
$s_time = $_GET['search_stime'] != '' ? strtotime($_GET['search_stime']) : null;
$e_time = $_GET['search_etime'] != '' ? strtotime($_GET['search_etime']) : null;
$where['strace_time'] = array('time', array($s_time, $e_time));
}
// 实例化模型
$model_stracelog = Model('store_sns_tracelog');
$strace_list = Model('store_sns_tracelog')->getStoreSnsTracelogList($where, '*', 'strace_id desc', 0, 10);
if (!empty($strace_list) && is_array($strace_list)) {
foreach ($strace_list as $key => $val) {
if ($val['strace_content'] == '') {
$data = json_decode($val['strace_goodsdata'], true);
if (CHARSET == 'GBK') {
foreach ((array) $data as $k => $v) {
$data[$k] = Uk86Language::uk86_getGBK($v);
}
}
$content = $model_stracelog->spellingStyle($val['strace_type'], $data);
$strace_list[$key]['strace_content'] = str_replace("%siteurl%", SHOP_SITE_URL . DS, $content);
}
}
}
Tpl::output('show_page', $model_stracelog->showpage(2));
Tpl::output('strace_list', $strace_list);
Tpl::showpage('sns_strace.index');
}
示例7: searchOp
/**
* 搜索设置
*/
public function searchOp()
{
if (uk86_chksubmit()) {
$lang = Uk86Language::uk86_getLangContent();
$model_setting = Model('setting');
/**
* 转码 防止GBK下用中文逗号截取不正确
*/
$comma = ',';
if (strtoupper(CHARSET) == 'GBK') {
$comma = Uk86Language::uk86_getGBK($comma);
}
$result = $model_setting->updateSetting(array('hot_search' => str_replace($comma, ',', $_POST['hot_search'])));
if ($result) {
uk86_showMessage($lang['nc_common_save_succ']);
} else {
uk86_showMessage($lang['nc_common_save_fail']);
}
}
$model_setting = Model('setting');
$list_setting = $model_setting->getListSetting();
Tpl::output('list_setting', $list_setting);
Tpl::showpage('setting.search');
}
示例8: publish_complain_talkOp
public function publish_complain_talkOp()
{
$complain_id = intval($_POST['complain_id']);
$complain_talk = trim($_POST['complain_talk']);
$talk_len = strlen($complain_talk);
if ($talk_len > 0 && $talk_len < 255) {
$complain_info = $this->get_complain_info($complain_id);
$complain_state = intval($complain_info['complain_state']);
//检查投诉是否是可发布对话状态
if ($complain_state > self::STATE_APPEAL && $complain_state < self::STATE_FINISH) {
$model_complain_talk = Model('complain_talk');
$param = array();
$param['complain_id'] = $complain_id;
$param['talk_member_id'] = $complain_info['accuser_id'];
$param['talk_member_name'] = $complain_info['accuser_name'];
$param['talk_member_type'] = $complain_info['member_status'];
if (strtoupper(CHARSET) == 'GBK') {
$complain_talk = Uk86Language::uk86_getGBK($complain_talk);
}
$param['talk_content'] = $complain_talk;
$param['talk_state'] = 1;
$param['talk_admin'] = 0;
$param['talk_datetime'] = time();
if ($model_complain_talk->saveComplainTalk($param)) {
echo json_encode('success');
} else {
echo json_encode('error2');
}
} else {
echo json_encode('error');
}
} else {
echo json_encode('error1');
}
}
示例9: ajaxOp
/**
* ajax操作
*/
public function ajaxOp()
{
switch ($_GET['branch']) {
/**
* 更新分类
*/
case 'goods_class_name':
$model_class = Model('goods_class');
$class_array = $model_class->getGoodsClassInfoById(intval($_GET['id']));
$condition['gc_name'] = trim($_GET['value']);
$condition['gc_parent_id'] = $class_array['gc_parent_id'];
$condition['gc_id'] = array('neq' => intval($_GET['id']));
$class_list = $model_class->getGoodsClassList($condition);
if (empty($class_list)) {
$where = array('gc_id' => intval($_GET['id']));
$update_array = array();
$update_array['gc_name'] = trim($_GET['value']);
$model_class->editGoodsClass($update_array, $where);
echo 'true';
exit;
} else {
echo 'false';
exit;
}
break;
/**
* 分类 排序 显示 设置
*/
/**
* 分类 排序 显示 设置
*/
case 'goods_class_sort':
case 'goods_class_show':
case 'goods_class_index_show':
$model_class = Model('goods_class');
$where = array('gc_id' => intval($_GET['id']));
$update_array = array();
$update_array[$_GET['column']] = $_GET['value'];
$model_class->editGoodsClass($update_array, $where);
echo 'true';
exit;
break;
/**
* 添加、修改操作中 检测类别名称是否有重复
*/
/**
* 添加、修改操作中 检测类别名称是否有重复
*/
case 'check_class_name':
$model_class = Model('goods_class');
$condition['gc_name'] = trim($_GET['gc_name']);
$condition['gc_parent_id'] = intval($_GET['gc_parent_id']);
$condition['gc_id'] = array('neq', intval($_GET['gc_id']));
$class_list = $model_class->getGoodsClassList($condition);
if (empty($class_list)) {
echo 'true';
exit;
} else {
echo 'false';
exit;
}
break;
/**
* TAG值编辑
*/
/**
* TAG值编辑
*/
case 'goods_class_tag_value':
$model_class_tag = Model('goods_class_tag');
$update_array = array();
$update_array['gc_tag_id'] = intval($_GET['id']);
/**
* 转码 防止GBK下用中文逗号截取不正确
*/
$comma = ',';
if (strtoupper(CHARSET) == 'GBK') {
$comma = Uk86Language::uk86_getGBK($comma);
}
$update_array[$_GET['column']] = trim(str_replace($comma, ',', $_GET['value']));
$model_class_tag->updateTag($update_array);
echo 'true';
exit;
break;
}
}
示例10: image_uploadOp
/**
* 上传图片
*
*/
public function image_uploadOp()
{
$store_id = $_SESSION['store_id'];
if (!empty($_POST['category_id'])) {
$category_id = intval($_POST['category_id']);
} else {
$error = '上传 图片失败';
if (strtoupper(CHARSET) == 'GBK') {
$error = Uk86Language::uk86_getUTF8($error);
}
$data['state'] = 'false';
$data['message'] = $error;
$data['origin_file_name'] = $_FILES["file"]["name"];
echo json_encode($data);
exit;
}
// 判断图片数量是否超限
$album_limit = $this->store_grade['sg_album_limit'];
if ($album_limit > 0) {
$album_count = Model('album')->getCount(array('store_id' => $store_id));
if ($album_count >= $album_limit) {
// 目前并不出该提示,而是提示上传0张图片
$error = L('store_goods_album_climit');
if (strtoupper(CHARSET) == 'GBK') {
$error = Uk86Language::uk86_getUTF8($error);
}
$data['state'] = 'false';
$data['message'] = $error;
$data['origin_file_name'] = $_FILES["file"]["name"];
$data['state'] = 'true';
echo json_encode($data);
exit;
}
}
/**
* 上传图片
*/
$upload = new Uk86UploadFile();
$upload->uk86_set('default_dir', ATTACH_GOODS . DS . $store_id . DS . $upload->getSysSetPath());
$upload->uk86_set('max_size', C('image_max_filesize'));
$upload->uk86_set('thumb_width', GOODS_IMAGES_WIDTH);
$upload->uk86_set('thumb_height', GOODS_IMAGES_HEIGHT);
$upload->uk86_set('thumb_ext', GOODS_IMAGES_EXT);
$upload->uk86_set('fprefix', $store_id);
$result = $upload->uk86_upfile('file');
if ($result) {
$pic = $upload->getSysSetPath() . $upload->file_name;
$pic_thumb = $upload->getSysSetPath() . $upload->thumb_image;
} else {
// 目前并不出该提示
$error = $upload->error;
if (strtoupper(CHARSET) == 'GBK') {
$error = Uk86Language::uk86_getUTF8($error);
}
$data['state'] = 'false';
$data['message'] = $error;
$data['origin_file_name'] = $_FILES["file"]["name"];
echo json_encode($data);
exit;
}
list($width, $height, $type, $attr) = getimagesize(BASE_UPLOAD_PATH . DS . ATTACH_GOODS . DS . $store_id . DS . $pic);
$image = explode('.', $_FILES["file"]["name"]);
if (strtoupper(CHARSET) == 'GBK') {
$image['0'] = Uk86Language::uk86_getGBK($image['0']);
}
$insert_array = array();
$insert_array['apic_name'] = $image['0'];
$insert_array['apic_tag'] = '';
$insert_array['aclass_id'] = $category_id;
$insert_array['apic_cover'] = $pic;
$insert_array['apic_size'] = intval($_FILES['file']['size']);
$insert_array['apic_spec'] = $width . 'x' . $height;
$insert_array['upload_time'] = time();
$insert_array['store_id'] = $store_id;
$result = Model('upload_album')->add($insert_array);
$data = array();
$data['file_id'] = $result;
$data['file_name'] = $pic;
$data['origin_file_name'] = $_FILES["file"]["name"];
$data['file_path'] = $pic;
$data['instance'] = $_GET['instance'];
$data['state'] = 'true';
/**
* 整理为json格式
*/
$output = json_encode($data);
echo $output;
}
示例11: type_editOp
/**
* 编辑类型
*/
public function type_editOp()
{
$lang = Uk86Language::uk86_getLangContent();
if (empty($_GET['t_id'])) {
uk86_showMessage($lang['param_error']);
}
//属性模型
$model_type = Model('type');
//编辑保存
if (uk86_chksubmit()) {
$obj_validate = new Uk86Validate();
$obj_validate->validateparam = array(array("input" => $_POST["t_mane"], "require" => "true", "message" => $lang['type_add_name_no_null']), array("input" => $_POST["t_sort"], "require" => "true", 'validator' => 'Number', "message" => $lang['type_add_sort_no_null']));
$error = $obj_validate->uk86_validate();
if ($error != '') {
uk86_showMessage($error);
}
//更新属性关联表信息
$type_id = intval($_POST['t_id']);
//品牌
if ($_POST['brand']['form_submit'] == 'ok') {
$model_type->delType('type_brand', array('type_id' => $type_id));
if (!empty($_POST['brand_id'])) {
$brand_array = $_POST['brand_id'];
$return = $model_type->typeRelatedAdd('type_brand', $brand_array, $type_id);
if (!$return) {
uk86_showMessage($lang['type_index_related_fail']);
}
}
}
//规格
if ($_POST['spec']['form_submit'] == 'ok') {
$model_type->delType('type_spec', array('type_id' => $type_id));
if (!empty($_POST['spec_id'])) {
$spec_array = $_POST['spec_id'];
$return = $model_type->typeRelatedAdd('type_spec', $spec_array, $type_id);
if (!$return) {
uk86_showMessage($lang['type_index_related_fail']);
}
}
}
//属性
// 转码 防止GBK下用中文逗号截取不正确
$comma = ',';
if (strtoupper(CHARSET) == 'GBK') {
$comma = Uk86Language::uk86_getGBK($comma);
}
if (is_array($_POST['at_value']) && !empty($_POST['at_value'])) {
$attribute_array = $_POST['at_value'];
foreach ($attribute_array as $v) {
// 要删除的属性id
$del_array = array();
if (!empty($_POST['a_del'])) {
$del_array = $_POST['a_del'];
}
$v['value'] = str_replace($comma, ',', $v['value']);
//把属性值中的中文逗号替换成英文逗号
if (isset($v['form_submit']) && $v['form_submit'] == 'ok' && !in_array($v['a_id'], $del_array)) {
//原属性已修改
/**
* 属性
*/
$attr_array = array();
$attr_array['attr_name'] = $v['name'];
$attr_array['type_id'] = $type_id;
$attr_array['attr_sort'] = $v['sort'];
$attr_array['attr_show'] = $v['show'];
$return = $model_type->typeUpdate($attr_array, array('type_id' => $type_id, 'attr_id' => intval($v['a_id'])), 'attribute');
if (!$return) {
uk86_showMessage($lang['type_index_related_fail']);
}
} else {
if (!isset($v['form_submit'])) {
//新增属性
// 属性
$attr_array = array();
$attr_array['attr_name'] = $v['name'];
$attr_array['attr_value'] = $v['value'];
$attr_array['type_id'] = $type_id;
$attr_array['attr_sort'] = $v['sort'];
$attr_array['attr_show'] = $v['show'];
$attr_id = $model_type->typeAdd('attribute', $attr_array);
if (!$attr_id) {
uk86_showMessage($lang['type_index_related_fail']);
}
//添加属性值
$attr_value = explode(',', $v['value']);
if (!empty($attr_value)) {
$attr_array = array();
foreach ($attr_value as $val) {
$tpl_array = array();
$tpl_array['attr_value_name'] = $val;
$tpl_array['attr_id'] = $attr_id;
$tpl_array['type_id'] = $type_id;
$tpl_array['attr_value_sort'] = 0;
$attr_array[] = $tpl_array;
}
$return = Model('attribute')->addAttributeValueAll($attr_array);
//.........这里部分代码省略.........
示例12: show_handle_pageOp
public function show_handle_pageOp()
{
$this->show_menu('inform_list');
$inform_id = intval($_GET['inform_id']);
$inform_goods_name = urldecode($_GET['inform_goods_name']);
if (strtoupper(CHARSET) == 'GBK') {
$inform_goods_name = Uk86Language::uk86_getGBK($inform_goods_name);
}
TPL::output('inform_id', $inform_id);
TPL::output('inform_goods_name', $inform_goods_name);
Tpl::showpage('inform.handle');
}
示例13: add_invOp
/**
* 新增发票信息
*
*/
public function add_invOp()
{
$model_inv = Model('invoice');
if (uk86_chksubmit()) {
//如果是增值税发票验证表单信息
if ($_POST['invoice_type'] == 2) {
if (empty($_POST['inv_company']) || empty($_POST['inv_code']) || empty($_POST['inv_reg_addr'])) {
exit(json_encode(array('state' => false, 'msg' => Uk86Language::uk86_get('nc_common_save_fail', 'UTF-8'))));
}
}
$data = array();
if ($_POST['invoice_type'] == 1) {
$data['inv_state'] = 1;
$data['inv_title'] = $_POST['inv_title_select'] == 'person' ? '个人' : $_POST['inv_title'];
$data['inv_content'] = $_POST['inv_content'];
} else {
$data['inv_state'] = 2;
$data['inv_company'] = $_POST['inv_company'];
$data['inv_code'] = $_POST['inv_code'];
$data['inv_reg_addr'] = $_POST['inv_reg_addr'];
$data['inv_reg_phone'] = $_POST['inv_reg_phone'];
$data['inv_reg_bname'] = $_POST['inv_reg_bname'];
$data['inv_reg_baccount'] = $_POST['inv_reg_baccount'];
$data['inv_rec_name'] = $_POST['inv_rec_name'];
$data['inv_rec_mobphone'] = $_POST['inv_rec_mobphone'];
$data['inv_rec_province'] = $_POST['area_info'];
$data['inv_goto_addr'] = $_POST['inv_goto_addr'];
}
$data['member_id'] = $_SESSION['member_id'];
//转码
$data = strtoupper(CHARSET) == 'GBK' ? Uk86Language::uk86_getGBK($data) : $data;
$insert_id = $model_inv->addInv($data);
if ($insert_id) {
exit(json_encode(array('state' => 'success', 'id' => $insert_id)));
} else {
exit(json_encode(array('state' => 'fail', 'msg' => Uk86Language::uk86_get('nc_common_save_fail', 'UTF-8'))));
}
} else {
Tpl::showpage('buy_address.add', 'null_layout');
}
}
示例14: save_consultOp
/**
* 商品咨询添加
*/
public function save_consultOp()
{
//检查是否可以评论
if (!C('guest_comment') && !$_SESSION['member_id']) {
showDialog(L('goods_index_goods_noallow'));
}
$goods_id = intval($_POST['goods_id']);
if ($goods_id <= 0) {
showDialog(L('wrong_argument'));
}
//咨询内容的非空验证
if (trim($_POST['goods_content']) == "") {
showDialog(L('goods_index_input_consult'));
}
//表单验证
$result = uk86_chksubmit(true, C('captcha_status_goodsqa'), 'num');
if (!$result) {
showDialog(L('invalid_request'));
} elseif ($result === -11) {
showDialog(L('invalid_request'));
} elseif ($result === -12) {
showDialog(L('wrong_checkcode'));
}
if (Uk86process::uk86_islock('commit')) {
showDialog(L('nc_common_op_repeat'));
} else {
Uk86process::uk86_addprocess('commit');
}
if ($_SESSION['member_id']) {
//查询会员信息
$member_model = Model('member');
$member_info = $member_model->getMemberInfo(array('member_id' => $_SESSION['member_id']));
if (empty($member_info) || $member_info['is_allowtalk'] == 0) {
showDialog(L('goods_index_goods_noallow'));
}
}
//判断商品编号的存在性和合法性
$goods = Model('goods');
$goods_info = $goods->getGoodsInfoByID($goods_id, 'goods_name,store_id');
if (empty($goods_info)) {
showDialog(L('goods_index_goods_not_exists'));
}
//判断是否是店主本人
if ($_SESSION['store_id'] && $goods_info['store_id'] == $_SESSION['store_id']) {
showDialog(L('goods_index_consult_store_error'));
}
//检查店铺状态
$store_model = Model('store');
$store_info = $store_model->getStoreInfoByID($goods_info['store_id']);
if ($store_info['store_state'] == '0' || intval($store_info['store_state']) == '2' || intval($store_info['store_end_time']) != 0 && $store_info['store_end_time'] <= time()) {
showDialog(L('goods_index_goods_store_closed'));
}
//接收数据并保存
$input = array();
$input['goods_id'] = $goods_id;
$input['goods_name'] = $goods_info['goods_name'];
$input['member_id'] = intval($_SESSION['member_id']) > 0 ? $_SESSION['member_id'] : 0;
$input['member_name'] = $_SESSION['member_name'] ? $_SESSION['member_name'] : '';
$input['store_id'] = $store_info['store_id'];
$input['store_name'] = $store_info['store_name'];
$input['ct_id'] = intval($_POST['consult_type_id']);
$input['consult_addtime'] = TIMESTAMP;
if (strtoupper(CHARSET) == 'GBK') {
$input['consult_content'] = Uk86Language::uk86_getGBK($_POST['goods_content']);
} else {
$input['consult_content'] = $_POST['goods_content'];
}
$input['isanonymous'] = $_POST['hide_name'] == 'hide' ? 1 : 0;
$consult_model = Model('consult');
if ($consult_model->addConsult($input)) {
showDialog(L('goods_index_consult_success'), 'reload', 'succ');
} else {
showDialog(L('goods_index_consult_fail'));
}
}
示例15: fontOp
/**
* 水印字体
*
* @param
* @return
*/
public function fontOp()
{
//获取水印字体
$dir_list = array();
uk86_readFileList(BASE_RESOURCE_PATH . DS . 'font', $dir_list);
if (!empty($dir_list) && is_array($dir_list)) {
$fontInfo = array();
include BASE_RESOURCE_PATH . DS . 'font' . DS . 'font.info.php';
foreach ($dir_list as $value) {
$file_ext_array = explode('.', $value);
if (strtolower(end($file_ext_array)) == 'ttf' && file_exists($value)) {
$file_path_array = explode('/', $value);
$value = array_pop($file_path_array);
$tmp = explode('.', $value);
$file_list[$value] = $fontInfo[$tmp[0]];
}
}
//转码
if (strtoupper(CHARSET) == 'GBK') {
$file_list = Uk86Language::uk86_getGBK($file_list);
}
Tpl::output('file_list', $file_list);
}
Tpl::output('top_link', $this->sublink($this->links, 'font'));
Tpl::showpage('upload.font');
}