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


PHP Helpers::getUniqueID方法代码示例

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


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

示例1: saveEmail

 public static function saveEmail()
 {
     $attachment_ref = '';
     if (Input::hasFile('attachment')) {
         $attachment_ref = Helpers::getUniqueID();
         Helpers::uploadCampaignFile(Input::file('attachment'), $attachment_ref);
     }
     DB::table('mradi_outbox_email_log')->insert(array("sender" => Helpers::getGlobalValue('SYSTEM_EMAIL'), "message" => Input::get('message'), "subject" => Input::get('subject'), "email_cc" => Input::get('email_cc'), "email_bcc" => Input::get('email_bcc'), "email_to" => Input::get('email_to'), "attachment_ref" => $attachment_ref));
     return true;
 }
开发者ID:centaurustech,项目名称:bmradi,代码行数:10,代码来源:Conversation.php

示例2: SaveFinancials

 public function SaveFinancials()
 {
     error_log("save financial....");
     $rules = array('f_statement' => 'image|required_if:f_statement_h,0');
     $validator = Validator::make(Input::all(), $rules);
     // check if the validator failed -----------------------
     if ($validator->fails()) {
         return Redirect::to(URL::previous())->withErrors($validator)->withInput()->with('activetab', Input::get('activetab'));
     } else {
         if (Helpers::isNewCampaign(Input::get('campaign'), 7)) {
             $f_statement_ref = Helpers::getUniqueID();
             DB::table('tbl_campaign_financials')->insert(array('campaign_id' => Helpers::getCampaignID(Input::get('campaign')), 'financial_statement' => $f_statement_ref));
             // Insert upload file data
             $file = Helpers::uploadCampaignFile(Input::file('f_statement'), $f_statement_ref);
             // Progress Campaign progress
             Helpers::progressCampaign(Input::get('campaign'), 7);
         } else {
             $f_statement_ref = Input::get('f_statement_h');
             // Insert upload file data
             if (Input::hasFile('f_statement')) {
                 error_log("saving image....");
                 $file = Helpers::uploadCampaignFile(Input::file('f_statement'), $f_statement_ref);
             }
         }
         $tab = explode("_", Input::get('activetab'));
         $active_tab = "tab_" . ($tab[1] + 1);
         return Redirect::to(URL::route('campaign_info', array('campaign' => Input::get('campaign'))))->with('activetab', $active_tab);
     }
 }
开发者ID:centaurustech,项目名称:bmradi,代码行数:29,代码来源:CampaignController.php

示例3: uploadCampaignFile

 public static function uploadCampaignFile($files, $reference)
 {
     if (count($files) > 0) {
         //            if(Input::hasFile($files[0]))
         //                {
         //foreach ($files as $fileInput) {error_log("image upload 12");
         if (isset($files)) {
             $file_alias = Helpers::getUniqueID() . "_" . $files->getClientOriginalName();
             $files->move(storage_path() . "/campaigns", $file_alias);
             Helpers::uploadFileData($reference, $files->getClientOriginalName(), $file_alias);
         }
         //}
     }
 }
开发者ID:centaurustech,项目名称:bmradi,代码行数:14,代码来源:Helpers.php

示例4: postProfileEdit

 public function postProfileEdit()
 {
     $data = ['phone' => Input::get('phone'), 'address' => Input::get('address'), 'location' => Input::get('location')];
     $rules = ['phone' => 'required', 'address' => 'required', 'location' => 'required'];
     if (Input::hasFile('photo')) {
         $photo_ref = Helpers::getUniqueID();
         $data['profile_pic'] = $photo_ref;
         $file = Helpers::uploadCampaignFile(Input::file('photo'), $photo_ref);
     }
     $valid = Validator::make($data, $rules);
     if ($valid) {
         $user_id = Input::get('id');
         array_filter($data);
         $details = array();
         foreach ($data as $k => $dt) {
             if ($k != 'phone') {
                 $details[$k] = $dt;
             }
         }
         Helpers::logAction("Profile Edit");
         DB::table('mradi_accounts_profile')->where('account_id', Session::get('account_id'))->update($details);
         DB::table('accounts_dbx')->where('account_id', Session::get('account_id'))->update(array('phone' => Input::get('phone')));
         Session::flash('common_feedback', '<div class="alert alert-success" style="width: 500px;">Profile updated.</div>');
         return View::make('admin.pages.my_profile');
     }
     Session::flash('common_feedback', '<div class="alert alert-warning" style="width: 500px;">Error updating profile. Please try again later</div>');
     return View::make('admin.pages.my_profile');
 }
开发者ID:centaurustech,项目名称:bmradi,代码行数:28,代码来源:AccountController.php


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