123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * @author darkredz
- */
- class HolidayController extends DooController {
- function __construct() {
- }
- // //录入用户假期信息
- // public function AddStaffHoliday(){
- // Doo::loadModel('staff');
- // $staff = new staff();
- // $stafflist = $staff->find(array('select' => 'sid,hiredate,nature', 'asArray' => TRUE));
- //
- // Doo::loadModel('holidaystaff');
- // $thistime = time();
- // foreach($stafflist as $k => $v){
- // if(!empty($v['hiredate'])){
- // if($thistime > strtotime("+ 1 year", strtotime($v['hiredate']))){
- // $yearnum = 5;
- // }else{
- // $yearnum = 0;
- // }
- // }else{
- // $yearnum = 0;
- // }
- // $hstaff = new HStaff();
- // $hstaff->uid = $v['sid'];
- // $hstaff->yearnum = $yearnum;
- // $hstaff->insert();
- // }
- // exit;
- // }
- }
- ?>
|