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


PHP uk86_import函数代码示例

本文整理汇总了PHP中uk86_import函数的典型用法代码示例。如果您正苦于以下问题:PHP uk86_import函数的具体用法?PHP uk86_import怎么用?PHP uk86_import使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: pic_cutOp

 /**
  * 图片裁剪
  *
  */
 public function pic_cutOp()
 {
     uk86_import('function.thumb');
     if (uk86_chksubmit()) {
         $thumb_width = $_POST['x'];
         $x1 = $_POST["x1"];
         $y1 = $_POST["y1"];
         $x2 = $_POST["x2"];
         $y2 = $_POST["y2"];
         $w = $_POST["w"];
         $h = $_POST["h"];
         $scale = $thumb_width / $w;
         $src = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_POST['url']);
         if (strpos($src, '..') !== false || strpos($src, BASE_UPLOAD_PATH) !== 0) {
             exit;
         }
         $save_file2 = str_replace('_small.', '_sm.', $src);
         $cropped = uk86_resize_thumb($save_file2, $src, $w, $h, $x1, $y1, $scale);
         @unlink($src);
         $pathinfo = pathinfo($save_file2);
         exit($pathinfo['basename']);
     } else {
         Uk86Language::uk86_read('cut');
         $lang = Uk86Language::uk86_getLangContent();
     }
     $save_file = str_ireplace(UPLOAD_SITE_URL, BASE_UPLOAD_PATH, $_GET['url']);
     $_GET['x'] = intval($_GET['x']) > 50 && $_GET['x'] < 400 ? $_GET['x'] : 200;
     $_GET['y'] = intval($_GET['y']) > 50 && $_GET['y'] < 400 ? $_GET['y'] : 200;
     $_GET['resize'] = $_GET['resize'] == '0' ? '0' : '1';
     Tpl::output('height', uk86_get_height($save_file));
     Tpl::output('width', uk86_get_width($save_file));
     Tpl::showpage('cut', 'null_layout');
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:37,代码来源:cut.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     Uk86Language::uk86_read('member_store_statistics');
     uk86_import('function.statistics');
     uk86_import('function.datehelper');
     $model = Model('stat');
     //存储参数
     $this->search_arr = $_REQUEST;
     //处理搜索时间
     $this->search_arr = $model->dealwithSearchTime($this->search_arr);
     //获得系统年份
     $year_arr = uk86_getSystemYearArr();
     //获得系统月份
     $month_arr = uk86_getSystemMonthArr();
     //获得本月的周时间段
     $week_arr = uk86_getMonthWeekArr($this->search_arr['week']['current_year'], $this->search_arr['week']['current_month']);
     Tpl::output('year_arr', $year_arr);
     Tpl::output('month_arr', $month_arr);
     Tpl::output('week_arr', $week_arr);
     Tpl::output('search_arr', $this->search_arr);
     /**
      * 处理商品分类
      */
     $this->choose_gcid = ($t = intval($_REQUEST['choose_gcid'])) > 0 ? $t : 0;
     $gccache_arr = Model('goods_class')->getGoodsclassCache($this->choose_gcid, 3);
     $this->gc_arr = $gccache_arr['showclass'];
     Tpl::output('gc_json', json_encode($gccache_arr['showclass']));
     Tpl::output('gc_choose_json', json_encode($gccache_arr['choose_gcid']));
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:30,代码来源:statistics_industry.php

示例3: uk86_ftpcmd

function uk86_ftpcmd($cmd, $arg1 = '')
{
    uk86_import('libraries.ftp');
    static $ftp;
    $ftpon = C('ftp_open');
    if (!$ftpon) {
        return $cmd == 'error' ? -101 : 0;
    } elseif ($ftp == null) {
        $ftp =& Uk86NcFtp::uk86_instance();
    }
    if (!$ftp->enabled) {
        return $ftp->error();
    } elseif ($ftp->enabled && !$ftp->connectid) {
        $ftp->connect();
    }
    switch ($cmd) {
        case 'upload':
            return $ftp->upload(BASE_PATH . '/' . $arg1, $arg1);
            break;
        case 'delete':
            return $ftp->ftp_delete($arg1);
            break;
        case 'close':
            return $ftp->ftp_close();
            break;
        case 'error':
            return $ftp->error();
            break;
        case 'object':
            return $ftp;
            break;
        default:
            return false;
    }
}
开发者ID:wangjiang988,项目名称:ukshop,代码行数:35,代码来源:ftp.php

示例4: getweekofmonthOp

 /**
  * 查询每月的周数组
  */
 public function getweekofmonthOp()
 {
     uk86_import('function.datehelper');
     $year = $_GET['y'];
     $month = $_GET['m'];
     $week_arr = uk86_getMonthWeekArr($year, $month);
     echo json_encode($week_arr);
     die;
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:12,代码来源:common.php

示例5: connect

 /**
  * 实例化缓存驱动
  *
  * @param unknown_type $type
  * @param unknown_type $args
  * @return unknown
  */
 public function connect($type, $args = array())
 {
     if (empty($type)) {
         $type = C('cache_open') ? 'redis' : 'file';
     }
     $type = strtolower($type);
     $class = 'Cache' . ucwords($type);
     if (!class_exists($class)) {
         uk86_import('cache.cache#' . $type);
     }
     return new $class($args);
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:19,代码来源:cache.php

示例6: get_adv_listOp

 /**
  * 异步调用广告
  *
  */
 public function get_adv_listOp()
 {
     $ap_ids = $_GET['ap_ids'];
     $list = array();
     if (!empty($ap_ids) && is_array($ap_ids)) {
         uk86_import('function.adv');
         foreach ($ap_ids as $key => $value) {
             $ap_id = intval($value);
             //广告位编号
             $adv_info = uk86_advshow($ap_id, 'array');
             if (!empty($adv_info) && is_array($adv_info)) {
                 $list[$ap_id] = $adv_info;
             }
         }
     }
     echo $_GET['callback'] . '(' . json_encode($list) . ')';
     exit;
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:22,代码来源:adv.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     Uk86Language::uk86_read('stat');
     uk86_import('function.statistics');
     uk86_import('function.datehelper');
     $model = Model('stat');
     //存储参数
     $this->search_arr = $_REQUEST;
     //处理搜索时间
     $this->search_arr = $model->dealwithSearchTime($this->search_arr);
     //获得系统年份
     $year_arr = uk86_getSystemYearArr();
     //获得系统月份
     $month_arr = uk86_getSystemMonthArr();
     //获得本月的周时间段
     $week_arr = uk86_getMonthWeekArr($this->search_arr['week']['current_year'], $this->search_arr['week']['current_month']);
     Tpl::output('year_arr', $year_arr);
     Tpl::output('month_arr', $month_arr);
     Tpl::output('week_arr', $week_arr);
     Tpl::output('search_arr', $this->search_arr);
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:22,代码来源:statistics_flow.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     Uk86Language::uk86_read('stat');
     uk86_import('function.statistics');
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:6,代码来源:stat_general.php

示例9: cutOp

 /**
  * 裁剪
  *
  */
 public function cutOp()
 {
     if (uk86_chksubmit()) {
         $thumb_width = 120;
         $x1 = $_POST["x1"];
         $y1 = $_POST["y1"];
         $x2 = $_POST["x2"];
         $y2 = $_POST["y2"];
         $w = $_POST["w"];
         $h = $_POST["h"];
         $scale = $thumb_width / $w;
         $_POST['newfile'] = str_replace('..', '', $_POST['newfile']);
         if (strpos($_POST['newfile'], "avatar_{$_SESSION['member_id']}_new.") !== 0) {
             uk86_redirect('index.php?act=member_information&op=avatar');
         }
         $src = BASE_UPLOAD_PATH . DS . ATTACH_AVATAR . DS . $_POST['newfile'];
         $avatarfile = BASE_UPLOAD_PATH . DS . ATTACH_AVATAR . DS . "avatar_{$_SESSION['member_id']}.jpg";
         uk86_import('function.thumb');
         $cropped = uk86_resize_thumb($avatarfile, $src, $w, $h, $x1, $y1, $scale);
         @unlink($src);
         Model('member')->editMember(array('member_id' => $_SESSION['member_id']), array('member_avatar' => 'avatar_' . $_SESSION['member_id'] . '.jpg'));
         $_SESSION['avatar'] = 'avatar_' . $_SESSION['member_id'] . '.jpg';
         uk86_redirect('index.php?act=member_information&op=avatar');
     }
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:29,代码来源:member_information.php

示例10: salelistOp

 /**
  * 订单列表
  */
 public function salelistOp()
 {
     $model = Model('stat');
     $searchtime_arr_tmp = explode('|', $this->search_arr['t']);
     foreach ((array) $searchtime_arr_tmp as $k => $v) {
         $searchtime_arr[] = intval($v);
     }
     $where = array();
     $where['store_id'] = $_SESSION['store_id'];
     $where['order_add_time'] = array('between', $searchtime_arr);
     if (trim($_GET['order_type']) != '') {
         $where['order_state'] = trim($_GET['order_type']);
     }
     if ($_GET['exporttype'] == 'excel') {
         $order_list = $model->statByStatorder($where, '', 0, 0, 'order_id desc');
     } else {
         $order_list = $model->statByStatorder($where, '', 10, 0, 'order_id desc');
     }
     //统计数据标题
     $statlist = array();
     $statheader = array();
     $statheader[] = array('text' => '订单编号', 'key' => 'order_sn');
     $statheader[] = array('text' => '买家', 'key' => 'buyer_name');
     $statheader[] = array('text' => '下单时间', 'key' => 'order_add_time');
     $statheader[] = array('text' => '订单总额', 'key' => 'order_amount');
     $statheader[] = array('text' => '订单状态', 'key' => 'order_statetext');
     foreach ((array) $order_list as $k => $v) {
         $v['order_add_time'] = @date('Y-m-d H:i:s', $v['order_add_time']);
         switch ($v['order_state']) {
             case ORDER_STATE_CANCEL:
                 $v['order_statetext'] = '已取消';
                 break;
             case ORDER_STATE_NEW:
                 $v['order_statetext'] = '待付款';
                 break;
             case ORDER_STATE_PAY:
                 $v['order_statetext'] = '待发货';
                 break;
             case ORDER_STATE_SEND:
                 $v['order_statetext'] = '待收货';
                 break;
             case ORDER_STATE_SUCCESS:
                 $v['order_statetext'] = '交易完成';
                 break;
         }
         $statlist[$k] = $v;
     }
     //导出Excel
     if ($this->search_arr['exporttype'] == 'excel') {
         //导出Excel
         uk86_import('libraries.uk86excel');
         $excel_obj = new Uk86Excel();
         $excel_data = array();
         //设置样式
         $excel_obj->uk86_setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
         //header
         foreach ($statheader as $k => $v) {
             $excel_data[0][] = array('styleid' => 's_title', 'data' => $v['text']);
         }
         //data
         foreach ($statlist as $k => $v) {
             foreach ($statheader as $h_k => $h_v) {
                 $excel_data[$k + 1][] = array('data' => $v[$h_v['key']]);
             }
         }
         $excel_data = $excel_obj->uk86_charset($excel_data, CHARSET);
         $excel_obj->uk86_addArray($excel_data);
         $excel_obj->uk86_addWorksheet($excel_obj->uk86_charset('订单记录', CHARSET));
         $excel_obj->uk86_generateXML($excel_obj->uk86_charset('订单记录', CHARSET) . date('Y-m-d-H', time()));
         exit;
     }
     Tpl::output('statheader', $statheader);
     Tpl::output('statlist', $statlist);
     Tpl::output('show_page', $model->showpage(2));
     Tpl::output('actionurl', "index.php?act={$this->search_arr['act']}&op={$this->search_arr['op']}&order_type={$this->search_arr['order_type']}&t={$this->search_arr['t']}");
     Tpl::showpage('stat.listandorder', 'null_layout');
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:80,代码来源:statistics_sale.php

示例11: createExcel

 /**
  * 生成excel
  *
  * @param array $data
  */
 private function createExcel($data = array())
 {
     Uk86Language::uk86_read('export');
     uk86_import('libraries.uk86excel');
     $excel_obj = new Uk86Excel();
     $excel_data = array();
     //设置样式
     $excel_obj->uk86_setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
     //header
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_no'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_store'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_buyer'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_xtimd'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_count'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_yfei'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_paytype'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_state'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_storeid'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_buyerid'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_od_bemail'));
     //data
     foreach ((array) $data as $k => $v) {
         $tmp = array();
         $tmp[] = array('data' => 'NC' . $v['order_sn']);
         $tmp[] = array('data' => $v['store_name']);
         $tmp[] = array('data' => $v['buyer_name']);
         $tmp[] = array('data' => date('Y-m-d H:i:s', $v['add_time']));
         $tmp[] = array('format' => 'Number', 'data' => uk86_ncPriceFormat($v['order_amount']));
         $tmp[] = array('format' => 'Number', 'data' => uk86_ncPriceFormat($v['shipping_fee']));
         $tmp[] = array('data' => uk86_orderPaymentName($v['payment_code']));
         $tmp[] = array('data' => uk86_orderState($v));
         $tmp[] = array('data' => $v['store_id']);
         $tmp[] = array('data' => $v['buyer_id']);
         $tmp[] = array('data' => $v['buyer_email']);
         $excel_data[] = $tmp;
     }
     $excel_data = $excel_obj->uk86_charset($excel_data, CHARSET);
     $excel_obj->uk86_addArray($excel_data);
     $excel_obj->uk86_addWorksheet($excel_obj->uk86_charset(L('exp_od_order'), CHARSET));
     $excel_obj->uk86_generateXML($excel_obj->uk86_charset(L('exp_od_order'), CHARSET) . $_GET['curpage'] . '-' . date('Y-m-d-H', time()));
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:46,代码来源:order.php

示例12: download_f_code_excelOp

 /**
  * 下载F码
  */
 public function download_f_code_excelOp()
 {
     $common_id = $_GET['commonid'];
     if ($common_id <= 0) {
         uk86_showMessage(L('wrong_argument'), '', '', 'error');
     }
     $common_info = Model('goods')->getGoodeCommonInfoByID($common_id);
     if (empty($common_info) || $common_info['store_id'] != $_SESSION['store_id']) {
         uk86_showMessage(L('wrong_argument'), '', '', 'error');
     }
     uk86_import('libraries.uk86excel');
     $excel_obj = new Uk86Excel();
     $excel_data = array();
     //设置样式
     $excel_obj->uk86_setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
     //header
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '号码');
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '使用状态');
     $data = Model('goods_fcode')->getGoodsFCodeList(array('goods_commonid' => $common_id));
     foreach ($data as $k => $v) {
         $tmp = array();
         $tmp[] = array('data' => $v['fc_code']);
         $tmp[] = array('data' => $v['fc_state'] ? '已使用' : '未使用');
         $excel_data[] = $tmp;
     }
     $excel_data = $excel_obj->uk86_charset($excel_data, CHARSET);
     $excel_obj->uk86_addArray($excel_data);
     $excel_obj->uk86_addWorksheet($excel_obj->uk86_charset($common_info['goods_name'], CHARSET));
     $excel_obj->uk86_generateXML($excel_obj->uk86_charset($common_info['goods_name'], CHARSET) . '-' . date('Y-m-d-H', time()));
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:33,代码来源:store_goods_online.php

示例13: createExcel

 /**
  * 生成excel
  *
  * @param array $data
  */
 private function createExcel($data = array())
 {
     Uk86Language::uk86_read('export');
     uk86_import('libraries.uk86excel');
     $excel_obj = new Uk86Excel();
     $excel_data = array();
     //设置样式
     $excel_obj->uk86_setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
     //header
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_member'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_system'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_point'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_time'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_jd'));
     $excel_data[0][] = array('styleid' => 's_title', 'data' => L('exp_pi_ms'));
     $state_cn = array(Uk86Language::uk86_get('admin_points_stage_regist'), Uk86Language::uk86_get('admin_points_stage_login'), Uk86Language::uk86_get('admin_points_stage_comments'), Uk86Language::uk86_get('admin_points_stage_order'), Uk86Language::uk86_get('admin_points_stage_system'), Uk86Language::uk86_get('admin_points_stage_pointorder'), Uk86Language::uk86_get('admin_points_stage_app'));
     foreach ((array) $data as $k => $v) {
         $tmp = array();
         $tmp[] = array('data' => $v['pl_membername']);
         $tmp[] = array('data' => $v['pl_adminname']);
         $tmp[] = array('format' => 'Number', 'data' => uk86_ncPriceFormat($v['pl_points']));
         $tmp[] = array('data' => date('Y-m-d H:i:s', $v['pl_addtime']));
         $tmp[] = array('data' => str_replace(array('regist', 'login', 'comments', 'order', 'system', 'pointorder', 'app'), $state_cn, $v['pl_stage']));
         $tmp[] = array('data' => $v['pl_desc']);
         $excel_data[] = $tmp;
     }
     $excel_data = $excel_obj->uk86_charset($excel_data, CHARSET);
     $excel_obj->uk86_addArray($excel_data);
     $excel_obj->uk86_addWorksheet($excel_obj->uk86_charset(L('exp_pi_jfmx'), CHARSET));
     $excel_obj->uk86_generateXML($excel_obj->uk86_charset(L('exp_pi_jfmx'), CHARSET) . $_GET['curpage'] . '-' . date('Y-m-d-H', time()));
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:36,代码来源:points.php

示例14: createExcel

 /**
  * 生成excel
  *
  * @param array $data
  */
 private function createExcel($data = array())
 {
     uk86_import('libraries.uk86excel');
     $excel_obj = new Uk86Excel();
     $excel_data = array();
     //设置样式
     $excel_obj->uk86_setStyle(array('id' => 's_title', 'Font' => array('FontName' => '宋体', 'Size' => '12', 'Bold' => '1')));
     //header
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '会员名称');
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '经验值');
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '添加时间');
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '操作阶段');
     $excel_data[0][] = array('styleid' => 's_title', 'data' => '描述');
     $stage_arr = Model('exppoints')->getStage();
     foreach ((array) $data as $k => $v) {
         $tmp = array();
         $tmp[] = array('data' => $v['exp_membername']);
         $tmp[] = array('format' => 'Number', 'data' => uk86_ncPriceFormat($v['exp_points']));
         $tmp[] = array('data' => date('Y-m-d H:i:s', $v['exp_addtime']));
         $tmp[] = array('data' => $stage_arr[$v['exp_stage']]);
         $tmp[] = array('data' => $v['exp_desc']);
         $excel_data[] = $tmp;
     }
     $excel_data = $excel_obj->uk86_charset($excel_data, CHARSET);
     $excel_obj->uk86_addArray($excel_data);
     $excel_obj->uk86_addWorksheet($excel_obj->uk86_charset('经验值明细', CHARSET));
     $excel_obj->uk86_generateXML($excel_obj->uk86_charset('经验值明细', CHARSET) . $_GET['curpage'] . '-' . date('Y-m-d-H', time()));
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:33,代码来源:exppoints.php

示例15: ajax_get_expressOp

 /**
  * 从第三方取快递信息
  */
 public function ajax_get_expressOp()
 {
     $url = 'http://www.kuaidi100.com/query?type=' . $_GET['e_code'] . '&postid=' . $_GET['shipping_code'] . '&id=1&valicode=&temp=' . uk86_random(4) . '&sessionid=&tmp=' . uk86_random(4);
     uk86_import('function.ftp');
     $content = uk86_dfsockopen($url);
     $content = json_decode($content, true);
     if ($content['status'] != 200) {
         exit(json_encode(false));
     }
     $content['data'] = array_reverse($content['data']);
     $output = array();
     if (is_array($content['data'])) {
         foreach ($content['data'] as $k => $v) {
             if ($v['time'] == '') {
                 continue;
             }
             $output[] = $v['time'] . '&nbsp;&nbsp;' . $v['context'];
         }
     }
     if (empty($output)) {
         exit(json_encode(false));
     }
     echo json_encode($output);
 }
开发者ID:wangjiang988,项目名称:ukshop,代码行数:27,代码来源:d_center.php


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