本文整理汇总了PHP中Reference::get_by_employee_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Reference::get_by_employee_id方法的具体用法?PHP Reference::get_by_employee_id怎么用?PHP Reference::get_by_employee_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reference
的用法示例。
在下文中一共展示了Reference::get_by_employee_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
function other_info($employee_id = '')
{
$data['page_name'] = '<b>Personal Data Sheet</b>';
$data['section_name'] = '<b>Personal Information</b>';
$data['focus_field'] = 'skill';
$data['msg'] = '';
$e = new Employee_m();
$data['employee'] = $e->get_by_id($employee_id);
if (Input::get('op')) {
// OTHER INFORMATION=========================
$skills = Input::get('skill');
$recognition = Input::get('recognition');
$membership_organization = Input::get('membership_organization');
$o = new Other_info();
$o->get_by_employee_id($employee_id);
$o->delete_all();
$i = 0;
foreach ($skills as $skill) {
$o = new Other_info();
$o->employee_id = $employee_id;
$o->special_skills = $skills[$i];
$o->recognition = $recognition[$i];
$o->membership_organization = $membership_organization[$i];
$o->save();
$i++;
}
// QUESTIONS=======================================
$questions = Input::get('q');
$answer = Input::get('q');
$details = Input::get('details');
$q = new Question();
$q->get_by_employee_id($employee_id);
// Delete Questions
$q->delete_all();
$i = 0;
$count = 0;
foreach ($questions as $question) {
$count += 1;
$q = new Question();
$q->employee_id = $employee_id;
$q->question_no = $count;
$q->answer = $answer[$i];
$q->details = $details[$i];
$q->save();
$i++;
}
// REFERENCE
$names = Input::get('ref_name');
$address = Input::get('ref_address');
$no = Input::get('ref_tel');
$r = new Reference();
$r->get_by_employee_id($employee_id);
$r->delete_all();
$i = 0;
foreach ($names as $name) {
$r = new Reference();
$r->employee_id = $employee_id;
$r->name = $names[$i];
$r->address = $address[$i];
$r->tel_no = $no[$i];
$r->ctc_no = Input::get('ctc_no');
$r->issue_at = Input::get('issue_at');
$r->issue_on = Input::get('issue_on');
$r->save();
$i++;
}
$data['msg'] = 'Other Information has been saved!';
}
// Other information============================================
$o = new Other_info();
$data['infos'] = $o->get_by_employee_id($employee_id);
// Question ====================================================
$q = new Question();
$data['question_options'] = array('0' => 'No', '1' => 'Yes');
$data['question1'] = $q->get_question($employee_id, 1);
$data['question2'] = $q->get_question($employee_id, 2);
$data['question3'] = $q->get_question($employee_id, 3);
$data['question4'] = $q->get_question($employee_id, 4);
$data['question5'] = $q->get_question($employee_id, 5);
$data['question6'] = $q->get_question($employee_id, 6);
$data['question7'] = $q->get_question($employee_id, 7);
$data['question8'] = $q->get_question($employee_id, 8);
$data['question9'] = $q->get_question($employee_id, 9);
$data['question10'] = $q->get_question($employee_id, 10);
// References=================================================
$r = new Reference();
$data['references'] = $r->get_by_employee_id($employee_id);
$data['selected'] = $e->office_id;
//Use for office listbox
$data['options'] = $this->options->office_options();
$data['employee_id'] = $employee_id;
$data['main_content'] = 'other_info';
return View::make('includes/template', $data);
}
示例2: FPDI
function page4($employee_id)
{
$this->load->helper('settings');
$this->load->library('fpdf');
//define('FPDF_FONTPATH',$this->config->item('fonts_path'));
$this->load->library('fpdi');
//print_r($personal_info);
// initiate FPDI
$pdf = new FPDI('P', 'mm', 'Legal');
// add a page
$pdf->AddPage();
// set the sourcefile
$pdf->setSourceFile('dtr/template/pds/page4.pdf');
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 1, 1, 210);
// now write some text above the imported page
$pdf->SetFont('Arial');
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(8, 14);
$q = new Question();
$q->order_by('question_no');
$questions = $q->get_by_employee_id($employee_id);
foreach ($questions as $question) {
if ($question->question_no == 1) {
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 2) {
$pdf->Ln(21);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 3) {
$pdf->Ln(26);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 4) {
$pdf->Ln(21);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 5) {
$pdf->Ln(26);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 6) {
$pdf->Ln(26);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 7) {
$pdf->Ln(21);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
}
$pdf->SetX($setx);
$pdf->Write(0, 'X');
}
if ($question->question_no == 8) {
$pdf->Ln(35);
if ($question->answer == 1) {
$setx = 138.5;
} else {
$setx = 164;
//.........这里部分代码省略.........