当前位置: 首页>>代码示例>>PHP>>正文


PHP AcademicCalendarPeer::doSelectOne方法代码示例

本文整理汇总了PHP中AcademicCalendarPeer::doSelectOne方法的典型用法代码示例。如果您正苦于以下问题:PHP AcademicCalendarPeer::doSelectOne方法的具体用法?PHP AcademicCalendarPeer::doSelectOne怎么用?PHP AcademicCalendarPeer::doSelectOne使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcademicCalendarPeer的用法示例。


在下文中一共展示了AcademicCalendarPeer::doSelectOne方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeList

 public function executeList()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $c = new Criteria();
     if (!$this->getRequest()->getParameter('sort') && !$this->getUser()->getAttribute('sort_field', null, 'course')) {
         $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
         $c->addJoin(CourseSchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
         $c->addAscendingOrderByColumn(SubjectPeer::NAME);
     }
     $this->sortScore($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filterScore($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'course');
     $pager = new sfPropelPager('CourseSchedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course'));
     $this->getUser()->setAttribute('page', $page, 'course');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     array_unshift($actions, array('name' => 'Pengaturan Rumusan Penilaian', 'url' => 'score_admin/createAllRegulation', 'color' => 'black'));
     $this->actions = $actions;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
     $this->employee = $employee;
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:60,代码来源:actions.class.php

示例2: getAccal

 public function getAccal($departmentId)
 {
     $criteria = new Criteria();
     $criteria->add(AcademicCalendarPeer::DEPARTMENT_ID, $departmentId, Criteria::EQUAL);
     $criteria->add(AcademicCalendarPeer::COURSE_MODEL, 'C', Criteria::EQUAL);
     $criteria->add(AcademicCalendarPeer::CURR_SYSTEM_ID, '1', Criteria::EQUAL);
     $accal = AcademicCalendarPeer::doSelectOne($criteria);
     return $accal;
 }
开发者ID:taryono,项目名称:school,代码行数:9,代码来源:smsContact.php

示例3: getCustody

 public function getCustody()
 {
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $this->getDepartmentId());
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $c = new Criteria();
     $c->add(CounselingTutorPeer::EMPLOYEE_ID, $this->getId());
     $c->addJoin(CounselingPeer::ID, CounselingTutorPeer::COUNSELING_ID);
     $c->add(CounselingPeer::ACADEMIC_CALENDAR_ID, $parent->getId());
     $custody = CounselingPeer::doSelectOne($c);
     return $custody;
 }
开发者ID:taryono,项目名称:school,代码行数:14,代码来源:Employee.php

示例4: getChildB

 public function getChildB()
 {
     $c = new Criteria();
     $c->add(AcademicCalendarPeer::PARENT, $this->getId(), Criteria::IN);
     $c->add(AcademicCalendarPeer::COURSE_MODEL, 'B', Criteria::IN);
     $accal = AcademicCalendarPeer::doSelectOne($c);
     return $accal;
 }
开发者ID:taryono,项目名称:school,代码行数:8,代码来源:AcademicCalendar.php

示例5: executeListLedgerAll

 public function executeListLedgerAll()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $accal_id = $this->getRequestParameter('accal_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     ## Daftar Mata Pelajaran di Jadwal Pelajaran
     $cw = new Criteria();
     $cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $subjects = VCoursePeer::doSelect($cw);
     $subject_ids = array();
     foreach ($subjects as $subject) {
         $subject_ids[] = $subject->getSubjectCurrId();
         $course_ids[$subject->getSubjectCurrId()] = $subject->getId();
     }
     $this->subjects = $subjects;
     $this->course_ids = $course_ids;
     ## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
     $cr = new Criteria();
     $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     #$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $stugrades = StudentRaportPeer::doSelect($cr);
     $this->stugrades = $stugrades;
     $cblek = new Criteria();
     $cblek->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $s_accal = StudentAccalPeer::doSelect($cblek);
     $this->s_accal = $s_accal;
     $cmiw = new Criteria();
     $cmiw->add(AcademicCalendarPeer::PARENT, $academic_calendar->getParent());
     $accals = AcademicCalendarPeer::doSelect($cmiw);
     $this->accals = $accals;
     $cq = new Criteria();
     $cq->add(AcademicCalendarPeer::COURSE_MODEL, 'A');
     $cq->add(AcademicCalendarPeer::PARENT, $academic_calendar->getParent());
     $accal1 = AcademicCalendarPeer::doSelectOne($cq);
     $this->accal1 = $accal1;
     $cb = new Criteria();
     $cb->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
     $cb->add(AcademicCalendarPeer::PARENT, $academic_calendar->getParent());
     $accal2 = AcademicCalendarPeer::doSelectOne($cb);
     $this->accal2 = $accal2;
     $cmi = new Criteria();
     $cmi->add(StudentHabitPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cmi->add(StudentHabitPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $student_habits = StudentHabitPeer::doSelect($cmi);
     $this->student_habits = $student_habits;
     $cwi = new Criteria();
     $cwi->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cwi->add(CourseRegulationPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c_regulations = CourseRegulationPeer::doSelect($cwi);
     $this->c_regulations = $c_regulations;
     # Menentukan Aturan Penilaian
     $cd = new Criteria();
     #$cd->add(ScoreRulePeer::ACADEMIC_CALENDAR_ID, $counseling->getAcademicCalendarId());
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, 4);
     $score_rule = ScoreRulePeer::doSelectOne($cd);
     $this->score_rule = $score_rule;
     #Khusus SMP 9
     if ($counseling->getAcademicCalendar()->getDepartmentId() == 11) {
         ## Menentukan Aturan Penilaian Yang digunakan
         $cm = new Criteria();
         $cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
         $cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
         #$cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
         $cton1 = $cm->getNewCriterion(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
         $cton2 = $cm->getNewCriterion(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
         $cton1->addOr($cton2);
         $cm->add($cton1);
         $cm->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
         $list_subs = ScoreRuleSubjectPeer::doSelect($cm);
         $subject_count = ScoreRuleSubjectPeer::doCount($cm);
     } else {
         ## Menentukan Aturan Penilaian Yang digunakan
         $cm = new Criteria();
         $cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
         $cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
         $cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
         $cm->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
         $list_subs = ScoreRuleSubjectPeer::doSelect($cm);
         $subject_count = ScoreRuleSubjectPeer::doCount($cm);
     }
     $this->list_subs = $list_subs;
     $this->subject_count = $subject_count;
     $cwe = new Criteria();
     $cwe->add(GradeComponentPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId(), Criteria::IN);
     $cton1 = $cwe->getNewCriterion(GradeComponentPeer::GRADE_SPEC_ID, 20, Criteria::IN);
     $cton2 = $cwe->getNewCriterion(GradeComponentPeer::PUBLISHED, 1, Criteria::IN);
     $cton1->addAnd($cton2);
     $cwe->add($cton1);
     $this->grade_components = GradeComponentPeer::doSelect($cwe);
     $this->grade_count = GradeComponentPeer::doCount($cwe);
     $cmot = new Criteria();
     $cmot->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $cmot->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $cmot->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例6: executeListHistory

 public function executeListHistory()
 {
     $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $c = new Criteria();
     $c->add(CourseSchedulePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
     $c->addAscendingOrderByColumn(CourseSchedulePeer::ID);
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'course');
     $pager = new sfPropelPager('CourseSchedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course'));
     $this->getUser()->setAttribute('page', $page, 'course');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'student_agenda/list', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'student_agenda/list2', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Riwayat Akademik</span>', 'url' => 'student_agenda/listHistory', 'color' => 'volcadot', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->subtitle = $student->toString();
     $this->student_id = $student_id;
     $this->student = $student;
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:60,代码来源:actions.class.php

示例7: executeListCounsel2

 public function executeListCounsel2()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $this->dept = $dept;
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $cw = new Criteria();
     $cw->add(AcademicCalendarPeer::PARENT, $parent->getId());
     $cw->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
     $cw->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $child = AcademicCalendarPeer::doSelectOne($cw);
     $this->academic_calendar = $child;
     $c = new Criteria();
     $c->add(CourseSchedulePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
     $c->addJoin(ClassCounselPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
     $c->addAscendingOrderByColumn(ClassCounselPeer::ID);
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'class_counseling'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'class_counseling');
     $pager = new sfPropelPager('ClassCounseling', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'class_counseling'));
     $this->getUser()->setAttribute('page', $page, 'class_counseling');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     #array_unshift($actions, array('name'=>'_AS_CSV_','url'=>"employee_counsel/listAsCSV2", 'color'=>'black', 'type'=>'direct'));
     #array_unshift($actions, array('name'=>'_AS_PDF_','url'=>"employee_counsel/listAsPDF2", 'color'=>'black', 'type'=>'direct'));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'employee_counsel/list', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'employee_counsel/list2', 'color' => 'sky', 'type' => 'direct'));
     array_push($actions2, array('name' => '<span>Riwayat Konseling</span>', 'url' => 'employee_counsel/listHistory', 'color' => 'volcadot'));
     $this->actions2 = $actions2;
     $this->subtitle = $employee->toString();
     $this->employee = $employee;
     $this->setTemplate('listByEmployeeCounsel');
 }
开发者ID:taryono,项目名称:school,代码行数:69,代码来源:actions.class.php

示例8: executeListHistory

 public function executeListHistory()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $actions = array();
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'employee_agenda/list', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'employee_agenda/list2', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Riwayat Guru Kelas</span>', 'url' => 'employee_agenda/listHistory', 'color' => 'volcadot', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
     $this->employee = $employee;
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:22,代码来源:actions.class.php

示例9: executeListHistory

 public function executeListHistory()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     if ($employee->getStaffTypeId() == 13 || $employee->getStaffTypeId() == 14 || $employee->getStaffTypeId() == 21) {
         $c = new Criteria();
         $c->addAscendingOrderByColumn(CourseSchedulePeer::CLASS_GROUP_ID);
     } else {
         $c = new Criteria();
         $c->add(CourseScheduleTutorPeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
         $c->addJoin(CourseSchedulePeer::ID, CourseScheduleTutorPeer::COURSE_SCHEDULE_ID);
         if (!$this->getRequest()->getParameter('sort') && !$this->getUser()->getAttribute('sort_field', null, 'course')) {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(CourseSchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
             $c->addAscendingOrderByColumn(SubjectPeer::NAME);
         }
     }
     $this->sortScore($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filterScore($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'course');
     $pager = new sfPropelPager('CourseSchedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course'));
     $this->getUser()->setAttribute('page', $page, 'course');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'course_score/list', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'course_score/list2', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Riwayat Penilaian</span>', 'url' => 'course_score/listHistory', 'color' => 'volcadot', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
     $this->employee = $employee;
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:70,代码来源:actions.class.php

示例10: executeListTryout2

 public function executeListTryout2()
 {
     $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->student = $student;
     $this->forward404Unless($student);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $this->dept = $dept;
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $cw = new Criteria();
     $cw->add(AcademicCalendarPeer::PARENT, $parent->getId());
     $cw->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
     $cw->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $child = AcademicCalendarPeer::doSelectOne($cw);
     $this->academic_calendar = $child;
     #SMP
     if ($dept == 2) {
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects = VCoursePeer::doSelect($c);
         $this->subject_count = VCoursePeer::doCount($c);
         $cr = new Criteria();
         $cr->add(GradeSpecPeer::PARENT, 45);
         $this->grade1 = GradeSpecPeer::doSelect($cr);
         $this->count1 = GradeSpecPeer::doCount($cr);
         #SD
     } elseif ($dept == 3) {
         $c = new Criteria();
         $c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
         $c->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
         $c->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects7 = VCoursePeer::doSelect($c);
         $subject_count7 = VCoursePeer::doCount($c);
         $this->subject_count7 = $subject_count7;
         $cm = new Criteria();
         $cm->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
         $cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         $cm->add(VCoursePeer::SUBJECT_GROUP_ID, 8, Criteria::IN);
         $cm->addAscendingOrderByColumn(VCoursePeer::CODE);
         $this->subjects8 = VCoursePeer::doSelect($cm);
         $subject_count8 = VCoursePeer::doCount($cm);
         $this->subject_count8 = $subject_count8;
         $cr = new Criteria();
         $cr->add(GradeSpecPeer::PARENT, 45);
         $this->grade1 = GradeSpecPeer::doSelect($cr);
         $this->count1 = GradeSpecPeer::doCount($cr);
     }
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('VCourse', $rpp);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     $actions = array(array());
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Riwayat Tryout</span>', 'url' => 'student_score_s/listTryout', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'student_score_s/listTryout1', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'student_score_s/listTryout2', 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->subtitle = $student->getName() . ' - ' . $student->getClassGroup()->toString();
     $this->student_id = $student_id;
 }
开发者ID:taryono,项目名称:school,代码行数:71,代码来源:actions.class.php

示例11: executeListByEmployee

 public function executeListByEmployee()
 {
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $dept_id = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept_id);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $c->add(AcademicCalendarPeer::ID, $parent->getChildRecurs(), Criteria::IN);
     $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
     $c->addJoin(AccalActivityPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addDescendingOrderByColumn(AccalActivityPeer::ID);
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'accal_activity'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'accal_activity');
     $pager = new sfPropelPager('AccalActivity', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'accal_activity'));
     $this->getUser()->setAttribute('page', $page, 'accal_activity');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:59,代码来源:actions.class.php

示例12: executeList2

 public function executeList2()
 {
     $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $cw = new Criteria();
     $cw->add(AcademicCalendarPeer::PARENT, $parent->getId());
     $cw->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
     $cw->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $child = AcademicCalendarPeer::doSelectOne($cw);
     $c = new Criteria();
     $c->add(StudentRaportPeer::STUDENT_ID, $student->getId());
     $c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $child->getId());
     $c->addJoin(GradeComponentPeer::ID, StudentRaportPeer::GRADE_COMPONENT_ID);
     $c->add(GradeComponentPeer::GRADE_SPEC_ID, 21);
     $c->addAscendingOrderByColumn(GradeComponentPeer::NAME);
     $accal = $child->getId();
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'grade_component'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'grade_component');
     $pager = new sfPropelPager('GradeComponent', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'grade_component'));
     $this->getUser()->setAttribute('page', $page, 'grade_component');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "student_ekskul/listAsCSV2?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "student_ekskul/listAsPDF2?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Riwayat Nilai Ekskul</span>', 'url' => 'student_ekskul/listAll', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'student_ekskul/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'student_ekskul/list2', 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->setTemplate('list');
     $this->subtitle = $student->getName() . ' - ' . $student->getClassGroup()->toString();
     $this->student_id = $student_id;
     $this->accal = $accal;
     $this->student = $student;
 }
开发者ID:taryono,项目名称:school,代码行数:79,代码来源:actions.class.php

示例13: executeSchedEmployee

 public function executeSchedEmployee()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'schedule/schedEmployee');
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     # Academic Calendar Active
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $active = AcademicCalendarPeer::doSelectOne($cr);
     # Pimpinan Sekolah
     if ($employee->getStaffTypeId() == 13 || $employee->getStaffTypeId() == 14) {
         $c = new Criteria();
         $cton1 = $c->getNewCriterion(SchedulePeer::TYPE, Schedule::IS_SCHED, Criteria::IN);
         $cton2 = $c->getNewCriterion(SchedulePeer::ACADEMIC_CALENDAR_ID, $active->getChildRecurs(), Criteria::IN);
         $cton1->addAnd($cton2);
         $c->add($cton1);
     } else {
         $c = new Criteria();
         $cton1 = $c->getNewCriterion(SchedulePeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
         $cton2 = $c->getNewCriterion(SchedulePeer::TYPE, Schedule::IS_SCHED, Criteria::IN);
         $cton3 = $c->getNewCriterion(SchedulePeer::ACADEMIC_CALENDAR_ID, $active->getChildRecurs(), Criteria::IN);
         $cton2->addAnd($cton3);
         $cton1->addAnd($cton2);
         $c->add($cton1);
     }
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'schedule'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'schedule');
     $pager = new sfPropelPager('Schedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'schedule'));
     $this->getUser()->setAttribute('page', $page, 'schedule');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     array_unshift($actions, array('name' => 'Print Excel', 'url' => "schedule/schedEmployeeAsCSV?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "schedule/schedEmployeeAsPDF?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
     $this->employee = $employee;
 }
开发者ID:taryono,项目名称:school,代码行数:88,代码来源:actions.class.php

示例14: executeListByEmployee2

 public function executeListByEmployee2()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $cr = new Criteria();
     $cr->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $cr->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cr->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 1);
     $parent = AcademicCalendarPeer::doSelectOne($cr);
     $cw = new Criteria();
     $cw->add(AcademicCalendarPeer::PARENT, $parent->getId());
     $cw->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
     $cw->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept);
     $child = AcademicCalendarPeer::doSelectOne($cw);
     if ($employee->getStaffTypeId() == 13 || $employee->getStaffTypeId() == 14) {
         $c = new Criteria();
         $cton1 = $c->getNewCriterion(SchedulePeer::TYPE, Schedule::IS_EKSKUL, Criteria::IN);
         $cton2 = $c->getNewCriterion(SchedulePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         $cton1->addAnd($cton2);
         $c->add($cton1);
     } else {
         /**
         			$c = new Criteria();
         			$cton1 = $c->getNewCriterion(SchedulePeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
         			$cton2 = $c->getNewCriterion(SchedulePeer::TYPE, Schedule::IS_EKSKUL, Criteria::IN);
         			$cton3 = $c->getNewCriterion(SchedulePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         			$cton2->addAnd($cton3);
         			$cton1->addAnd($cton2);
                 		$c->add($cton1); 
         			**/
         $cw = new Criteria();
         $cw->add(ScheduleTutorPeer::EMPLOYEE_ID, $employee->getId());
         $tutor = ScheduleTutorPeer::doSelectOne($cw);
         if ($tutor) {
             $c = new Criteria();
             $c->add(ScheduleTutorPeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
             $c->addJoin(SchedulePeer::ID, ScheduleTutorPeer::SCHEDULE_ID);
             $c->add(SchedulePeer::TYPE, Schedule::IS_EKSKUL, Criteria::IN);
             $c->add(SchedulePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         } else {
             $c = new Criteria();
             $c->add(SchedulePeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
             $c->add(SchedulePeer::TYPE, Schedule::IS_EKSKUL, Criteria::IN);
             $c->add(SchedulePeer::ACADEMIC_CALENDAR_ID, $child->getId(), Criteria::IN);
         }
     }
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'schedule'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'schedule');
     $pager = new sfPropelPager('Schedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'schedule'));
     $this->getUser()->setAttribute('page', $page, 'schedule');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "extracurricular/listByEmployeeAsCSV2?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "extracurricular/listByEmployeeAsPDF2?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Semester 1, ' . $parent->getName() . '</span>', 'url' => 'extracurricular/listByEmployee', 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>Semester 2, ' . $parent->getName() . '</span>', 'url' => 'extracurricular/listByEmployee2', 'color' => 'sky', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
 }
开发者ID:taryono,项目名称:school,代码行数:100,代码来源:actions.class.php

示例15: executeUpdate

 public function executeUpdate()
 {
     ## Kelas yang dipilih
     $class = ClassGroupPeer::retrieveByPK($this->getRequestParameter('class_group1'));
     $dept = DepartmentPeer::retrieveByPk($this->getRequestParameter('department_id'));
     $cd = new Criteria();
     $cd->add(AcademicCalendarPeer::CURR_SYSTEM_ID, 2);
     $cd->add(AcademicCalendarPeer::COURSE_MODEL, 'C');
     $cd->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept->getId());
     $accal_applicant = AcademicCalendarPeer::doSelectOne($cd);
     $applicant_detail = new TestApplicantDetail();
     $applicant_detail->setId($this->getRequestParameter('test_applicant_detail_id'));
     $applicant_detail->setShortName($this->getRequestParameter('short_name'));
     $applicant_detail->setPob($this->getRequestParameter('pob'));
     if ($this->getRequestParameter('dob')) {
         $applicant_detail->setDob($this->getRequestParameter('dob'));
     }
     $applicant_detail->setSex($this->getRequestParameter('sex'));
     $applicant_detail->setReligionId($this->getRequestParameter('religion_id'));
     $applicant_detail->setCountryId($this->getRequestParameter('country_id'));
     $applicant_detail->setNativeLanguage($this->getRequestParameter('native_language'));
     $applicant_detail->setFather($this->getRequestParameter('father'));
     $applicant_detail->setMother($this->getRequestParameter('mother'));
     $applicant_detail->setFatherJob($this->getRequestParameter('father_job'));
     $applicant_detail->setMotherJob($this->getRequestParameter('mother_job'));
     $applicant_detail->setDetailFatherJob($this->getRequestParameter('detail_father_job'));
     $applicant_detail->setDetailMotherJob($this->getRequestParameter('detail_mother_job'));
     $applicant_detail->setAddress($this->getRequestParameter('address'));
     $applicant_detail->setPostCode($this->getRequestParameter('post_code'));
     $applicant_detail->setRegionId($this->getRequestParameter('region_id'));
     $applicant_detail->setPhone($this->getRequestParameter('home_phone'));
     $applicant_detail->setCellphone($this->getRequestParameter('father_cellphone'));
     $applicant_detail->setCompany($this->getRequestParameter('company'));
     $applicant_detail->setParentName($this->getRequestParameter('father'));
     $applicant_detail->setJobTitle($this->getRequestParameter('job_title'));
     $applicant_detail->setSchoolOfOrigin($this->getRequestParameter('school_of_origin'));
     $applicant_detail->setSchoolOfOriginAddress($this->getRequestParameter('school_of_origin_address'));
     $applicant_detail->setRegNote($this->getRequestParameter('reg_note'));
     $applicant_detail->setChildNumber($this->getRequestParameter('child_number'));
     $applicant_detail->setBloodSiblings($this->getRequestParameter('blood_siblings'));
     $applicant_detail->setStepSiblings($this->getRequestParameter('step_siblings'));
     $applicant_detail->setOrphanageStatus($this->getRequestParameter('orphanage_status'));
     $applicant_detail->setResidenceStatus($this->getRequestParameter('residence_status'));
     $applicant_detail->setHomeDistance($this->getRequestParameter('home_distance'));
     $applicant_detail->setTransport($this->getRequestParameter('transport'));
     #$applicant_detail->setAcademicCalendarId($accal_applicant->getId());
     $applicant_detail->setIllness($this->getRequestParameter('illness'));
     $applicant_detail->setIllnessNote($this->getRequestParameter('illness_note'));
     $applicant_detail->setGraduationGrade($this->getRequestParameter('graduation_grade'));
     $applicant_detail->setGraduationYear($this->getRequestParameter('graduation_year'));
     $applicant_detail->setBloodType($this->getRequestParameter('blood_type'));
     $applicant_detail->setTall($this->getRequestParameter('tall'));
     $applicant_detail->setWeight($this->getRequestParameter('weight'));
     $applicant_detail->save();
     $applicant = new TestApplicant();
     $is_new = true;
     $applicant->setId($this->getRequestParameter('id'));
     $applicant->setName($this->getRequestParameter('name'));
     $applicant->setCode2($this->getRequestParameter('code2'));
     $applicant->setClassGroup1($this->getRequestParameter('class_group1'));
     $applicant->setDepartment1($this->getRequestParameter('department_id'));
     ## Siswa Dalam
     if ($this->getRequestParameter('is_alazhar') == TestApplicant::IS_ALAZHAR) {
         $code_appl = '.' . $dept->getCode() . '.A';
     } else {
         $code_appl = '.' . $dept->getCode() . '.B';
     }
     $stu_code = ParamsPeer::retrieveByCode('sma_code');
     $sc = $stu_code->getValue();
     $sc = explode('$', $sc);
     array_shift($sc);
     $code_len = 0;
     $code = '';
     foreach ($sc as $k => $v) {
         $v = explode('#', $v);
         if ($v[0] == 'year') {
             $code_a = substr($accal_applicant->getName(), 2, 2);
             $code_b = substr($accal_applicant->getName(), 7, 2);
             $yr = $code_a . '/' . $code_b;
             if (strlen($yr) <= $v[1]) {
                 $code .= str_pad($yr, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= substr($yr, strlen($yr) - $v[1]);
             }
             $code_len += $v[1];
         } elseif ($v[0] == 'app') {
             $code_len += $v[1];
             $code .= str_pad($code_appl, $v[1], '0', STR_PAD_LEFT);
         } elseif ($v[0] == 'seq') {
             $c = new Criteria();
             $c->add(TestApplicantPeer::CODE, $code . '%', Criteria::LIKE);
             $c->addDescendingOrderByColumn(TestApplicantPeer::CODE);
             $c->setLimit(1);
             $last_applicant = TestApplicantPeer::doSelectOne($c);
             if ($last_applicant) {
                 $lap = $last_applicant->getCode();
                 $lap = substr_replace($lap, '', 0, $code_len);
                 $lap = substr($lap, 0, $v[1]);
                 $lap++;
                 $code .= str_pad($lap, $v[1], '0', STR_PAD_LEFT);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php


注:本文中的AcademicCalendarPeer::doSelectOne方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。