Example #1
0
 public function getParentalIndex()
 {
     $parentalIndex = "#" . str_pad($this->getId(), 3, '0', STR_PAD_LEFT);
     $this->level = 1;
     if ($this->getParent() !== null && $this->getParent() != 0) {
         $p = LocationPeer::retrieveByPK($this->getParent());
         $parentalIndex = str_pad($p->getParentalIndex(), 3, '0', STR_PAD_LEFT) . "_" . $parentalIndex;
         $this->level += $p->level;
     }
     $this->parentalIndex = $parentalIndex;
     return $parentalIndex;
 }
Example #2
0
 public function executeDeleteFacility()
 {
     $locate = LocationPeer::retrieveByPk($this->getRequestParameter('location_id'));
     $this->forward404Unless($locate);
     $c = new Criteria();
     $c->add(FacilityLocationPeer::ID, $this->getRequestParameter('id'));
     $facility = FacilityLocationPeer::doSelectOne($c);
     $facility->delete();
     return $this->forward('locate', 'listFacility?id=' . $locate->getId());
 }
echo $test_schedule->getRegTestPeriod()->getRegPeriod() ? $test_schedule->getRegTestPeriod()->getRegPeriod()->getAcademicCalendar()->getYear() : '-';
?>
</td></tr>
		<tr><td nowrap><?php 
echo __('TestSchedule');
?>
</td><td>:</td><td><?php 
echo $test_schedule->getStart() ? $test_schedule->getStart('d-m-Y') : '-';
?>
</td></tr>
		<tr><td nowrap><?php 
echo __('Location');
?>
</td><td>:</td>
        	<td><?php 
echo LocationPeer::retrieveByPk($location_id)->toString();
?>
</td>
        </tr>
        <tr><td nowrap><?php 
echo __('Test Applicant Count');
?>
</td><td>:</td><td>
			<?php 
#echo $test_schedule->countTestApplScheds()
?>
            <?php 
$c = new Criteria();
$c->add(TestApplicantPeer::REG_TEST_PERIOD1, $test_schedule->getRegTestPeriodId());
$c->add(TestApplicantPeer::LOCATION1, $location_id);
$applicant_count = TestApplicantPeer::doCount($c);
Example #4
0
 public function executeEditLocation()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $ts = TestSchedulePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->test_schedule = $ts;
     $c = new Criteria();
     $c->add(VTestApplSchedPeer::TEST_SCHEDULE_ID, $this->getRequestParameter('id'));
     $c->add(VTestApplSchedPeer::LOCATION1, $this->getRequestParameter('location_id'));
     $c->addJoin(TestApplicantPeer::ID, VTestApplSchedPeer::TEST_APPLICANT_ID);
     $c->addDescendingOrderByColumn(VTestApplSchedPeer::AVG_GRADE);
     $this->applicants = TestApplicantPeer::doSelect($c);
     $this->forward404Unless($this->test_schedule);
     $dept = DepartmentPeer::retrieveByPk($this->getRequestParameter('dept_id'));
     $this->dept = $dept;
     $location = LocationPeer::retrieveByPk($this->getRequestParameter('location_id'));
     $this->location = $location;
     $accal = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal_id'));
     $this->accal = $accal;
     $dept = sfContext::getInstance()->getUser()->getAttribute('department', null, 'bo');
     $depts = $dept->getChildRecurs(array());
     $cr = new Criteria();
     $cr->add(TestApplSchedPeer::TEST_SCHEDULE_ID, $this->getRequestParameter('id'));
     $count_appl = TestApplSchedPeer::doCount($cr);
     $accal_options = array();
     $c = new Criteria();
     $c->add(LocationPeer::ACADEMIC_CALENDAR_ID, $accal, Criteria::IN);
     $c->add(LocationPeer::LOCATION_CATEGORY_ID, 22, Criteria::IN);
     $c->add(LocationPeer::CAPACITY, $count_appl, Criteria::NOT_IN);
     $c->addDescendingOrderByColumn(LocationPeer::CODE);
     $accals = LocationPeer::doSelect($c);
     foreach ($accals as $accal) {
         $accal_options[$accal->getId()] = $accal->getCampus();
     }
     $this->accal_options = $accal_options;
     $cr = new Criteria();
     $cr->add(TestSubjectPeer::DEPARTMENT_ID, $dept->getId());
     $this->t_subject = TestSubjectPeer::doSelect($cr);
     $this->t_count = TestSubjectPeer::doCount($cr);
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('TestApplicant', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
 }
Example #5
0
 public static function doSelectByTestPeriod(Criteria $criteria, $con = null)
 {
     $ng_reg_period_id = sfContext::getInstance()->getRequest()->getParameter('ng_reg_period_id');
     $ng_reg_period = NgRegPeriodPeer::retrieveByPK($ng_reg_period_id);
     if ($ng_reg_period == null) {
         return array();
     }
     $criteria->add(LocationPeer::DEPARTMENT_ID, $ng_reg_period->getAcademicCalendar()->getDepartmentId(), Criteria::IN);
     $tmp_depts = LocationPeer::doSelect($criteria);
     $depts = array();
     foreach ($tmp_depts as $key => $val) {
         $pi = $val->getParentalIndex();
         $prefix = '';
         for ($i = 0; $i < $val->level - 1; $i++) {
             $prefix .= ParamsPeer::retrieveByCode('tree_node_mark')->getValue();
         }
         $val->setCampus($prefix . $val->getCampus());
         $val->setCode($prefix . $val->getCode());
         $depts[$pi] = $val;
     }
     ksort($depts);
     $result = array();
     foreach ($depts as $r) {
         $result[] = $r;
     }
     return $result;
 }
 public function getLocation($con = null)
 {
     include_once 'lib/model/om/BaseLocationPeer.php';
     if ($this->aLocation === null && $this->location_id !== null) {
         $this->aLocation = LocationPeer::retrieveByPK($this->location_id, $con);
     }
     return $this->aLocation;
 }
Example #7
0
 public function getLocationsJoinLocationCategory($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseLocationPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collLocations === null) {
         if ($this->isNew()) {
             $this->collLocations = array();
         } else {
             $criteria->add(LocationPeer::LOCATION_CONDITION_ID, $this->getId());
             $this->collLocations = LocationPeer::doSelectJoinLocationCategory($criteria, $con);
         }
     } else {
         $criteria->add(LocationPeer::LOCATION_CONDITION_ID, $this->getId());
         if (!isset($this->lastLocationCriteria) || !$this->lastLocationCriteria->equals($criteria)) {
             $this->collLocations = LocationPeer::doSelectJoinLocationCategory($criteria, $con);
         }
     }
     $this->lastLocationCriteria = $criteria;
     return $this->collLocations;
 }
Example #8
0
 public static function doSelectJoinAllExceptGradeComponent(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SchedulePeer::addSelectColumns($c);
     $startcol2 = SchedulePeer::NUM_COLUMNS - SchedulePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SubjectCurrPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SubjectCurrPeer::NUM_COLUMNS;
     EmployeePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + EmployeePeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     ClassSessionPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + ClassSessionPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + AcademicCalendarPeer::NUM_COLUMNS;
     GradeSpecPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + GradeSpecPeer::NUM_COLUMNS;
     $c->addJoin(SchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
     $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(SchedulePeer::LOCATION_ID, LocationPeer::ID);
     $c->addJoin(SchedulePeer::CLASS_SESSION_ID, ClassSessionPeer::ID);
     $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(SchedulePeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SubjectCurrPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getSubjectCurr();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSchedules();
             $obj2->addSchedule($obj1);
         }
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getEmployee();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initSchedules();
             $obj3->addSchedule($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroup();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initSchedules();
             $obj4->addSchedule($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getLocation();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initSchedules();
             $obj5->addSchedule($obj1);
         }
         $omClass = ClassSessionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getClassSession();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initSchedules();
             $obj6->addSchedule($obj1);
         }
         $omClass = AcademicCalendarPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getAcademicCalendar();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initSchedules();
             $obj7->addSchedule($obj1);
         }
         $omClass = GradeSpecPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getGradeSpec();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initSchedules();
             $obj8->addSchedule($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Example #9
0
 public function getLocationsRelatedByParentJoinAcademicCalendar($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseLocationPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collLocationsRelatedByParent === null) {
         if ($this->isNew()) {
             $this->collLocationsRelatedByParent = array();
         } else {
             $criteria->add(LocationPeer::PARENT, $this->getId());
             $this->collLocationsRelatedByParent = LocationPeer::doSelectJoinAcademicCalendar($criteria, $con);
         }
     } else {
         $criteria->add(LocationPeer::PARENT, $this->getId());
         if (!isset($this->lastLocationRelatedByParentCriteria) || !$this->lastLocationRelatedByParentCriteria->equals($criteria)) {
             $this->collLocationsRelatedByParent = LocationPeer::doSelectJoinAcademicCalendar($criteria, $con);
         }
     }
     $this->lastLocationRelatedByParentCriteria = $criteria;
     return $this->collLocationsRelatedByParent;
 }
Example #10
0
 public static function doSelectJoinAllExceptClassGroupRelatedByClassId(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VApplicantTestPeer::addSelectColumns($c);
     $startcol2 = VApplicantTestPeer::NUM_COLUMNS - VApplicantTestPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestApplicantDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestApplicantDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     RegTestPeriodPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + RegTestPeriodPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(VApplicantTestPeer::TEST_APPLICANT_DETAIL_ID, TestApplicantDetailPeer::ID);
     $c->addJoin(VApplicantTestPeer::DEPARTMENT_ID, DepartmentPeer::ID);
     $c->addJoin(VApplicantTestPeer::REG_TEST_PERIOD_ID, RegTestPeriodPeer::ID);
     $c->addJoin(VApplicantTestPeer::LOCATION_ID, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VApplicantTestPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestApplicantDetailPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getTestApplicantDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVApplicantTests();
             $obj2->addVApplicantTest($obj1);
         }
         $omClass = DepartmentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getDepartment();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVApplicantTests();
             $obj3->addVApplicantTest($obj1);
         }
         $omClass = RegTestPeriodPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getRegTestPeriod();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVApplicantTests();
             $obj4->addVApplicantTest($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getLocation();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVApplicantTest($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVApplicantTests();
             $obj5->addVApplicantTest($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 public static function doSelectJoinAllExceptAcademicCalendar(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     OutclassCounselingPeer::addSelectColumns($c);
     $startcol2 = OutclassCounselingPeer::NUM_COLUMNS - OutclassCounselingPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     StudentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + StudentPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + LocationPeer::NUM_COLUMNS;
     StudentPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + StudentPeer::NUM_COLUMNS;
     CounselingStatusPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + CounselingStatusPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + ClassGroupPeer::NUM_COLUMNS;
     $c->addJoin(OutclassCounselingPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(OutclassCounselingPeer::STUDENT_INFORMER, StudentPeer::ID);
     $c->addJoin(OutclassCounselingPeer::LOCATION_ID, LocationPeer::ID);
     $c->addJoin(OutclassCounselingPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(OutclassCounselingPeer::COUNSELING_STATUS_ID, CounselingStatusPeer::ID);
     $c->addJoin(OutclassCounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = OutclassCounselingPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addOutclassCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initOutclassCounselings();
             $obj2->addOutclassCounseling($obj1);
         }
         $omClass = StudentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getStudentRelatedByStudentInformer();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addOutclassCounselingRelatedByStudentInformer($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initOutclassCounselingsRelatedByStudentInformer();
             $obj3->addOutclassCounselingRelatedByStudentInformer($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getLocation();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addOutclassCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initOutclassCounselings();
             $obj4->addOutclassCounseling($obj1);
         }
         $omClass = StudentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getStudentRelatedByStudentId();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addOutclassCounselingRelatedByStudentId($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initOutclassCounselingsRelatedByStudentId();
             $obj5->addOutclassCounselingRelatedByStudentId($obj1);
         }
         $omClass = CounselingStatusPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getCounselingStatus();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addOutclassCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initOutclassCounselings();
             $obj6->addOutclassCounseling($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getClassGroup();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addOutclassCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initOutclassCounselings();
             $obj7->addOutclassCounseling($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 public static function doSelectJoinAllExceptAcademicCalendar(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     FacilityLocationPeer::addSelectColumns($c);
     $startcol2 = FacilityLocationPeer::NUM_COLUMNS - FacilityLocationPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     FacilityPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + FacilityPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(FacilityLocationPeer::FACILITY_ID, FacilityPeer::ID);
     $c->addJoin(FacilityLocationPeer::LOCATION_ID, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = FacilityLocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = FacilityPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getFacility();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addFacilityLocation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initFacilityLocations();
             $obj2->addFacilityLocation($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getLocation();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addFacilityLocation($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initFacilityLocations();
             $obj3->addFacilityLocation($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Example #13
0
 public function filterLocation($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'YEAR') {
             $c->addJoin(AcademicCalendarPeer::ID, LocationPeer::ACADEMIC_CALENDAR_ID);
             $column = AcademicCalendarPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = LocationPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
Example #14
0
 public function filterApplicant($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'NAME') {
             $c->addJoin(TestApplicantPeer::ID, TestApplSchedPeer::TEST_APPLICANT_ID);
             $column = TestApplicantPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(TestApplicantPeer::ID, TestApplSchedPeer::TEST_APPLICANT_ID);
             $column = TestApplicantPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'LOCATION_ID') {
             $c->addJoin(TestSchedulePeer::ID, TestApplSchedPeer::TEST_SCHEDULE_ID);
             $c->addJoin(LocationPeer::ID, TestSchedulePeer::LOCATION_ID);
             $column = LocationPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'STATUS') {
             $cr->addJoin(TestApplicantPeer::ID, TestApplSchedPeer::TEST_APPLICANT_ID);
             $column = TestApplicantPeer::getTableMap()->getColumn('STATUS');
         } else {
             $column = TestApplSchedulePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::EQUAL);
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
Example #15
0
" style="display:none;">.
							
							<?php 
        #echo link_to_remote(__('edit'),
        #array('url'=>'test_schedule/editResult?id='.$test_appl_sched->getTestScheduleId().'&appl_id='.$test_appl_sched->getTestApplicantId().'&dept_id='.$dept->getId(),
        #'update'=>'content', 'script'=>'true', 'before'=>"this.blur();showIndicator('content', 'snakebig_black');",
        #'complete'=>"hideIndicator()"), array('class'=>'blue', 'style'=>'font-size:10px;'))
        ?>
						</p-->
						</td>
						<td style="color: #017FC0;"><?php 
        echo $test_appl_sched->getTestApplicant()->getName();
        ?>
</td>
						<td style="color: #017FC0;"><?php 
        echo $test_appl_sched->getTestApplicant()->getLocation1() ? LocationPeer::retrieveByPk($test_appl_sched->getTestApplicant()->getLocation1())->toString() : '';
        ?>
</td>
						<?php 
        foreach ($t_subject as $t_sub) {
            ?>
                        <td style="font-weight: bold; text-align: center;">
                        <?php 
            $c = new Criteria();
            $c->add(TestScorePeer::TEST_APPLICANT_ID, $test_appl_sched->getTestApplicantId());
            $c->add(TestScorePeer::TEST_SUBJECT_ID, $t_sub->getId());
            $tg = TestScorePeer::doSelectOne($c);
            ?>
						<?php 
            echo $tg != null ? $tg->getGrade() : '-';
            ?>
Example #16
0
 public static function doSelectJoinAllExceptRegTestPeriodRelatedByRegTestPeriod2(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     TestApplicantPeer::addSelectColumns($c);
     $startcol2 = TestApplicantPeer::NUM_COLUMNS - TestApplicantPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestApplicantDetailPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestApplicantDetailPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + DepartmentPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     DepartmentPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + DepartmentPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + ClassGroupPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(TestApplicantPeer::TEST_APPLICANT_DETAIL_ID, TestApplicantDetailPeer::ID);
     $c->addJoin(TestApplicantPeer::DEPARTMENT_1, DepartmentPeer::ID);
     $c->addJoin(TestApplicantPeer::CLASS_GROUP1, ClassGroupPeer::ID);
     $c->addJoin(TestApplicantPeer::LOCATION1, LocationPeer::ID);
     $c->addJoin(TestApplicantPeer::DEPARTMENT_2, DepartmentPeer::ID);
     $c->addJoin(TestApplicantPeer::CLASS_GROUP2, ClassGroupPeer::ID);
     $c->addJoin(TestApplicantPeer::LOCATION2, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = TestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestApplicantDetailPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getTestApplicantDetail();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addTestApplicant($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initTestApplicants();
             $obj2->addTestApplicant($obj1);
         }
         $omClass = DepartmentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getDepartmentRelatedByDepartment1();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addTestApplicantRelatedByDepartment1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initTestApplicantsRelatedByDepartment1();
             $obj3->addTestApplicantRelatedByDepartment1($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroupRelatedByClassGroup1();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addTestApplicantRelatedByClassGroup1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initTestApplicantsRelatedByClassGroup1();
             $obj4->addTestApplicantRelatedByClassGroup1($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getLocationRelatedByLocation1();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addTestApplicantRelatedByLocation1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initTestApplicantsRelatedByLocation1();
             $obj5->addTestApplicantRelatedByLocation1($obj1);
         }
         $omClass = DepartmentPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getDepartmentRelatedByDepartment2();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addTestApplicantRelatedByDepartment2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initTestApplicantsRelatedByDepartment2();
             $obj6->addTestApplicantRelatedByDepartment2($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getClassGroupRelatedByClassGroup2();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addTestApplicantRelatedByClassGroup2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initTestApplicantsRelatedByClassGroup2();
             $obj7->addTestApplicantRelatedByClassGroup2($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getLocationRelatedByLocation2();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addTestApplicantRelatedByLocation2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initTestApplicantsRelatedByLocation2();
             $obj8->addTestApplicantRelatedByLocation2($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Example #17
0
        echo checkbox_tag('students', $appl->getId(), false, array('id' => 'students'));
        ?>
							<?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
						  </td>
						  <td><?php 
        echo $appl->getCode();
        ?>
</td>
						  <td><?php 
        echo $appl->getName();
        ?>
</td>
						  <td><?php 
        echo $appl->getLocation1() ? LocationPeer::retrieveByPk($appl->getLocation1())->toString() : '-';
        ?>
</td>
						</tr>
						<?php 
    }
    ?>
					  <?php 
}
?>
					  </tbody>
					</table>
			     </td>
				</tr>
				</table>
                </form>
Example #18
0
 public static function doSelectJoinAllExceptNgRegTestPeriod(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     NgTestSchedulePeer::addSelectColumns($c);
     $startcol2 = NgTestSchedulePeer::NUM_COLUMNS - NgTestSchedulePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     LocationPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(NgTestSchedulePeer::LOCATION_ID, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = NgTestSchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getLocation();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addNgTestSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initNgTestSchedules();
             $obj2->addNgTestSchedule($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Example #19
0
 public static function doSelectJoinAllExceptTestSchedule(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VTestApplSchedPeer::addSelectColumns($c);
     $startcol2 = VTestApplSchedPeer::NUM_COLUMNS - VTestApplSchedPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     TestApplicantPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + TestApplicantPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + LocationPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + LocationPeer::NUM_COLUMNS;
     $c->addJoin(VTestApplSchedPeer::TEST_APPLICANT_ID, TestApplicantPeer::ID);
     $c->addJoin(VTestApplSchedPeer::LOCATION1, LocationPeer::ID);
     $c->addJoin(VTestApplSchedPeer::LOCATION2, LocationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VTestApplSchedPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = TestApplicantPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getTestApplicant();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVTestApplSched($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVTestApplScheds();
             $obj2->addVTestApplSched($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getLocationRelatedByLocation1();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVTestApplSchedRelatedByLocation1($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVTestApplSchedsRelatedByLocation1();
             $obj3->addVTestApplSchedRelatedByLocation1($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getLocationRelatedByLocation2();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVTestApplSchedRelatedByLocation2($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVTestApplSchedsRelatedByLocation2();
             $obj4->addVTestApplSchedRelatedByLocation2($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Example #20
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(LocationPeer::ID, $pks, Criteria::IN);
         $objs = LocationPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Example #21
0
 public function getLocationRelatedByLocation2($con = null)
 {
     include_once 'lib/model/om/BaseLocationPeer.php';
     if ($this->aLocationRelatedByLocation2 === null && $this->location2 !== null) {
         $this->aLocationRelatedByLocation2 = LocationPeer::retrieveByPK($this->location2, $con);
     }
     return $this->aLocationRelatedByLocation2;
 }
Example #22
0
                    <tr class="list even">
						<!--td><?php 
        #echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage()
        ?>
</td-->
						<td colspan="8" style="color: #017FC0; font-weight: bold;">
						<?php 
        echo '&nbsp;&nbsp;&middot;&nbsp;&nbsp;&nbsp;' . $location->getDepartment()->toString() . '&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;' . $location->getName();
        ?>
</td>
					</tr>
                    <?php 
        $c = new Criteria();
        $c->add(LocationPeer::ACADEMIC_CALENDAR_ID, $location->getAcademicCalendarId());
        $locates = LocationPeer::doSelect($c);
        $locate_count = LocationPeer::doCount($c);
        ?>
                    <?php 
        if ($locate_count < 1) {
            ?>
                    	<tr class="list"><td colspan="100"><div class="no_record"><?php 
            echo __('No record found');
            ?>
</div></td></tr>
                    <?php 
        } else {
            ?>
                    <?php 
            $j = 0;
            foreach ($locates as $locate) {
                ?>
Example #23
0
</td>
                    
					<td class='filter'><?php 
echo input_tag('filters[YEAR]', isset($filters['YEAR']) ? $filters['YEAR'] : null, array('size' => 4));
?>
</td>
					
                    <td class='filter'>
						<?php 
echo input_date_tag('filters[START]', isset($filters['START']) ? $filters['START'] : null, array('rich' => true, 'withtime' => false, 'calendar_button_img' => '/images/calendar.gif'));
?>
					</td>

                    <td class='filter'>
					<?php 
echo my_object_select_tag(isset($filters['LOCATION_ID']) ? $filters['LOCATION_ID'] : null, null, LocationPeer::getParents(), array('include_blank' => true, 'related_class' => 'Location', 'peer_method' => 'doFiltered', 'control_name' => 'filters[LOCATION_ID]', 'style' => 'width: 80px;'));
?>
</td>
					<td class="filter">&nbsp;</td>
                    <td class="filter">&nbsp;</td>
				</tr>
			</thead>
			<tbody>
			<?php 
if ($pager->getNbResults() < 1) {
    ?>
				<tr class="list"><td colspan="100"><div class="no_record"><?php 
    echo __('No record found');
    ?>
</div></td></tr>
			<?php