本文整理汇总了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;
}
示例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);
}
}
示例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);
}
//}
}
}
示例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');
}