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


PHP CommonController::postsend方法代码示例

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


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

示例1: messagestate

 public function messagestate()
 {
     $message['cus_id'] = Auth::id();
     $message['id'] = Input::get('id');
     $postFun = new CommonController();
     $a = Input::get('status');
     if (Input::get('status') == NULL) {
         echo $postFun->postsend("http://swap.5067.org/admin/del.php", $message);
     } else {
         $message['status'] = Input::post('status');
         echo $postFun->postsend("http://swap.5067.org/admin/status.php", $message);
     }
 }
开发者ID:baiduXM,项目名称:gbpen,代码行数:13,代码来源:FeedbackController.php

示例2: getmessageboard

 public function getmessageboard()
 {
     $message['cus_id'] = Auth::id();
     $message['page'] = Input::get('page');
     $message['per_page'] = Input::get('per_page');
     $postFun = new CommonController();
     echo $postFun->postsend("http://www.message.com/message/list.php", $message);
 }
开发者ID:GBPcoder,项目名称:tpanel,代码行数:8,代码来源:FeedbackController.php

示例3: getCount

 public function getCount()
 {
     $cus_id = Auth::id();
     $param['cus_id'] = $cus_id;
     $postFun = new CommonController();
     $res2 = $postFun->postsend("http://swap.5067.org/admin/statis_admin.php", $param);
     $data = json_decode($res2);
     if ($data != NULL) {
         $res = Response::json(['err' => 0, 'msg' => '获取统计数据成功', 'data' => $data]);
     } else {
         $res = Response::json(['err' => 1, 'msg' => '获取统计数据失败', 'data' => null]);
     }
     return $res;
 }
开发者ID:baiduXM,项目名称:gbpen,代码行数:14,代码来源:StatisController.php

示例4: sendCusAllData

 public function sendCusAllData($url = '')
 {
     $id = $this->cus_id;
     $type = $this->type;
     $string = $this->searchPreview();
     if ($string) {
         $file_arr = $this->getFile(app_path('views/templates/' . $this->themename));
         $file_name = "";
         $file_content = "";
         foreach ($file_arr as &$file) {
             if (preg_match('/^_.*/i', $file) || $file == 'searchresult.html') {
                 $file_name .= $file . '@';
                 $file_content .= file_get_contents(app_path('views/templates/' . $this->themename . '/' . $file)) . '@#@';
             }
         }
         $file_name = rtrim($file_name, '@');
         $file_content = rtrim($file_content, '@#@');
         $postFun = new CommonController();
         $postFun->postsend($url, array("id" => $id, 'type' => $type, 'string' => $string, 'file_name' => $file_name, 'file_content' => $file_content));
     }
 }
开发者ID:baiduXM,项目名称:gbpen,代码行数:21,代码来源:PrintContorller.php

示例5: deleteFormUserdata

 /**
  * 删除用户数据
  */
 public function deleteFormUserdata()
 {
     $form_id = Input::get('form_id');
     $id = Input::get('id');
     $param['form_id'] = $form_id;
     $param['id'] = $id;
     $param['flag'] = 1;
     $param['host'] = $_SERVER['HTTP_HOST'];
     Classify::where('form_id', $form_id)->update(['pushed' => 1]);
     //		$res = DB::table('form_data_' . $form_id % 10)->where('id', $id)->delete();
     $postFun = new CommonController();
     $res = $postFun->postsend("http://swap.5067.org/admin/form_userdata_delete.php", $param);
     if ($res == 1) {
         $json = Response::json(['err' => 0, 'msg' => '删除成功', 'data' => $res]);
     } else {
         $json = Response::json(['err' => 1, 'msg' => '删除失败', 'data' => '']);
     }
     return $json;
 }
开发者ID:baiduXM,项目名称:gbpen,代码行数:22,代码来源:FormController.php

示例6: modifyCustomer

 /**
  * 创建用户    modifyCustomer
  * @param type name             用户名
  * @param type email            用户邮箱
  * @param type ftp_address      ftp地址
  * @param type ftp_user         ftp帐号
  * @param type ftp_pwd          ftp密码
  * @param type ended_at         用户终止时间
  * @param type status           用户状态
  * @return type data            用户id
  */
 public function modifyCustomer()
 {
     if ($this->authData()) {
         $update['name'] = trim(Input::get('name'));
         $update['email'] = trim(Input::get('email'));
         $update['weburl'] = trim(Input::get('weburl'));
         $update['pc_domain'] = trim(Input::get('pc_domain'));
         $update['mobile_domain'] = trim(Input::get('mobile_domain'));
         if (trim(Input::get('pc_tpl_id')) == '0') {
             $update['pc_tpl_num'] = 1;
         } else {
             $update['pc_tpl_num'] = trim(Input::get('pc_tpl_id'));
         }
         if (trim(Input::get('mobile_tpl_id')) == '0') {
             $update['mobile_tpl_num'] = 1;
         } else {
             $update['mobile_tpl_num'] = trim(Input::get('mobile_tpl_id'));
         }
         $update['stage'] = trim(Input::get('stage'));
         $update['ftp'] = trim(Input::get('ftp'));
         $update['ftp_port'] = trim(Input::get('ftp_port'));
         $update['ftp_dir'] = trim(Input::get('ftp_dir'));
         $update['ftp_address'] = trim(Input::get('ftp_address'));
         $update['ftp_user'] = trim(Input::get('ftp_user'));
         $update['ftp_pwd'] = trim(Input::get('ftp_pwd'));
         $update['ended_at'] = trim(Input::get('ended_at'));
         $update['status'] = Input::get('status');
         $update['customization'] = Input::get('customization');
         //===绑定账户===
         $switch_cus_name = Input::get('switch_cus_name');
         if (!empty($switch_cus_name)) {
             $update['switch_cus_id'] = Customer::where('name', $switch_cus_name)->pluck('id');
         } else {
             $update['switch_cus_id'] = 0;
         }
         //===end===
         //===不能用update数组,因为Customer表中没有capacity/capacity_use字段===
         $capacity = Input::get('capacity') ? trim(Input::get('capacity')) : 300 * 1024 * 1024;
         //默认100MB
         $cus_id = Customer::where('name', $update['name'])->pluck('id');
         if ($cus_id) {
             //修改操作
             $coustomer_old = Customer::where('id', $cus_id)->first();
             $save = Customer::where('id', $cus_id)->update($update);
             $pc_id = Template::where('tpl_num', $update['pc_tpl_num'])->where('type', 1)->pluck('id');
             $mobile_id = Template::where('tpl_num', $update['mobile_tpl_num'])->where('type', 2)->pluck('id');
             $pc_templateid = Template::where('cus_id', $cus_id)->where('type', 1)->pluck('id');
             $mobile_templateid = Template::where('cus_id', $cus_id)->where('type', 2)->pluck('id');
             if ($pc_templateid != NULL) {
                 WebsiteInfo::where('cus_id', $cus_id)->update(['pc_tpl_id' => $pc_templateid]);
             } else {
                 WebsiteInfo::where('cus_id', $cus_id)->update(['pc_tpl_id' => $pc_id]);
             }
             if ($mobile_templateid != NULL) {
                 WebsiteInfo::where('cus_id', $cus_id)->update(['mobile_tpl_id' => $mobile_templateid]);
             } else {
                 WebsiteInfo::where('cus_id', $cus_id)->update(['mobile_tpl_id' => $mobile_id]);
             }
             //WebsiteInfo::where('cus_id',$cus_id)->update(['pc_tpl_id'=>$pc_id,'mobile_tpl_id'=>$mobile_id]);
             //===更新CustomerInfo时,更新capacity字段===
             CustomerInfo::where('cus_id', $cus_id)->update(['pc_domain' => $update['pc_domain'], 'mobile_domain' => $update['mobile_domain'], 'capacity' => $capacity]);
             if ($update['stage'] != $coustomer_old['stage'] or $update['pc_domain'] != $coustomer_old['pc_domain'] or $update['mobile_domain'] != $coustomer_old['mobile_domain']) {
                 $common = new CommonController();
                 @$common->postsend(trim($update['weburl'], '/') . "/urlbind.php", array('cus_name' => $update['name'], 'stage' => $update['stage'], 'pc_domain' => $update['pc_domain'], 'mobile_domain' => $update['mobile_domain'], 'stage_old' => $coustomer_old['stage'], 'pc_domain_old' => $coustomer_old['pc_domain'], 'mobile_domain_old' => $coustomer_old['mobile_domain']));
             }
             if ($save) {
                 $result = ['err' => 1000, 'msg' => '更新用户成功'];
             } else {
                 $result = ['err' => 1002, 'msg' => '更新用户失败'];
             }
         } else {
             //增加操作
             $update['password'] = Hash::make($update['name']);
             $insert_id = Customer::insertGetId($update);
             if ($insert_id) {
                 $pc_id = Template::where('tpl_num', $update['pc_tpl_num'])->where('type', 1)->pluck('id');
                 $mobile_id = Template::where('tpl_num', $update['mobile_tpl_num'])->where('type', 2)->pluck('id');
                 WebsiteInfo::insert(['cus_id' => $insert_id, 'pc_tpl_id' => $pc_id, 'mobile_tpl_id' => $mobile_id]);
                 CustomerInfo::insert(['cus_id' => $insert_id, 'pc_domain' => $update['pc_domain'], 'mobile_domain' => $update['mobile_domain'], 'capacity' => $capacity, 'capacity_use' => 0]);
                 //创建客户目录
                 mkdir(public_path('customers/' . $update['name']));
                 mkdir(public_path('customers/' . $update['name']) . '/detail');
                 mkdir(public_path('customers/' . $update['name']) . '/category');
                 mkdir(public_path('customers/' . $update['name']) . '/images');
                 mkdir(public_path('customers/' . $update['name']) . '/images/l');
                 mkdir(public_path('customers/' . $update['name']) . '/images/l/category');
                 mkdir(public_path('customers/' . $update['name']) . '/images/l/articles');
                 mkdir(public_path('customers/' . $update['name']) . '/images/l/common');
                 mkdir(public_path('customers/' . $update['name']) . '/images/l/page_index');
//.........这里部分代码省略.........
开发者ID:baiduXM,项目名称:gbpen,代码行数:101,代码来源:ApiController.php


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