當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。