HolidayController.php 784 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * @author darkredz
  4. */
  5. class HolidayController extends DooController {
  6. function __construct() {
  7. }
  8. // //录入用户假期信息
  9. // public function AddStaffHoliday(){
  10. // Doo::loadModel('staff');
  11. // $staff = new staff();
  12. // $stafflist = $staff->find(array('select' => 'sid,hiredate,nature', 'asArray' => TRUE));
  13. //
  14. // Doo::loadModel('holidaystaff');
  15. // $thistime = time();
  16. // foreach($stafflist as $k => $v){
  17. // if(!empty($v['hiredate'])){
  18. // if($thistime > strtotime("+ 1 year", strtotime($v['hiredate']))){
  19. // $yearnum = 5;
  20. // }else{
  21. // $yearnum = 0;
  22. // }
  23. // }else{
  24. // $yearnum = 0;
  25. // }
  26. // $hstaff = new HStaff();
  27. // $hstaff->uid = $v['sid'];
  28. // $hstaff->yearnum = $yearnum;
  29. // $hstaff->insert();
  30. // }
  31. // exit;
  32. // }
  33. }
  34. ?>