本文整理汇总了PHP中BaseController::fileUpload方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::fileUpload方法的具体用法?PHP BaseController::fileUpload怎么用?PHP BaseController::fileUpload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::fileUpload方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveSupportingDocument
public function saveSupportingDocument()
{
$doc_upload = parent::fileUpload('doc_upload', 'lib_supporting_docs');
$sd = new LibSupportingDocument();
$sd->doc_title = Input::get('doc_title');
$sd->doc_authors = Input::get('doc_authors');
$sd->doc_type = Input::get('doc_type');
$sd->doc_subject = Input::get('doc_subject');
$sd->doc_tags = Input::get('doc_tags');
$sd->doc_series = Input::get('doc_series');
$sd->doc_edition = Input::get('doc_edition');
$sd->doc_part = Input::get('doc_part');
$sd->doc_volume = Input::get('doc_volume');
$sd->doc_amendment = Input::get('doc_amendment');
$sd->doc_published_year = Input::get('doc_published_year');
$sd->doc_isbn = Input::get('doc_isbn');
$sd->doc_upload = $doc_upload;
$sd->doc_url = Input::get('doc_url');
$sd->doc_status = Input::get('doc_status');
$sd->row_creator = Auth::user()->getName();
$sd->row_updator = Auth::user()->getName();
$sd->soft_delete = 0;
$sd->save();
return Redirect::back()->with('message', 'Supporting Docs Saved ');
}
示例2: saveLegalOpinion
public function saveLegalOpinion()
{
DB::table('edp_legal_opinion')->insert(array('edp_number' => Input::get('edp_number'), 'legal_openion' => Input::get('legal_openion'), 'row_creator' => Auth::user()->getName(), 'creator_emp_id' => Auth::user()->getId(), 'row_updator' => Auth::user()->getName(), 'updater_emp_id' => Auth::user()->getId(), 'soft_delete' => 0, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
//file upload
//getting mother id
$motherId = DB::table('edp_legal_opinion')->where('edp_number', Input::get('edp_number'))->orderBy('id', 'desc')->first();
$upload_file = parent::fileUpload('doc', 'documents');
//Save to document table
DB::table('documents')->insert(array('table_name' => 'edp_legal_opinion', 'mother_id' => $motherId->id, 'calling_id' => $upload_file, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::back()->with('message', 'Leagal Opinion Saved !');
}
示例3: saveOrgDocument
public function saveOrgDocument()
{
$file_name = parent::fileUpload('file_name', 'org_document');
$effective_date = Input::get('effective_date') . ' ' . Input::get('effective_month') . ' ' . Input::get('effective_year');
$timestamp = strtotime($effective_date);
$effective_date = date('Y-m-d', $timestamp);
$renewal_date = Input::get('renewal_date') . ' ' . Input::get('renewal_month') . ' ' . Input::get('renewal_year');
$timestamp = strtotime($renewal_date);
$renewal_date = date('Y-m-d', $timestamp);
DB::table('org_document_list')->insert(array('org_number' => Input::get('org_number'), 'org_name' => Input::get('org_name'), 'active' => Input::get('active'), 'title' => Input::get('title'), 'effective_date' => $effective_date, 'category' => Input::get('category'), 'file_name' => $file_name, 'renewal_date' => $renewal_date, 'doc_note' => Input::get('doc_note'), 'row_creator' => Auth::user()->getName(), 'row_updator' => Auth::user()->getName(), 'approve' => '0', 'warning' => '0', 'soft_delete' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::back()->with('message', 'Document Saved');
}
示例4: saveAnswre
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function saveAnswre()
{
$file = parent::fileUpload('file', 'helpFaq');
DB::table('help_faq_ans')->insert(array('question_id' => Input::get('question_id'), 'ans' => Input::get('ans'), 'file' => $file, 'row_creator' => Auth::user()->getName(), 'row_updator' => Auth::user()->getName(), 'soft_delete' => '0', 'approve' => '0', 'warning' => '0', 'soft_delete' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::back()->with('message', 'Answer Saved');
}
示例5: saveEquipmentReview
public function saveEquipmentReview()
{
$aircraft = new AircraftEquipmentReviewInfo();
$aircraft->aircraft_MM = Input::get('aircraft_MM');
$aircraft->aircraft_MSN = Input::get('aircraft_MSN');
$aircraft->review_date = Input::get('review_date');
$aircraft->review_month = Input::get('review_month');
$aircraft->review_year = Input::get('review_year');
$aircraft->review_active = Input::get('review_active');
$aircraft->purpose_of_review = Input::get('purpose_of_review');
$aircraft->location = Input::get('location');
$aircraft->airframe_hours = Input::get('airframe_hours');
$aircraft->engine1_hours = Input::get('engine1_hours');
$aircraft->engine2_hours = Input::get('engine2_hours');
$aircraft->engine1_TSO = Input::get('engine1_TSO');
$aircraft->engine2_TSO = Input::get('engine2_TSO');
$aircraft->engine1_MMS = Input::get('engine1_MMS');
$aircraft->engine2_MMS = Input::get('engine2_MMS');
$aircraft->prop_rotor1_MMS = Input::get('prop_rotor1_MMS');
$aircraft->prop_rotor2_MMS = Input::get('prop_rotor2_MMS');
$aircraft->governor1_MMS = Input::get('governor1_MMS');
$aircraft->governor2_MMS = Input::get('governor2_MMS');
$aircraft->nav1_MMS = Input::get('nav1_MMS');
$aircraft->nav2_MMS = Input::get('nav2_MMS');
$aircraft->gps_mm = Input::get('gps_mm');
$aircraft->adf_mm = Input::get('adf_mm');
$aircraft->ils_mm = Input::get('ils_mm');
$aircraft->vnav_mm = Input::get('vnav_mm');
$aircraft->comm1_mm = Input::get('comm1_mm');
$aircraft->comm2_mm = Input::get('comm2_mm');
$aircraft->lr_comm_mm = Input::get('lr_comm_mm');
$aircraft->tcas_mm = Input::get('tcas_mm');
$aircraft->transponder_mm = Input::get('transponder_mm');
$aircraft->transponder_mode = Input::get('transponder_mode');
$aircraft->fdr_mm = Input::get('fdr_mm');
$aircraft->fdr_mode = Input::get('fdr_mode');
$aircraft->fdr_pinger_type = Input::get('fdr_pinger_type');
$aircraft->cvr_mm = Input::get('cvr_mm');
$aircraft->elt_mm = Input::get('elt_mm');
$aircraft->note = Input::get('note');
$equip_upload = parent::fileUpload('equip_upload', 'air_equip_upload');
$aircraft->equip_upload = $equip_upload;
$aircraft->approve = '0';
$aircraft->warning = '0';
$aircraft->soft_delete = '0';
$aircraft->created_at = date('Y-m-d H:i:s');
$aircraft->updated_at = date('Y-m-d H:i:s');
$aircraft->save();
return Redirect::back()->with('massage', 'Information Added Successfully!');
}
示例6: saveFollowUp
public function saveFollowUp()
{
$follow_up_file = parent::fileUpload('follow_up_file', 'sc_follow_up_file');
$sc = new SCFollowUp();
$sc->safety_issue_number = Input::get('sc_num', ' ');
$sc->user_name = Auth::User()->getName();
$sc->user_id = Auth::User()->emp_id();
$sc->follow_up = Input::get('follow_up', ' ');
$sc->follow_up_file = $follow_up_file;
$sc->chat_time = time('A');
$sc->row_creator = Auth::user()->getName();
$sc->soft_delete = 0;
$sc->save();
return Redirect::to(URL::previous() . "#approval")->with('message', 'SC Approved!!');
//return Redirect::back()->with('message', '');
}
示例7: saveAccademic
public function saveAccademic()
{
$certificate = parent::fileUpload('certificate', 'employee');
DB::table('qualification_edu_accademic')->insert(array('emp_id' => Auth::user()->emp_id(), 'level' => Input::get('level', ' '), 'name_of_degree' => Input::get('name_of_degree', ' '), 'discipline' => Input::get('discipline', ' '), 'specialization' => Input::get('specialization', ' '), 'institute' => Input::get('institute', ' '), 'pussing_year' => Input::get('pussing_year', ' '), 'standard' => Input::get('standard', ' '), 'grade_division' => Input::get('grade_division', ' '), 'certificate' => $certificate, 'out_of' => Input::get('out_of', false), 'verify' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::to('qualification/education')->with('message', 'Successfully Saved!!');
}
示例8: saveTrainingDetails
public function saveTrainingDetails()
{
$file = parent::fileUpload('file', 'pelTrainingDetails');
DB::table('pel_training_details')->insert(array('emp_id' => Auth::user()->emp_id(), 'name_of_the_course' => Input::get('name_of_the_course'), 'name_of_the_institute' => Input::get('name_of_the_institute'), 'start_date' => Input::get('start_date'), 'start_month' => Input::get('start_month'), 'start_year' => Input::get('start_year'), 'end_date' => Input::get('end_date'), 'end_month' => Input::get('end_month'), 'end_year' => Input::get('end_year'), 'certificate_issue_date' => Input::get('certificate_issue_date'), 'certificate_issue_month' => Input::get('certificate_issue_month'), 'certificate_issue_year' => Input::get('certificate_issue_year'), 'expiration_date' => Input::get('expiration_date'), 'expiration_month' => Input::get('expiration_month'), 'expiration_year' => Input::get('expiration_year'), 'duration' => Input::get('duration'), 'approved_by' => Input::get('approved_by'), 'file' => $file, 'row_creator' => Auth::user()->getName(), 'approve' => 0, 'warning' => 0, 'soft_delete' => 0, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::back()->with('message', 'Trainign Details Saved!!');
}
示例9: saveAction
public function saveAction()
{
$pageId = Input::get('report_id');
$userEmail = DB::table('voluntary_reporting')->where('id', $pageId)->pluck('email');
$reportTitle = DB::table('voluntary_reporting')->where('id', $pageId)->pluck('title');
$file = parent::fileUpload('file', 'voluntaryReporting');
$notify = Input::get('notify');
if ($notify) {
$notify = 'Yes';
} else {
$notify = 'No';
}
DB::table('voluntary_reporting_action')->insert(array('report_id' => Input::get('report_id'), 'action_details' => Input::get('action_details'), 'file' => $file, 'notify' => $notify, 'row_creator' => Auth::user()->getName(), 'row_updator' => Auth::user()->getName(), 'soft_delete' => '0', 'approve' => '0', 'warning' => '0', 'soft_delete' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
//mail sending
if ($notify == 'Yes') {
$to = $userEmail;
$subject = "DFSR-CAAB: Your Voluntary Report In Action";
$message = "\n\t\t\t\t<html>\n\t\t\t\t<head>\n\t\t\t\t<title>DFSR-CAAB: Your Voluntary Report In Action</title>\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t\t<h2>DFSR-CAAB: Your Voluntary Report In Action</h2>\n\t\t\t\t<br>Your voluntary report titled '" . $reportTitle . " ' is in action. \n\t\t\t\t<br>Thanks for your cooperation.\n\t\t\t\t\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <ASRTM@dfsr.gov.bd>' . "\r\n";
//$headers .= 'Cc: myboss@example.com' . "\r\n";
if (mail($to, $subject, $message, $headers)) {
$success = 'Reporter Notified &';
} else {
$success = 'Reporter Notification Failled &';
}
} else {
$success = 'Reporter is not Notified & ';
}
return Redirect::to(URL::previous() . "#{$pageId}")->with('message', $success . ' Action Saved');
}
示例10: updateFormalOjtStatus
public function updateFormalOjtStatus()
{
$certificate = parent::fileUpload('certificate', 'itsOjt');
//$doc_upload=parent::updateFileUpload('old_doc_upload','doc_upload','lib_supporting_docs');
$start_date = Input::get('start_date') . ' ' . Input::get('start_month') . ' ' . Input::get('start_year');
$timestamp = strtotime($start_date);
$start_date = date('Y-m-d', $timestamp);
$completion_date = Input::get('completion_date') . ' ' . Input::get('completion_month') . ' ' . Input::get('completion_year');
$timestamp = strtotime($completion_date);
$completion_date = date('Y-m-d', $timestamp);
$validity_date = Input::get('validity_date') . ' ' . Input::get('validity_month') . ' ' . Input::get('validity_year');
$timestamp = strtotime($validity_date);
$validity_date = date('Y-m-d', $timestamp);
$level = Input::get('level', ' ');
if (!Input::has('itscn')) {
$itscn = 0;
} else {
$itscn = Input::get('itscn');
}
if (!Input::has('ojt_task_no')) {
$ojt_task_no = 0;
} else {
$ojt_task_no = Input::get('ojt_task_no');
}
DB::table('itsojt_formal_ojt_course_status')->insert(array('itscn' => $itscn, 'ojt_task_no' => $ojt_task_no, 'emp_tracker' => Input::get('emp_tracker', ' '), 'level' => $level, 'instructor' => Input::get('instructor', ' '), 'supervisor' => Input::get('supervisor', ' '), 'manager' => Input::get('manager', ' '), 'start_date' => $start_date, 'completion_date' => $completion_date, 'validity_date' => $validity_date, 'certificate' => $certificate, 'completion_status' => Input::get('completion_status', ' '), 'notes' => Input::get('notes'), 'row_creator' => Auth::user()->getName(), 'row_updator' => Auth::user()->getName(), 'soft_delete' => '0', 'approve' => '1', 'warning' => '0', 'soft_delete' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::to(URL::previous() . "#{$level}")->with('message', 'Status Updated!!');
//return Redirect::back()->with('message','Status Updated!');
}
示例11: saveFinding
public function saveFinding()
{
$target_date = Input::get('date') . ' ' . Input::get('month') . ' ' . Input::get('year');
$strtotime = strtotime($target_date);
$target_date = date('Y-m-d', $strtotime);
//file upload
if (Input::file('upload_file')) {
$size = Input::file('upload_file')->getSize() / 1024;
} else {
$size = -1;
}
// return $size;
if ($size < 250 || $size == -1) {
$upload_file = parent::fileUpload('upload_file', 'sia_finding');
$data = DB::table('sia_findings')->insert(array('finding_number' => Input::get('finding_number', ' '), 'title' => Input::get('title', ' '), 'sia_number' => Input::get('sia_number', ' '), 'finding' => Input::get('finding', ' '), 'target_date' => $target_date, 'corrective_action_plan' => Input::get('corrective_action_plan', ' '), 'upload_file' => $upload_file, 'row_creator' => Auth::User()->getName(), 'row_updator' => Auth::User()->getName(), 'soft_delete' => '0', 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')));
return Redirect::to(URL::previous() . "#Findings")->with('message', 'Finding Saved!');
}
return Redirect::back()->withInput()->with('error', 'No Data Saved!! File Size Should Be Bellow 250Kb.!!');
}