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


PHP output_data函数代码示例

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


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

示例1: type_infoOp

 /**
  * 返回分类规格属性
  */
 public function type_infoOp()
 {
     $gc_id = intval($_POST['gc_id']);
     $model_goods_class = Model('goods_class');
     $goods_class = $model_goods_class->getGoodsClassLineForTag($gc_id);
     $type_id = intval($goods_class['type_id']);
     $spec_list = array();
     $attr_list = array();
     if ($type_id > 0) {
         list($spec_json, $spec_list, $attr_list, $brand_list) = Model('type')->getAttr($goods_class['type_id'], $this->store_info['store_id'], $gc_id);
         $temp = array();
         foreach ($spec_list as $key => $value) {
             $value['sp_id'] = $key;
             $temp[] = $value;
         }
         $spec_list = $temp;
         $temp = array();
         foreach ($attr_list as $key => $value) {
             $value['attr_id'] = $key;
             $temp[] = $value;
         }
         $attr_list = $temp;
     }
     output_data(array('type_id' => $type_id, 'spec_list' => $spec_list, 'attr_list' => $attr_list));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:28,代码来源:seller_goods_class.php

示例2: comments_listOp

 /**
  * 商品评价详细页
  */
 public function comments_listOp()
 {
     $goods_id = intval($_GET['goods_id']);
     // 商品详细信息
     $model_goods = Model('goods');
     $goods_info = $model_goods->getGoodsInfoByID($goods_id, '*');
     // 验证商品是否存在
     if (empty($goods_info)) {
         output_error('商品不存在');
     }
     //评价信息
     $goods_evaluate_info = Model('evaluate_goods')->getEvaluateGoodsInfoByGoodsID($goods_id);
     $buy_comments['goods_evaluate_info']['good'] = $goods_evaluate_info['good'];
     $buy_comments['goods_evaluate_info']['normal'] = $goods_evaluate_info['normal'];
     $buy_comments['goods_evaluate_info']['bad'] = $goods_evaluate_info['bad'];
     $buy_comments['goods_evaluate_info']['all'] = $goods_evaluate_info['all'];
     $buy_comments['goods_evaluate_info']['good_percent'] = $goods_evaluate_info['good_percent'];
     $buy_comments['goods_evaluate_info']['normal_percent'] = $goods_evaluate_info['normal_percent'];
     $buy_comments['goods_evaluate_info']['bad_percent'] = $goods_evaluate_info['bad_percent'];
     $buy_comments['goods_evaluate_info']['good_star'] = $goods_evaluate_info['good_star'];
     $buy_comments['goods_evaluate_info']['star_average'] = $goods_evaluate_info['star_average'];
     $buy_comments['comments'] = $this->_get_comments($goods_id, $_GET['type'], 5);
     $buy_comments['goods_evaluate_info']['page'] = $this->_getcomments($goods_id, $_GET['type'], 5);
     if (empty($buy_comments['comments'])) {
         output_error('暂时没有评论');
     }
     if ($buy_comments['goods_evaluate_info']['page']['page'] > $buy_comments['goods_evaluate_info']['page']['show_pa']) {
         $buy_comments['comments'] = null;
     }
     output_data($buy_comments);
 }
开发者ID:dotku,项目名称:shopnc_cnnewyork,代码行数:34,代码来源:buycomments.php

示例3: indexOp

 /**
  * 登录
  */
 public function indexOp()
 {
     if (empty($_POST['seller_name']) || empty($_POST['password']) || !in_array($_POST['client'], $this->client_type_array)) {
         output_error('用户名密码不能为空');
     }
     $model_seller = Model('seller');
     $seller_info = $model_seller->getSellerInfo(array('seller_name' => $_POST['seller_name']));
     if (!$seller_info) {
         output_error('登录失败');
     }
     //店铺所有人或者授权的子账号可以从客户端登录
     if (!($seller_info['is_admin'] || $seller_info['is_client'])) {
         output_error('权限验证失败');
     }
     //验证身份
     $model_member = Model('member');
     $member_info = $model_member->getMemberInfo(array('member_id' => $seller_info['member_id'], 'member_passwd' => strtolower($_POST['password'])));
     if (!$member_info) {
         output_error('用户名密码错误');
     }
     //读取店铺信息
     $model_store = Model('store');
     $store_info = $model_store->getStoreInfoByID($seller_info['store_id']);
     //更新卖家登陆时间
     $model_seller->editSeller(array('last_login_time' => TIMESTAMP), array('seller_id' => $seller_info['seller_id']));
     //生成登录令牌
     $token = $this->_get_token($seller_info['seller_id'], $seller_info['seller_name'], $_POST['client']);
     if ($token) {
         output_data(array('seller_name' => $seller_info['seller_name'], 'store_name' => $store_info['store_name'], 'key' => $token));
     } else {
         output_error('登录失败');
     }
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:36,代码来源:seller_login.php

示例4: voucher_listOp

 /**
  * 地址列表
  */
 public function voucher_listOp()
 {
     $model_voucher = Model('voucher');
     $voucher_list = $model_voucher->getMemberVoucherList($this->member_info['member_id'], $_POST['voucher_state'], $this->page);
     $page_count = $model_voucher->gettotalpage();
     output_data(array('voucher_list' => $voucher_list), mobile_page($page_count));
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:10,代码来源:member_voucher.php

示例5: get_recommend_goods_listOp

 /**
  * 获取推荐商品列表
  */
 public function get_recommend_goods_listOp()
 {
     $recommend_goods_list = Model('goods_class')->getGoodsClassListByParentId(0);
     if ($recommend_goods_list) {
         $model_goods = Model('goods');
         foreach ($recommend_goods_list as $k => $v) {
             $goods_list = $model_goods->getGeneralGoodsOnlineList(array('gc_id_1' => $v['gc_id']), 'goods_id,goods_name,goods_price,goods_promotion_price,goods_promotion_type,distribution_price,goods_storage,goods_marketprice,goods_image', 6, 'goods_salenum desc');
             if ($goods_list) {
                 foreach ($goods_list as $kk => $vv) {
                     if ($vv['goods_promotion_type'] > 0) {
                         $goods_list[$kk]['goods_price'] = $vv['goods_promotion_price'];
                     } elseif ($vv['distribution_price'] > 0) {
                         $goods_list[$kk]['goods_price'] = $vv['distribution_price'];
                     }
                     $goods_list[$kk]['img_url'] = thumb($vv, 360);
                     $goods_list[$kk]['discount'] = sprintf('%0.1f', $goods_list[$kk]['goods_price'] / $vv['goods_marketprice'] * 10);
                 }
                 $recommend_goods_list[$k]['list'] = $goods_list;
             } else {
                 unset($recommend_goods_list[$k]);
             }
         }
     }
     output_data(array('recommend_goods_list' => $recommend_goods_list));
 }
开发者ID:sdjncjc,项目名称:meizhan,代码行数:28,代码来源:mz_index.php

示例6: designer_work_listOp

 public function designer_work_listOp()
 {
     error_reporting(0);
     $post = $this->read_json();
     $arr = OTA($post);
     $_REQUEST = array_merge($_REQUEST, $arr);
     //  var_dump($_REQUEST);
     //  exit();
     //       $arr=objectToArray($post);
     //       $_REQUEST=array_merge($_REQUEST,$arr);
     //       $goods_id = intval($_REQUEST ['goods_id']);
     $model_designer_work = Model('designer_work');
     //        // $model_search = Model('search');
     //       // $condition['designer_work.sn_if_show']=1;
     //        if(!empty($_REQUEST['id']) && intval($_REQUEST['id']) > 0) {
     //        $condition = " and designer_work.id=".$_REQUEST['id'];
     //        } elseif (!empty($_REQUEST['conditions']['matchValue'])) {
     //        $condition['designer_work.sn_name|designer_work.sn_content'] = array('like', '%' . $_REQUEST['conditions']['matchValue'] . '%');
     //        }
     //$condition['sn_name|sn_content'] = array('like', '%' . 'abc'. '%');
     //   output_data(array('desginers_work_list' => $post));
     $field = 'designer_work.id,designer_work.sn_collect,designer_work.sn_category,designer_work.sn_style,designer_work.sn_m_pic,designer_work.sn_work_pic,designer_work.sn_area,designer_work.sn_cost,designer_work.sn_content,designer_work.sn_add_time,designer_work.sn_house_type,designer_work.sn_collection_count,designer_work.sn_share_count,designer_work.sn_designer_id,designer.sn_title,designer_work.sn_name,designer.sn_head,designer.sn_designer_style,designer.sn_designer_enter_time,designer.sn_designer_collect,designer.sn_store_id,designer.sn_store_name';
     $designers_work_list = $model_designer_work->getDesignerWorkList($post->conditions, $field, $_REQUEST['pageCount']);
     // var_dump($designers_work_list);
     // output_data(array('desginers_work_list' => $post));
     $page_count = $model_designer_work->gettotalpage();
     //优先从全文索引库里查找
     output_data(array('desginers_work_list' => $designers_work_list), mobile_page($page_count));
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:29,代码来源:designer_work.php

示例7: getTeamMemberRankOp

 public function getTeamMemberRankOp()
 {
     $city_info = array();
     $city_info['team_type'] = 0;
     $city_info['city_school_id'] = intval($_GET["city_school_id"]);
     $team_member_info = Model('mz_member')->getMemberInfo(array('member_id' => $this->member_info['member_id']), "*", array('mz_team'));
     if (!empty($team_member_info['extend_team_info'])) {
         $city_info['team_type'] = $team_member_info['extend_team_info']['team_type'];
         if ($city_info['city_school_id'] == 0) {
             $city_info['city_school_id'] = $team_member_info['extend_team_info']['city_school_id'];
         }
     }
     if ($city_info['team_type'] == 0) {
         $city_info['provinceid'] = Model("area")->where(array('area_id' => $city_info['city_school_id']))->get_field("area_parent_id");
     } else {
         $city_info['provinceid'] = Model("school")->where(array('id' => $city_info['city_school_id']))->get_field("province_id");
     }
     $condition = array();
     $condition['mz_team.city_school_id'] = $city_info['city_school_id'];
     $condition['mz_team.team_status'] = 1;
     $team_member_list = Model()->table('mz_member,mz_team')->field("mz_member.*,mz_team.team_name")->join('left')->on("mz_member.team_id = mz_team.team_id")->where($condition)->order("integral desc")->limit(10)->select();
     if (!empty($team_member_list)) {
         foreach ($team_member_list as $key => $value) {
             $team_member_list[$key]['member_name'] = Model("member")->where(array('member_id' => $value['member_id']))->get_field('member_name');
         }
     }
     output_data(array("data" => array('team_member_list' => $team_member_list, 'city_info' => $city_info)));
 }
开发者ID:sdjncjc,项目名称:meizhan,代码行数:28,代码来源:mz_team_rank.php

示例8: _get_Own_Store_List

 private function _get_Own_Store_List()
 {
     $model_store = Model('store');
     //查询条件
     $condition = array();
     if (!empty($_GET['sc_id']) && intval($_GET['sc_id']) > 0) {
         $condition['sc_id'] = $_GET['sc_id'];
     } elseif (!empty($_GET['keyword'])) {
         //$condition['store_name'] = array('like', '%' . $_GET['keyword'] . '%');
     }
     //所需字段
     $fields = "*";
     //排序方式
     $order = $this->_store_list_order($_GET['key'], $_GET['order']);
     $store_list = $model_store->where($condition)->order($order)->page(10)->select();
     $page_count = $model_store->gettotalpage();
     $own_store_list = $store_list;
     $simply_store_list = array();
     foreach ($own_store_list as $key => $value) {
         $simply_store_list[$key]['store_id'] = $own_store_list[$key]['store_id'];
         $simply_store_list[$key]['store_name'] = $own_store_list[$key]['store_name'];
         $simply_store_list[$key]['store_address'] = $own_store_list[$key]['store_address'];
         $simply_store_list[$key]['store_area_info'] = $own_store_list[$key]['area_info'];
     }
     output_data(array('store_list' => $simply_store_list), mobile_page($page_count));
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:26,代码来源:shop.php

示例9: companiesOp

 /**
  * GET 属于某服务的所有单位
  */
 public function companiesOp()
 {
     $model_company = Model('company');
     $condition['ac_id'] = intval($_GET['service_id']);
     $condition['like_title'] = trim($_GET['search_title']);
     $company_list = $model_company->getcompanyList($condition);
     output_data(array('companies' => $company_list));
 }
开发者ID:ff00x0,项目名称:shopnc-api,代码行数:11,代码来源:service.php

示例10: getpWpayOp

 public function getpWpayOp()
 {
     $pay_sn = $_REQUEST['pay_sn'];
     $payment_api = $this->_get_payment_api();
     $return = $payment_api->getpWpay($pay_sn);
     //return $return;
     output_data(array('prepay_id' => $return), $payment_api->parameters);
 }
开发者ID:lehman3087,项目名称:wanhaoshop,代码行数:8,代码来源:payment.php

示例11: indexOp

 public function indexOp()
 {
     $article_class_model = Model('article_class');
     $article_model = Model('article');
     $condition = array();
     $article_class = $article_class_model->getClassList($condition);
     output_data(array('article_class' => $article_class));
 }
开发者ID:Maplecms,项目名称:shopnc-api,代码行数:8,代码来源:article_class.php

示例12: image_uploadOp

 public function image_uploadOp()
 {
     $logic_goods = Logic('goods');
     $result = $logic_goods->uploadGoodsImage($_POST['name'], $this->seller_info['store_id'], $this->store_grade['sg_album_limit']);
     if (!$result['state']) {
         output_error($result['msg']);
     }
     output_data(array('image_name' => $result['data']['name']));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:9,代码来源:seller_album.php

示例13: indexOp

    /**
     * 我的商城
     */
	public function indexOp() {
        $member_info = array();
        $member_info['user_name'] = $this->member_info['member_name'];
        $member_info['avator'] = getMemberAvatarForID($this->member_info['member_id']);
        $member_info['point'] = $this->member_info['member_points'];
        $member_info['predepoit'] = $this->member_info['available_predeposit'];

        output_data(array('member_info' => $member_info));
	}
开发者ID:noikiy,项目名称:ejia,代码行数:12,代码来源:member_index.php

示例14: get_zt_listOp

 /**
  * 自提物流列表
  */
 public function get_zt_listOp()
 {
     $express_list = rkcache('express', true);
     foreach ($express_list as $k => $v) {
         if ($v['e_zt_state'] == '0') {
             unset($express_list[$k]);
         }
     }
     output_data(array('express_array' => $express_list));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:13,代码来源:seller_express.php

示例15: recommend_listOp

 public function recommend_listOp()
 {
     $brand_list = Model('brand')->getBrandPassedList(array('brand_recommend' => '1'), 'brand_id,brand_name,brand_pic');
     if (!empty($brand_list)) {
         foreach ($brand_list as $key => $val) {
             $brand_list[$key]['brand_pic'] = brandImage($val['brand_pic']);
         }
     }
     output_data(array('brand_list' => $brand_list));
 }
开发者ID:noikiy,项目名称:meizhan,代码行数:10,代码来源:brand.php


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