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


PHP Uk86Language::uk86_getUTF8方法代碼示例

本文整理匯總了PHP中Uk86Language::uk86_getUTF8方法的典型用法代碼示例。如果您正苦於以下問題:PHP Uk86Language::uk86_getUTF8方法的具體用法?PHP Uk86Language::uk86_getUTF8怎麽用?PHP Uk86Language::uk86_getUTF8使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Uk86Language的用法示例。


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

示例1: article_classOp

 /**
  * 文章管理
  */
 public function article_classOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_class = Model('article_class');
     //刪除
     if (uk86_chksubmit()) {
         if (!empty($_POST['check_ac_id'])) {
             if (is_array($_POST['check_ac_id'])) {
                 $del_array = $model_class->getChildClass($_POST['check_ac_id']);
                 if (is_array($del_array)) {
                     foreach ($del_array as $k => $v) {
                         $model_class->del($v['ac_id']);
                     }
                 }
             }
             $this->log(l('nc_del,article_class_index_class'), 1);
             uk86_showMessage($lang['article_class_index_del_succ']);
         } else {
             uk86_showMessage($lang['article_class_index_choose']);
         }
     }
     /**
      * 父ID
      */
     $parent_id = $_GET['ac_parent_id'] ? intval($_GET['ac_parent_id']) : 0;
     /**
      * 列表
      */
     $tmp_list = $model_class->getTreeClassList(2);
     if (is_array($tmp_list)) {
         foreach ($tmp_list as $k => $v) {
             if ($v['ac_parent_id'] == $parent_id) {
                 /**
                  * 判斷是否有子類
                  */
                 if ($tmp_list[$k + 1]['deep'] > $v['deep']) {
                     $v['have_child'] = 1;
                 }
                 $class_list[] = $v;
             }
         }
     }
     if ($_GET['ajax'] == '1') {
         /**
          * 轉碼
          */
         if (strtoupper(CHARSET) == 'GBK') {
             $class_list = Uk86Language::uk86_getUTF8($class_list);
         }
         $output = json_encode($class_list);
         print_r($output);
         exit;
     } else {
         Tpl::output('class_list', $class_list);
         Tpl::showpage('article_class.index');
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:60,代碼來源:article_class.php

示例2: goods_classOp

 /**
  * 分類管理
  */
 public function goods_classOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_class = Model('goods_class');
     if (uk86_chksubmit()) {
         //刪除
         if ($_POST['submit_type'] == 'del') {
             $gcids = implode(',', $_POST['check_gc_id']);
             if (!empty($_POST['check_gc_id'])) {
                 if (!is_array($_POST['check_gc_id'])) {
                     $this->log(L('nc_delete,goods_class_index_class') . '[ID:' . $gcids . ']', 0);
                     uk86_showMessage($lang['nc_common_del_fail']);
                 }
                 $del_array = $model_class->delGoodsClassByGcIdString($gcids);
                 $this->log(L('nc_delete,goods_class_index_class') . '[ID:' . $gcids . ']', 1);
                 uk86_showMessage($lang['nc_common_del_succ']);
             } else {
                 $this->log(L('nc_delete,goods_class_index_class') . '[ID:' . $gcids . ']', 0);
                 uk86_showMessage($lang['nc_common_del_fail']);
             }
         }
     }
     //父ID
     $parent_id = $_GET['gc_parent_id'] ? intval($_GET['gc_parent_id']) : 0;
     //列表
     $tmp_list = $model_class->getTreeClassList(3);
     if (is_array($tmp_list)) {
         foreach ($tmp_list as $k => $v) {
             if ($v['gc_parent_id'] == $parent_id) {
                 //判斷是否有子類
                 if ($tmp_list[$k + 1]['deep'] > $v['deep']) {
                     $v['have_child'] = 1;
                 }
                 $class_list[] = $v;
             }
         }
     }
     if ($_GET['ajax'] == '1') {
         //轉碼
         if (strtoupper(CHARSET) == 'GBK') {
             $class_list = Uk86Language::uk86_getUTF8($class_list);
         }
         $output = json_encode($class_list);
         print_r($output);
         exit;
     } else {
         Tpl::output('class_list', $class_list);
         Tpl::output('top_link', $this->sublink($this->links, 'goods_class'));
         Tpl::showpage('goods_class.index');
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:54,代碼來源:goods_class.php

示例3: ajax_quickreplyOp

 /**
  * ajax獲取回複相關信息 話題列表頁使用
  */
 public function ajax_quickreplyOp()
 {
     // 話題信息
     $this->themeInfo();
     $data = array();
     $data['form_action'] = CIRCLE_SITE_URL . '/index.php?act=theme&op=save_reply&type=quick&c_id=' . $this->c_id . '&t_id=' . $this->t_id;
     $data['member_avatar'] = uk86_getMemberAvatarForID($_SESSION['member_id']);
     // 頭像
     // 回複
     $reply_list = Model()->table('circle_threply')->where(array('theme_id' => $this->t_id, 'circle_id' => $this->c_id))->order('reply_id desc')->limit(5)->select();
     if (!empty($reply_list)) {
         foreach ($reply_list as $key => $val) {
             $reply_list[$key]['member_avatar'] = uk86_getMemberAvatarForID($val['member_id']);
             $reply_list[$key]['reply_addtime'] = date('Y-m-d H:i', $val['reply_addtime']);
             $reply_list[$key]['reply_content'] = uk86_removeUBBTag($val['reply_content']);
         }
     }
     $data['reply_list'] = $reply_list;
     $data['c_istalk'] = intval(C('circle_istalk'));
     $data['c_contentleast'] = intval(C('circle_contentleast'));
     if (intval(C('circle_contentleast')) > 0) {
         $data['c_contentmsg'] = sprintf(L('nc_content_min_length'), intval(C('circle_contentleast')));
     } else {
         $data['c_contentmsg'] = L('nc_content_not_null');
     }
     if (strtoupper(CHARSET) == 'GBK') {
         $data = Uk86Language::uk86_getUTF8($data);
     }
     echo json_encode($data);
     exit;
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:34,代碼來源:theme.php

示例4: ajax_show_commOp

 /**
  * ajax選擇常用商品分類
  */
 public function ajax_show_commOp()
 {
     $staple_id = intval($_GET['stapleid']);
     /**
      * 查詢相應的商品分類id
      */
     $model_staple = Model('goods_class_staple');
     $staple_info = $model_staple->getStapleInfo(array('staple_id' => intval($staple_id), 'gc_id_1,gc_id_2,gc_id_3'));
     if (empty($staple_info) || !is_array($staple_info)) {
         echo json_encode(array('done' => false, 'msg' => ''));
         die;
     }
     $list_array = array();
     $list_array['gc_id'] = 0;
     $list_array['type_id'] = $staple_info['type_id'];
     $list_array['done'] = true;
     $list_array['one'] = '';
     $list_array['two'] = '';
     $list_array['three'] = '';
     $gc_id_1 = intval($staple_info['gc_id_1']);
     $gc_id_2 = intval($staple_info['gc_id_2']);
     $gc_id_3 = intval($staple_info['gc_id_3']);
     /**
      * 查詢同級分類列表
      */
     $model_goods_class = Model('goods_class');
     // 1級
     if ($gc_id_1 > 0) {
         $list_array['gc_id'] = $gc_id_1;
         $class_list = $model_goods_class->getGoodsClass($_SESSION['store_id']);
         if (empty($class_list) || !is_array($class_list)) {
             echo json_encode(array('done' => false, 'msg' => ''));
             die;
         }
         foreach ($class_list as $val) {
             if ($val['gc_id'] == $gc_id_1) {
                 $list_array['one'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:1, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="classDivClick" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             } else {
                 $list_array['one'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:1, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             }
         }
     }
     // 2級
     if ($gc_id_2 > 0) {
         $list_array['gc_id'] = $gc_id_2;
         $class_list = $model_goods_class->getGoodsClass($_SESSION['store_id'], $gc_id_1, 2);
         if (empty($class_list) || !is_array($class_list)) {
             echo json_encode(array('done' => false, 'msg' => ''));
             die;
         }
         foreach ($class_list as $val) {
             if ($val['gc_id'] == $gc_id_2) {
                 $list_array['two'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:2, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="classDivClick" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             } else {
                 $list_array['two'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:2, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             }
         }
     }
     // 3級
     if ($gc_id_3 > 0) {
         $list_array['gc_id'] = $gc_id_3;
         $class_list = $model_goods_class->getGoodsClass($_SESSION['store_id'], $gc_id_2, 3);
         if (empty($class_list) || !is_array($class_list)) {
             echo json_encode(array('done' => false, 'msg' => ''));
             die;
         }
         foreach ($class_list as $val) {
             if ($val['gc_id'] == $gc_id_3) {
                 $list_array['three'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:3, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="classDivClick" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             } else {
                 $list_array['three'] .= '<li class="" onclick="selClass($(this));" data-param="{gcid:' . $val['gc_id'] . ', deep:3, tid:' . $val['type_id'] . '}" nctype="selClass"> <a class="" href="javascript:void(0)"><span class="has_leaf"><i class="icon-double-angle-right"></i>' . $val['gc_name'] . '</span></a> </li>';
             }
         }
     }
     // 轉碼
     if (strtoupper(CHARSET) == 'GBK') {
         $list_array = Uk86Language::uk86_getUTF8($list_array);
     }
     echo json_encode($list_array);
     die;
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:84,代碼來源:store_goods_add.php

示例5: area_show

 public function area_show()
 {
     $area_one_level = array();
     $area_two_level = array();
     $condition = array();
     $condition['area_parent_id'] = '1';
     $condition['field'] = 'flea_area_id,flea_area_name,flea_area_parent_id';
     $condition['order'] = 'flea_area_parent_id asc,flea_area_sort asc,flea_area_id asc';
     $area_list = $this->getListArea($condition);
     if (is_array($area_list) && !empty($area_list)) {
         foreach ($area_list as $val) {
             if ($val['flea_area_parent_id'] == 0) {
                 $flea_area_id = $val['flea_area_id'];
                 $area_one_level[] = $val;
                 $area_two_level[$flea_area_id]['id'] = $flea_area_id;
             } else {
                 $flea_area_parent_id = $val['flea_area_parent_id'];
                 if (isset($area_two_level[$flea_area_parent_id])) {
                     $area_two_level[$flea_area_parent_id]['children'][] = $val;
                     $area_children = $area_two_level[$flea_area_parent_id]['children'];
                     if (strtoupper(CHARSET) == 'GBK') {
                         $area_children = Uk86Language::uk86_getUTF8($area_children);
                     }
                     $area_two_level[$flea_area_parent_id]['content'] = json_encode($area_children);
                 }
             }
         }
     }
     return array('area_one_level' => $area_one_level, 'area_two_level' => $area_two_level);
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:30,代碼來源:flea_area.model.php

示例6: search_circleOp

 /**
  * ajax根據名稱搜索
  */
 public function search_circleOp()
 {
     // 身份驗證
     $rs = $this->checkIdentity('c');
     if (!empty($rs)) {
         echo 'false';
         die;
     }
     $model = Model();
     // 查詢已加友情圈子
     $circle_list = $model->table('circle_fs')->where(array('circle_id' => $this->c_id))->select();
     if (!empty($circle_list)) {
         $circle_list = uk86_array_under_reset($circle_list, 'friendship_id');
         $circle_array = array_keys($circle_list);
     }
     $where = array();
     $where['circle_name'] = array('like', '%' . $_GET['name'] . '%');
     $where['circle_status'] = 1;
     if (!empty($circle_array)) {
         $circle_array[] = $this->c_id;
         $where['circle_id'] = array('not in', $circle_array);
     } else {
         $where['circle_id'] = array('neq', $this->c_id);
     }
     $circle_list = $model->table('circle')->field('circle_id,circle_name')->where($where)->select();
     if (empty($circle_list)) {
         echo 'false';
         die;
     }
     if (strtoupper(CHARSET) == 'GBK') {
         $circle_list = Uk86Language::uk86_getUTF8($circle_list);
     }
     echo json_encode($circle_list);
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:37,代碼來源:manage.php

示例7: search_goods_classOp

 /**
  * 用於ajax查找商品分類
  */
 public function search_goods_classOp()
 {
     $where = 'gc_name like "%' . $_POST['class_name'] . '%"';
     $data = Model()->table('goods_class')->where($where)->field('gc_id, gc_name')->select();
     if (strtoupper(CHARSET) == 'GBK') {
         $data = Uk86Language::uk86_getUTF8($data);
         //網站GBK使用編碼時,轉換為UTF-8,防止json輸出漢字問題
     }
     echo json_encode($data);
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:13,代碼來源:mb_special.php

示例8: add_addrOp

 /**
  * 添加新的收貨地址
  *
  */
 public function add_addrOp()
 {
     $model_addr = Model('address');
     if (uk86_chksubmit()) {
         //驗證表單信息
         $obj_validate = new Uk86Validate();
         $obj_validate->validateparam = array(array("input" => $_POST["true_name"], "require" => "true", "message" => Uk86Language::uk86_get('cart_step1_input_receiver')), array("input" => $_POST["area_id"], "require" => "true", "validator" => "Number", "message" => Uk86Language::uk86_get('cart_step1_choose_area')), array("input" => $_POST["address"], "require" => "true", "message" => Uk86Language::uk86_get('cart_step1_input_address')));
         $error = $obj_validate->uk86_validate();
         if ($error != '') {
             $error = strtoupper(CHARSET) == 'GBK' ? Uk86Language::uk86_getUTF8($error) : $error;
             exit(json_encode(array('state' => false, 'msg' => $error)));
         }
         $data = array();
         $data['member_id'] = $_SESSION['member_id'];
         $data['true_name'] = $_POST['true_name'];
         $data['area_id'] = intval($_POST['area_id']);
         $data['city_id'] = intval($_POST['city_id']);
         $data['area_info'] = $_POST['area_info'];
         $data['address'] = $_POST['address'];
         $data['tel_phone'] = $_POST['tel_phone'];
         $data['mob_phone'] = $_POST['mob_phone'];
         //轉碼
         $data = strtoupper(CHARSET) == 'GBK' ? Uk86Language::uk86_getGBK($data) : $data;
         $insert_id = $model_addr->addAddress($data);
         if ($insert_id) {
             exit(json_encode(array('state' => true, 'addr_id' => $insert_id)));
         } else {
             exit(json_encode(array('state' => false, 'msg' => Uk86Language::uk86_get('cart_step1_addaddress_fail', 'UTF-8'))));
         }
     } else {
         Tpl::showpage('buy_address.add', 'null_layout');
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:37,代碼來源:buy.php

示例9: updateOp

 /**
  * U幣禮品購物車更新禮品數量
  */
 public function updateOp()
 {
     $pcart_id = intval($_GET['pc_id']);
     $quantity = intval($_GET['quantity']);
     //兌換失敗提示
     $msg = L('pointcart_cart_modcart_fail');
     //轉碼
     if (strtoupper(CHARSET) == 'GBK') {
         $msg = Uk86Language::uk86_getUTF8($msg);
         //網站GBK使用編碼時,轉換為UTF-8,防止json輸出漢字問題
     }
     if ($pcart_id <= 0 || $quantity <= 0) {
         echo json_encode(array('msg' => $msg));
         die;
     }
     //驗證禮品購物車信息是否存在
     $model_pointcart = Model('pointcart');
     $cart_info = $model_pointcart->getPointCartInfo(array('pcart_id' => $pcart_id, 'pmember_id' => $_SESSION['member_id']));
     if (!$cart_info) {
         echo json_encode(array('msg' => $msg));
         die;
     }
     //驗證是否能兌換
     $data = $model_pointcart->checkExchange($cart_info['pgoods_id'], $quantity, $_SESSION['member_id']);
     if (!$data['state']) {
         echo json_encode(array('msg' => $data['msg']));
         die;
     }
     $prod_info = $data['data']['prod_info'];
     $quantity = $prod_info['quantity'];
     $cart_state = true;
     //如果數量發生變化則更新禮品購物車內單個禮品數量
     if ($cart_info['pgoods_choosenum'] != $quantity) {
         $cart_state = $model_pointcart->editPointCart(array('pcart_id' => $pcart_id, 'pmember_id' => $_SESSION['member_id']), array('pgoods_choosenum' => $quantity));
     }
     if ($cart_state) {
         //計算總金額
         $amount = $model_pointcart->getPointCartAmount($_SESSION['member_id']);
         echo json_encode(array('done' => 'true', 'subtotal' => $prod_info['pointsamount'], 'amount' => $amount, 'quantity' => $quantity));
         die;
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:45,代碼來源:pointcart.php

示例10: flea_classOp

 /**
  * 分類管理
  */
 public function flea_classOp()
 {
     $lang = Uk86Language::uk86_getLangContent();
     $model_class = Model('flea_class');
     /**
      * 刪除,編輯
      */
     if ($_POST['form_submit'] == 'ok') {
         /**
          * 刪除
          */
         if ($_POST['submit_type'] == 'del') {
             if (!empty($_POST['check_gc_id'])) {
                 if (is_array($_POST['check_gc_id'])) {
                     $del_array = $model_class->getChildClass($_POST['check_gc_id']);
                     if (is_array($del_array)) {
                         foreach ($del_array as $k => $v) {
                             $model_class->del($v['gc_id']);
                         }
                     }
                 }
                 uk86_showMessage($lang['goods_class_index_del_succ']);
             } else {
                 uk86_showMessage($lang['goods_class_index_choose_del']);
             }
         }
         /**
          * 編輯
          */
         if ($_POST['submit_type'] == 'brach_edit') {
             if (!empty($_POST['check_gc_id'])) {
                 Tpl::output('id', implode(',', $_POST['check_gc_id']));
                 Tpl::showpage('flea_class.brach_edit');
             } else {
                 uk86_showMessage($lang['goods_class_index_choose_edit']);
             }
         }
         /**
          * 首頁顯示
          */
         if ($_POST['submit_type'] == 'index_show' or $_POST['submit_type'] == 'index_hide') {
             if (!empty($_POST['check_gc_id'])) {
                 if (is_array($_POST['check_gc_id'])) {
                     $param = array();
                     $param['gc_index_show'] = $_POST['submit_type'] == 'index_show' ? '1' : '0';
                     foreach ($_POST['check_gc_id'] as $k => $v) {
                         $param['gc_id'] = $v;
                         $model_class->update($param);
                     }
                 }
                 uk86_showMessage($lang['goods_class_index_in_homepage'] . ($_POST['submit_type'] == 'index_show' ? $lang['goods_class_index_display'] : $lang['goods_class_index_hide']) . $lang['goods_class_index_succ']);
             } else {
                 uk86_showMessage($lang['goods_class_index_choose_in_homepage'] . ($_POST['submit_type'] == 'index_show' ? $lang['goods_class_index_display'] : $lang['goods_class_index_hide']) . $lang['goods_class_index_content']);
             }
         }
     }
     /**
      * 父ID
      */
     $parent_id = $_GET['gc_parent_id'] ? $_GET['gc_parent_id'] : 0;
     /**
      * 列表
      */
     $tmp_list = $model_class->getTreeClassList(4);
     if (is_array($tmp_list)) {
         foreach ($tmp_list as $k => $v) {
             if ($v['gc_parent_id'] == $parent_id) {
                 /**
                  * 判斷是否有子類
                  */
                 if ($tmp_list[$k + 1]['deep'] > $v['deep']) {
                     $v['have_child'] = 1;
                 }
                 $class_list[] = $v;
             }
         }
     }
     if ($_GET['ajax'] == '1') {
         /**
          * 轉碼
          */
         if (strtoupper(CHARSET) == 'GBK') {
             $class_list = Uk86Language::uk86_getUTF8($class_list);
         }
         $output = json_encode($class_list);
         print_r($output);
         exit;
     } else {
         Tpl::output('class_list', $class_list);
         Tpl::showpage('flea_class.index');
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:95,代碼來源:flea_class.php

示例11: ajax_change_imgmessageOp

 /**
  * ajax返回圖片信息
  */
 public function ajax_change_imgmessageOp()
 {
     $str_array = explode('/', $_GET['url']);
     $str = array_pop($str_array);
     $str = explode('.', $str);
     /**
      * 實例化圖片模型
      */
     $model_album = Model('album');
     $param = array();
     $search = explode(',', GOODS_IMAGES_EXT);
     $param['like_cover'] = str_ireplace($search, '', $str['0']);
     $pic_info = $model_album->getPicList($param);
     /**
      * 小圖尺寸
      */
     list($width, $height, $type, $attr) = getimagesize(BASE_UPLOAD_PATH . DS . ATTACH_GOODS . DS . $_SESSION['store_id'] . DS . $pic_info['0']['apic_cover']);
     if (strtoupper(CHARSET) == 'GBK') {
         $pic_info['0']['apic_name'] = Uk86Language::uk86_getUTF8($pic_info['0']['apic_name']);
     }
     echo json_encode(array('img_name' => $pic_info['0']['apic_name'], 'default_size' => sprintf('%.2f', intval($pic_info['0']['apic_size']) / 1024), 'default_spec' => $pic_info['0']['apic_spec'], 'upload_time' => date('Y-m-d', $pic_info['0']['upload_time']), 'small_spec' => $width . 'x' . $height));
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:25,代碼來源:store_album.php

示例12: json

 /**
  * json
  *
  */
 public function json($json)
 {
     if (strtoupper(CHARSET) == 'GBK') {
         $json = Uk86Language::uk86_getUTF8($json);
         //GBKtoUTF-8
     }
     echo $_GET['callback'] . '(' . json_encode($json) . ')';
     exit;
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:13,代碼來源:web_chat.php

示例13: addforwardOp

 /**
  * 添加轉發
  */
 public function addforwardOp()
 {
     // 驗證用戶是否登錄
     $this->checkLoginStatus();
     $obj_validate = new Uk86Validate();
     $stid = intval($_POST["stid"]);
     $validate_arr[] = array("input" => $_POST["forwardcontent"], "validator" => 'Length', "min" => 0, "max" => 140, "message" => Uk86Language::uk86_get('sns_content_beyond'));
     //發帖數超過最大次數出現驗證碼
     if (intval(uk86_cookie('forwardnum')) >= self::MAX_RECORDNUM) {
         $validate_arr[] = array("input" => $_POST["captcha"], "require" => "true", "message" => Uk86Language::uk86_get('wrong_null'));
     }
     $obj_validate->validateparam = $validate_arr;
     $error = $obj_validate->uk86_validate();
     if ($error != '') {
         showDialog($error, '', 'error');
     }
     //發帖數超過最大次數出現驗證碼
     if (intval(uk86_cookie('forwardnum')) >= self::MAX_RECORDNUM) {
         if (!uk86_checkSeccode($_POST['nchash'], $_POST['captcha'])) {
             showDialog(Uk86Language::uk86_get('wrong_checkcode'), '', 'error');
         }
     }
     //查詢會員信息
     $model = Model();
     $member_info = $model->table('member')->where(array('member_state' => 1))->find($_SESSION['member_id']);
     if (empty($member_info)) {
         showDialog(Uk86Language::uk86_get('sns_member_error'), '', 'error');
     }
     //查詢原帖信息
     $model_stracelog = Model('store_sns_tracelog');
     $stracelog_info = $model_stracelog->getStoreSnsTracelogInfo(array('strace_id' => $stid));
     if (empty($stracelog_info)) {
         showDialog(Uk86Language::uk86_get('sns_forward_fail'), '', 'error');
     }
     if ($stracelog_info['strace_content'] == '') {
         $data = json_decode($stracelog_info['strace_goodsdata'], true);
         if (CHARSET == 'GBK') {
             foreach ((array) $data as $k => $v) {
                 $data[$k] = Uk86Language::uk86_getUTF8($v);
             }
         }
         $stracelog_info['strace_content'] = $model_stracelog->spellingStyle($stracelog_info['strace_type'], $data);
     }
     $insert_arr = array();
     $insert_arr['trace_originalid'] = 0;
     $insert_arr['trace_originalmemberid'] = 0;
     $insert_arr['trace_originalstate'] = 0;
     $insert_arr['trace_memberid'] = $member_info['member_id'];
     $insert_arr['trace_membername'] = $member_info['member_name'];
     $insert_arr['trace_memberavatar'] = $member_info['member_avatar'];
     $insert_arr['trace_title'] = $_POST['forwardcontent'] ? $_POST['forwardcontent'] : Uk86Language::uk86_get('sns_forward');
     $insert_arr['trace_content'] = "<dl class=\"fd-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3><a href=\"index.php?act=store_snshome&sid=" . $stracelog_info['strace_storeid'] . "\" target=\"_blank\">" . $stracelog_info['strace_storename'] . "</a>" . Uk86Language::uk86_get('nc_colon') . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . $stracelog_info['strace_title'] . "</h3>\n\t\t\t\t\t\t\t\t\t\t      \t\t\t</dt>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<dd>" . $stracelog_info['strace_content'] . "</dd>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<dl>";
     $insert_arr['trace_addtime'] = time();
     $insert_arr['trace_state'] = 0;
     $insert_arr['trace_privacy'] = 0;
     $insert_arr['trace_commentcount'] = 0;
     $insert_arr['trace_copycount'] = 0;
     $insert_arr['trace_orgcommentcount'] = 0;
     $insert_arr['trace_orgcopycount'] = 0;
     $insert_arr['trace_from'] = 2;
     $result = $model->table('sns_tracelog')->insert($insert_arr);
     if ($result) {
         //更新動態轉發次數
         $where = array('strace_id' => $stid);
         $update = array('strace_spread' => array('exp', 'strace_spread+1'));
         Model('store_sns_tracelog')->editStoreSnsTracelog($update, $where);
         showDialog(Uk86Language::uk86_get('sns_forward_succ'), '', 'succ');
     } else {
         showDialog(Uk86Language::uk86_get('sns_forward_fail'), '', 'error');
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:74,代碼來源:store_snshome.php

示例14: ajax_categoryOp

 public function ajax_categoryOp()
 {
     $model = Model('goods_class');
     $list = $model->field('gc_title,gc_keywords,gc_description')->find(intval($_GET['id']));
     //轉碼
     if (strtoupper(CHARSET) == 'GBK') {
         $list = Uk86Language::uk86_getUTF8($list);
         //網站GBK使用編碼時,轉換為UTF-8,防止json輸出漢字問題
     }
     echo json_encode($list);
     exit;
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:12,代碼來源:setting.php

示例15: 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;
     }
 }
開發者ID:wangjiang988,項目名稱:ukshop,代碼行數:25,代碼來源:points.php


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