本文整理汇总了PHP中Family::get_by_employee_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Family::get_by_employee_id方法的具体用法?PHP Family::get_by_employee_id怎么用?PHP Family::get_by_employee_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Family
的用法示例。
在下文中一共展示了Family::get_by_employee_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: family
function family($employee_id = '')
{
$data['page_name'] = '<b>Personal Data Sheet</b>';
$data['section_name'] = '<b>Personal Information</b>';
$data['focus_field'] = 'spouse_lname';
$data['msg'] = '';
$e = new Employee_m();
$data['employee'] = $e->get_by_id($employee_id);
$family = new Family();
if (Input::get('op')) {
$family->get_by_employee_id($employee_id);
$family->employee_id = $employee_id;
$family->spouse_lname = Input::get('spouse_lname');
$family->spouse_fname = Input::get('spouse_fname');
$family->spouse_mname = Input::get('spouse_mname');
$family->spouse_occupation = Input::get('spouse_occupation');
$family->spouse_employer = Input::get('spouse_employer');
$family->spouse_biz_ad = Input::get('spouse_biz_ad');
$family->spouse_tel = Input::get('spouse_tel');
$family->father_lname = Input::get('father_lname');
$family->father_fname = Input::get('father_fname');
$family->father_mname = Input::get('father_mname');
$family->mother_lname = Input::get('mother_lname');
$family->mother_fname = Input::get('mother_fname');
$family->mother_mname = Input::get('mother_mname');
$family->save();
// Children
$c = new Children();
$c->get_by_employee_id($employee_id);
$c->delete_all();
$children = Input::get('children');
$children_birth_day = Input::get('children_birth_day');
$i = 0;
foreach ($children as $child) {
if ($child != "") {
$c = new Children();
$c->employee_id = $employee_id;
$c->children = $children[$i];
$c->birth_date = $children_birth_day[$i];
$c->save();
}
$i++;
}
$data['msg'] = 'Family Background has been saved!';
}
$family = new Family();
$data['family'] = $family->get_by_employee_id($employee_id);
// Children===================================================
$children = new Children();
$children->order_by('birth_date');
$children = $children->get_by_employee_id($employee_id);
$i = 0;
foreach ($children as $child) {
$data['children']['name'][] = $child->children;
$data['children']['birth_date'][] = $child->birth_date;
$i++;
}
if ($i <= 14) {
while ($i != 14) {
$data['children']['name'][] = '';
$data['children']['birth_date'][] = '';
$i++;
}
}
$data['selected'] = $e->office_id;
// Use for office listbox
$data['options'] = $this->options->office_options();
$data['employee_id'] = $employee_id;
$data['main_content'] = 'family';
return View::make('includes/template', $data);
}
示例2: Personal
function page1($employee_id)
{
$this->load->helper('settings');
$this->load->library('fpdf');
//define('FPDF_FONTPATH',$this->config->item('fonts_path'));
$this->load->library('fpdi');
//$this->load->model('Personal_Info');
//Get personal info
//$pi = $this->Personal_Info->get_personal_info($employee_id);
$pi = new Personal();
$pi->get_by_employee_id($employee_id);
//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/page1.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);
/*******************************
*START PERSONAL INFORMATION ==
******************************/
$split[0] = '';
$split[1] = '';
$split[2] = '';
$split[3] = '';
$split[4] = '';
$split[5] = '';
$split[6] = '';
$split[7] = '';
$split[8] = '';
$split[9] = '';
$split[10] = '';
$split[11] = '';
$split[12] = '';
$split[13] = '';
$split[14] = '';
$split[15] = '';
$split[16] = '';
$split[17] = '';
$split[18] = '';
$split[19] = '';
$split[20] = '';
$split[21] = '';
$split[22] = '';
$split[23] = '';
$split[24] = '';
$split[25] = '';
$split[26] = '';
$split[27] = '';
$split[28] = '';
$split[29] = '';
//$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false);
//$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false);
//$pdf->MultiCell(0,3,"hello this is a sample \nlong text with line break" ,'',1,'L',false);
$this->load->helper('text');
//$pdf->MultiCell(0,3,word_wrap("hello this is a sample nlong text with line break", 15) ,'',1,'L',false);
$split = str_split($pi->lname);
// Write something ==LAST NAME =========
$pdf->SetXY(39, 53);
$pdf->Write(0, $split[0]);
$pdf->SetX(44);
$pdf->Write(0, $split[1]);
$pdf->SetX(49);
$pdf->Write(0, $split[2]);
$pdf->SetX(54);
$pdf->Write(0, $split[3]);
$pdf->SetX(60);
$pdf->Write(0, $split[4]);
$pdf->SetX(65);
$pdf->Write(0, $split[5]);
$pdf->SetX(70);
$pdf->Write(0, $split[6]);
$pdf->SetX(75);
$pdf->Write(0, $split[7]);
$pdf->SetX(81);
$pdf->Write(0, $split[8]);
$pdf->SetX(86);
$pdf->Write(0, $split[9]);
$pdf->SetX(91);
$pdf->Write(0, $split[10]);
$pdf->SetX(96);
$pdf->Write(0, $split[11]);
$pdf->SetX(101);
$pdf->Write(0, $split[12]);
$pdf->SetX(106);
$pdf->Write(0, $split[13]);
$pdf->SetX(111);
$pdf->Write(0, $split[14]);
$pdf->SetX(116);
$pdf->Write(0, $split[15]);
$pdf->SetX(121);
$pdf->Write(0, $split[16]);
$pdf->SetX(126);
//.........这里部分代码省略.........