Пример #1
0
 #          echo '-';
 # }
 ?>
                                        </th>
                                        <th style="font-weight: normal;">
                                            <?php 
 ##HOME
 $cm = new Criteria();
 $cm->add(EmployeeAbsencePeer::EMPLOYEE_ID, $employee->getId());
 $cm->add(EmployeeAbsencePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getParent());
 $cm->add(EmployeeAbsencePeer::STATUS, EmployeeAbsence::STATUS_HOME);
 $cton5 = $cm->getNewCriterion(EmployeeAbsencePeer::DATE_IN, $thn_absence . '-' . $month2->getId() . '-1', Criteria::GREATER_EQUAL);
 $cton6 = $cm->getNewCriterion(EmployeeAbsencePeer::DATE_IN, $thn_absence . '-' . ($month2->getId() + 1) . '-1', Criteria::LESS_THAN);
 $cton5->addAnd($cton6);
 $cm->add($cton5);
 $ecs = EmployeeAbsencePeer::doSelect($cm);
 $absence_home = array();
 $absence_home_hour = array();
 $absence_home_minute = array();
 if (count($ecs)) {
     foreach ($ecs as $ec) {
         $absence_home[$ec->getDateIn()] = $ec->getStart('H:i:s');
         $absence_home_hour[$ec->getDateIn()] = $ec->getStart('H');
         $absence_home_minute[$ec->getDateIn()] = $ec->getStart('i');
     }
 }
 # if ($hari_id != "Ahad") {
 if (count($absence_home) > 0 && array_key_exists($all_tgl, $absence_home)) {
     echo $absence_home[$all_tgl];
 } else {
     echo '-';
Пример #2
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(EmployeeAbsencePeer::ID, $pks, Criteria::IN);
         $objs = EmployeeAbsencePeer::doSelect($criteria, $con);
     }
     return $objs;
 }