コード例 #1
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $subject_curr_id = $this->getRequestParameter('subject_curr_id');
     $subject_curr = SubjectCurrPeer::retrieveByPK($subject_curr_id);
     $this->forward404Unless($subject_curr);
     $this->subject_curr = $subject_curr;
     $c = new Criteria();
     $c->add(SubjectGradingPeer::SUBJECT_CURR_ID, $subject_curr_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(), 'subject_grading'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'subject_grading');
     $pager = new sfPropelPager('SubjectGrading', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'subject_grading'));
     $this->getUser()->setAttribute('page', $page, 'subject_grading');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'subject_grading/create?subject_curr_id=' . $subject_curr->getId(), 'color' => 'black'));
     }
     array_unshift($actions, array('name' => 'back', 'url' => 'subject_curriculum/list', 'color' => 'black'));
     $this->actions = $actions;
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
     $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     // filter out graduated alumni
     $cton1 = $c->getNewCriterion(StudentPeer::STATUS, Student::STATUS_GRADUATE, Criteria::EQUAL);
     $cton2 = $c->getNewCriterion(StudentPeer::STATUS, Student::STATUS_OVERDUE, Criteria::EQUAL);
     $cton1->addOr($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(), 'alumni'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'alumni');
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'alumni'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     #if ($acl->getAddPriv()) array_unshift($actions, array('name'=>'add','url'=>'student/create', 'color'=>'green'));
     $this->actions = $actions;
 }
コード例 #3
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList(Criteria $crit = null)
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     if ($crit == null) {
         $crit = new Criteria();
     }
     $this->sort($crit);
     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($crit, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), ' payment_journal_s'));
     $this->getUser()->setAttribute('max_per_page', $rpp, ' payment_journal_s');
     $pager = new sfPropelPager('PaymentJournal', $rpp);
     $pager->setCriteria($crit);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, ' payment_journal_s'));
     $this->getUser()->setAttribute('page', $page, ' payment_journal_s');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => ' payment_journal_s/create', 'color' => 'green'));
     }
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => ' payment_journal_s/listAsCSV', 'color' => 'white', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => ' payment_journal_s/listAsPDF', 'color' => 'white', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = '';
     $this->byStudent = true;
 }
コード例 #4
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $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(), 'academic_cost_component'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'academic_cost_component');
     $pager = new sfPropelPager('AcademicCostComponent', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'academic_cost_component'));
     $this->getUser()->setAttribute('page', $page, 'academic_cost_component');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'academic_cost_component/create', 'color' => 'black'));
     }
     $this->actions = $actions;
     $cw = new Criteria();
     $cw->add(JobPeer::PARENT, $job->getId());
     $modules = JobPeer::doSelect($cw);
     $this->modules = $modules;
     $actions2 = array(array('name' => '<span>Komponen Biaya Sekolah</span>', 'url' => $job->getCode(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
コード例 #5
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
     $this->forward404Unless($student);
     $this->student = $student;
     $c = new Criteria();
     $c->add(StudentLeavePeer::STUDENT_ID, $student->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(), 'student_leave_by_student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student_leave_by_student');
     $pager = new sfPropelPager('StudentLeave', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student_leave_by_student'));
     $this->getUser()->setAttribute('page', $page, 'student_leave_by_student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'student_leave_by_student/create?student_id=' . $student->getId(), 'color' => 'green'));
     }
     array_unshift($actions, array('type' => 'direct', 'name' => 'paymentSlip', 'url' => 'student_leave_by_student/paymentSlip?student_id=' . $student->getId(), 'color' => 'white'));
     $this->actions = $actions;
     $this->subtitle = $student->toString();
 }
コード例 #6
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $ct = new Criteria();
     $ct->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($ct);
     $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;
     $c = new Criteria();
     $c->add(GradeSpecPeer::TYPE_SPEC, GradeSpec::OTHERS, Criteria::NOT_EQUAL);
     $c->add(GradeSpecPeer::PARENT, 0, Criteria::IN);
     $this->sort($c);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'grade_spec'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'grade_spec');
     $pager = new sfPropelPager('GradeSpec', $rpp);
     #$pager->setPeerMethod('doSelectOrdered');
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'grade_spec'));
     $this->getUser()->setAttribute('page', $page, 'grade_spec');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'grade_spec_new/create', 'color' => 'black'));
     }
     $this->actions = $actions;
     $this->subtitle = '';
 }
コード例 #7
0
ファイル: pmbTools.php プロジェクト: taryono/school
 public function generateApplicantCode($status, $department)
 {
     $year = date('Y');
     $month = date('m');
     if ($status != NgStatusApplicant::CONFIRMED) {
         $code_appl = 'REG';
     } else {
         $code_appl = 'FRM';
     }
     $dept_code = DepartmentPeer::retrieveByPK($department)->getNumCode() . '-';
     $stu_code = ParamsPeer::retrieveByCode('applicant_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] == 'app') {
             $code_len += $v[1];
             $code .= str_pad($code_appl, $v[1], '0', STR_PAD_LEFT);
         } elseif ($v[0] == 'dept') {
             $code .= str_pad($dept_code, $v[1], '0', STR_PAD_LEFT);
             $code_len += $v[1];
         } elseif ($v[0] == 'year') {
             if (strlen($year) <= $v[1]) {
                 $code .= str_pad($year, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= substr($year, strlen($year) - $v[1]);
             }
             $code_len += $v[1];
         } elseif ($v[0] == 'month') {
             if (strlen($month) <= $v[1]) {
                 $code .= str_pad($month, $v[1], '0', STR_PAD_LEFT);
             } else {
                 $code .= substr($month, strlen($month) - $v[1]);
             }
             $code_len += $v[1];
         } elseif ($v[0] == 'seq') {
             $c = new Criteria();
             $c->add(NgTestApplicantPeer::CODE, $code . '%', Criteria::LIKE);
             $c->addDescendingOrderByColumn(NgTestApplicantPeer::CODE);
             $c->setLimit(1);
             $last_applicant = NgTestApplicantPeer::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);
             } else {
                 $code .= str_pad(1, $v[1], '0', STR_PAD_LEFT);
                 break;
             }
         }
         $sc[$k] = $v;
     }
     return $code;
 }
コード例 #8
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     if (!$this->getRequest()->getParameter('sort') && !$this->getUser()->getAttribute('sort_field', null, 'sm_outgoing')) {
         $c->addDescendingOrderByColumn(SmOutgoingPeer::OUTGOING_DATE);
     }
     $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(), 'sm_outgoing'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'sm_outgoing');
     $pager = new sfPropelPager('SmOutgoing', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'sm_outgoing'));
     $this->getUser()->setAttribute('page', $page, 'sm_outgoing');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'sm_outgoing/create', 'color' => 'green'));
     }
     $this->actions = $actions;
     $this->subtitle = '';
 }
コード例 #9
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(CurriculumPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
     $c->addJoin(StudentPeer::CURRICULUM_ID, CurriculumPeer::ID);
     $c->addJoin(ComprehensiveExamPeer::STUDENT_ID, StudentPeer::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(), 'comprehensive_exam'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'comprehensive_exam');
     $pager = new sfPropelPager('ComprehensiveExam', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'comprehensive_exam'));
     $this->getUser()->setAttribute('page', $page, 'comprehensive_exam');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'comprehensive_exam/create', 'color' => 'green'));
     }
     $this->actions = $actions;
 }
コード例 #10
0
ファイル: ParamsPeer.php プロジェクト: taryono/school
 public static function retrieveByCode($code, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria(ParamsPeer::DATABASE_NAME);
     $criteria->add(ParamsPeer::CODE, $code);
     $v = ParamsPeer::doSelect($criteria, $con);
     return !empty($v) > 0 ? $v[0] : null;
 }
コード例 #11
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(EmployeePeer::DEPARTMENT_ID, $dept->getChildRecurs(), 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(), 'employee'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'employee');
     $pager = new sfPropelPager('Employee', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'employee'));
     $this->getUser()->setAttribute('page', $page, 'employee');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     array_unshift($actions, array('name' => 'Print Excel', 'url' => "employee/listAsCSV", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "employee/listAsPDF", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
 }
コード例 #12
0
ファイル: Job.php プロジェクト: taryono/school
 public function valueAsTree()
 {
     $level_code = '';
     for ($i = 1; $i < $this->getLevel(); $i++) {
         $level_code .= ParamsPeer::retrieveByCode('tree_node_mark')->getValue();
     }
     if ($this->getName()) {
         return $level_code . $this->getName();
     } else {
         return '-';
     }
 }
コード例 #13
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $test_applicant = TestApplicantPeer::retrieveByPK($this->getRequestParameter('test_applicant_id'));
     $this->forward404Unless($test_applicant);
     $c = new Criteria();
     $c->add(SubjectTransferPeer::TEST_APPLICANT_ID, $test_applicant->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 ($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(), 'subject_transfer'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'subject_transfer');
     $pager = new sfPropelPager('SubjectTransfer', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'subject_transfer'));
     $this->getUser()->setAttribute('page', $page, 'subject_transfer');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $this->test_applicant = $test_applicant;
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'subject_transfer/create?test_applicant_id=' . $test_applicant->getId(), 'color' => 'green'));
     }
     $this->actions = $actions;
 }
コード例 #14
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $group = $this->getContext()->getUser()->getAttribute('group', null, 'bo');
     if ($group != 'root') {
         $this->forward('default', 'index');
     }
     $c = new Criteria();
     $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(), 'menu_template'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'menu_template');
     $pager = new sfPropelPager('JobTemplate', $rpp);
     $pager->setPeerMethod('doSelectOrdered');
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'menu_template'));
     $this->getUser()->setAttribute('page', $page, 'menu_template');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     array_unshift($actions, array('name' => 'add', 'url' => 'menu_template/create', 'color' => 'black'));
     $this->actions = $actions;
     $this->subtitle = '';
 }
コード例 #15
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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());
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(CirRegulationPeer::DEPARTMENT_ID, $dept->getChildRecurs(), 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 ($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(), 'cir_regulation'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'cir_regulation');
     $pager = new sfPropelPager('CirRegulation', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'cir_regulation'));
     $this->getUser()->setAttribute('page', $page, 'cir_regulation');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'cir_regulation/create', 'color' => 'black'));
     }
     $this->actions = $actions;
     $this->subtitle = '';
 }
コード例 #16
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $group = $this->getContext()->getUser()->getAttribute('group', null, 'bo');
     if ($group == 'root') {
         $c = new Criteria();
     } else {
         $c = new Criteria();
         $c->add(UserGroupPeer::ID, 1, Criteria::NOT_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 ($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(), 'user_group'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'user_group');
     $pager = new sfPropelPager('UserGroup', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'user_group'));
     $this->getUser()->setAttribute('page', $page, 'user_group');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
 }
コード例 #17
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $c = new Criteria();
     $c->add(VOpacDigitalPeer::CAT_CATEGORY_ID, 15, Criteria::IN);
     $c->addAscendingOrderByColumn(VOpacDigitalPeer::TITLE);
     $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_opac')->getValue(), 'opac'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'opac');
     $pager = new sfPropelPager('VOpacDigital', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'opac'));
     $this->getUser()->setAttribute('page', $page, 'opac');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'add', 'url' => 'employee_bank/create?employee_id=' . $employee->getId(), 'color' => 'black'));
     $this->actions = $actions;
     $this->employee = $employee;
 }
コード例 #18
0
ファイル: RegionPeer.php プロジェクト: taryono/school
 public static function doSelectOrdered(Criteria $criteria, $con = null)
 {
     $tmp_regions = RegionPeer::doSelect($criteria);
     $regions = array();
     foreach ($tmp_regions as $key => $val) {
         $pi = $val->getParentalIndex();
         $prefix = '';
         for ($i = 0; $i < $val->level - 1; $i++) {
             $prefix .= ParamsPeer::retrieveByCode('tree_node_mark')->getValue();
         }
         $val->setName($prefix . $val->getName());
         $regions[$pi] = $val;
     }
     ksort($regions);
     $result = array();
     foreach ($regions as $r) {
         $result[] = $r;
     }
     return $result;
 }
コード例 #19
0
ファイル: VPayerTypePeer.php プロジェクト: taryono/school
 public static function doSelectFiltered(Criteria $criteria, $con = null)
 {
     $criteria->add(VPayerTypePeer::ID, 15, Criteria::NOT_IN);
     $tmp_depts = VPayerTypePeer::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->setDescription($prefix . $val->getDescription());
         $val->setCode($prefix . $val->getCode());
         $depts[$pi] = $val;
     }
     ksort($depts);
     $result = array();
     foreach ($depts as $r) {
         $result[] = $r;
     }
     return $result;
 }
コード例 #20
0
ファイル: PaymentModelPeer.php プロジェクト: taryono/school
 public static function doSelectFiltered(Criteria $criteria, $con = null)
 {
     $dept = sfContext::getInstance()->getUser()->getAttribute('department', null, 'bo');
     $depts = $dept->getChildRecurs(array());
     $criteria->add(PaymentModelPeer::ID, $depts, Criteria::IN);
     $tmp_depts = PaymentModelPeer::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->setName($prefix . $val->getName());
         $val->setCode($prefix . $val->getCode());
         $depts[$pi] = $val;
     }
     ksort($depts);
     $result = array();
     foreach ($depts as $r) {
         $result[] = $r;
     }
     return $result;
 }
コード例 #21
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executePrintCounseling()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
     $this->forward404Unless($academic_calendar);
     $time = $this->getRequestParameter('time');
     $time2 = $this->getRequestParameter('time2');
     $tgl = $this->getRequestParameter('tgl_cetak');
     $c = new Criteria();
     $c->add(TempTablePeer::COUNSELING_ID, $counseling->getId());
     $c->add(TempTablePeer::TIME, $time);
     $c->addJoin(VStudentActivePeer::ID, TempTablePeer::STUDENT_ID);
     $c->addAscendingOrderByColumn(VStudentActivePeer::CLASS_NAME);
     $students = VStudentActivePeer::doSelect($c);
     $this->forward404Unless($students);
     $ce = new Criteria();
     $ce->add(DepartmentDetailPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $this->department_detail = DepartmentDetailPeer::doSelectOne($ce);
     $c = new Criteria();
     $c->add(CounselingSpecPeer::PARENT, 0);
     $c->addAscendingOrderByColumn(CounselingSpecPeer::ID);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'counseling_spec'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'counseling_spec');
     $pager = new sfPropelPager('CounselingSpec', $rpp);
     $pager->setPeerMethod('doSelectOrdered');
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'counseling_spec'));
     $this->getUser()->setAttribute('page', $page, 'counseling_spec');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     ## Menentukan Aturan Penilaian
     $cd = new Criteria();
     $cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
     $cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $cd->add(ScoreRulePeer::TYPE, 6);
     $score_rule = ScoreRulePeer::doSelectOne($cd);
     $this->score_rule = $score_rule;
     $this->students = $students;
     $this->subtitle = '';
     $this->counseling = $counseling;
     $this->tanggal = $time;
     $this->tgl_cetak = $tgl;
     $this->time2 = $time2;
     $this->academic_calendar = $academic_calendar;
     $this->papersize = 'a4';
     $this->orientation = 'portrait';
     $this->setViewClass('sfDomPDF');
 }
コード例 #22
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeListRaport()
 {
     $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);
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->add(StudentPeer::STATUS, Student::STATUS_ACTIVE, Criteria::EQUAL);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'Choose', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     $this->actions = $actions;
     $actions2 = array(array('name' => '<span>Wali Kelas</span>', 'url' => 'counseling_sd/list?academic_calendar_id=' . $academic_calendar->getId(), 'color' => 'sun'));
     array_push($actions2, array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'counseling_sd/listRaport?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId(), 'color' => 'sky', 'type' => 'direct'));
     $this->actions2 = $actions2;
     $this->actions3 = array();
     $this->counseling = $counseling;
     $this->subtitle = $academic_calendar->toString() . ' # ' . $counseling->getClassGroup()->toString();
     $this->academic_calendar = $academic_calendar;
     $this->student_note = new StudentNote();
     $this->counseling_id = $counseling->getId();
     $this->accal_id = $academic_calendar->getId();
 }
コード例 #23
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $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(), 'budget_status'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'budget_status');
     $pager = new sfPropelPager('BudgetStatus', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'budget_status'));
     $this->getUser()->setAttribute('page', $page, 'budget_status');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'budget_status/create', 'color' => 'black'));
     }
     $this->actions = $actions;
     $this->subtitle = '';
     $cw = new Criteria();
     $cw->add(JobPeer::PARENT, 240);
     $parent = JobPeer::doSelectOne($cw);
     $cr = new Criteria();
     $cton1 = $cr->getNewCriterion(JobPeer::PARENT, $parent->getParent(), Criteria::IN);
     $cton2 = $cr->getNewCriterion(JobPeer::ID, $job->getId(), Criteria::NOT_IN);
     $cton3 = $cr->getNewCriterion(JobPeer::CODE, 'academic_process', Criteria::NOT_IN);
     $cton4 = $cr->getNewCriterion(JobPeer::CODE, 'payer_type', Criteria::NOT_IN);
     $cton5 = $cr->getNewCriterion(JobPeer::CODE, 'payment_model', Criteria::NOT_IN);
     $cton6 = $cr->getNewCriterion(JobPeer::CODE, 'budget_category', Criteria::NOT_IN);
     $cton5->addAnd($cton6);
     $cton4->addAnd($cton5);
     $cton3->addAnd($cton4);
     $cton2->addAnd($cton3);
     $cton1->addAnd($cton2);
     $cr->add($cton1);
     $modules = JobPeer::doSelect($cr);
     $this->modules = $modules;
     $actions2 = array(array('name' => '<span>Komponen Biaya Sekolah</span>', 'url' => 'academic_cost_component/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Proses Akademik</span>', 'url' => 'academic_process/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Tipe Siswa</span>', 'url' => 'payer_type/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Model Pembayaran</span>', 'url' => 'payment_model/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Kategori Anggaran</span>', 'url' => 'budget_category/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>' . $job->getName() . '</span>', 'url' => $job->getCode(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
コード例 #24
0
ファイル: printCardSuccess.php プロジェクト: taryono/school
	}
	.univ {
		font-weight:normal;
		font-family: Verdana, Arial, Helvetica, sans-serif;
		font-size: 11px;
	}
</style>

<div align=left style="width: 330px; height: 250px;">
<table align="left" style="margin-left:5px;   margin-top: 45px; border-collapse:collapse;" border="0" width="100%;">
	<tr>	 
		<td width="100%" height="150px;" valign="top" align="center">
        <table align="left" border="0" width="300px" style="border: 1px solid #000;" height="100%" cellpadding="0" cellspacing="0" >
        <tr><td width="100%" align="center" valign="middle" style="border-bottom: 1px solid #000;">
        <b style="font-size:11px; text-transform: uppercase;"><?php 
echo __(ParamsPeer::retrieveByCode('univ_name')->getValue());
?>
<br />
		<?php 
if ($col_item->getColLocation() != null) {
    echo $col_item->getColLocation()->getParent() ? $col_item->getColLocation()->getParentName() : '-';
} else {
    echo '-';
}
?>
</b>
        </td></tr>
        <tr><td align="center" valign="middle">
		<?php 
$jumlah = substr_count($col_item->getCallNo(), "-");
$potong = explode("-", $col_item->getCallNo());
コード例 #25
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeListSched()
 {
     $student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $c = new Criteria();
     $c->add(SchedulePeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendar()->getChildRecurs(), Criteria::IN);
     $c->add(SchedulePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
     $c->add(SchedulePeer::TYPE, Schedule::IS_SCHED, Criteria::IN);
     $c->addAscendingOrderByColumn(SchedulePeer::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(), '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;
     $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_schedule/listSchedAsCSV?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "student_schedule/listSchedAsPDF?{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = $student->getName() . ' - ' . $student->getClassGroup()->toString();
     $this->student_id = $student_id;
 }
コード例 #26
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $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_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $course_schedule = CourseSchedulePeer::retrieveByPK($this->getRequestParameter('id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $c = new Criteria();
     $c->add(ClassAgendaPeer::COURSE_SCHEDULE_ID, $course_schedule->getId());
     $c->addDescendingOrderByColumn(ClassAgendaPeer::DATE);
     $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_agenda'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'class_agenda');
     $pager = new sfPropelPager('ClassAgenda', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'class_agenda'));
     $this->getUser()->setAttribute('page', $page, 'class_agenda');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'add', 'url' => 'class_agenda/create?course_id=' . $course_schedule->getId(), 'color' => 'black'));
     }
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "class_agenda/listAsCSV?id=" . $course_schedule->getId(), 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "class_agenda/listAsPDF?id=" . $course_schedule->getId(), 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
     $this->course_schedule = $course_schedule;
     $this->course_schedule_id = $course_schedule_id;
     $actions2 = array(array('name' => '<span>Jadwal Pelajaran</span>', 'url' => 'course_sched/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Agenda Kelas</span>', 'url' => 'class_agenda/list?id=' . $course_schedule->getId(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
コード例 #27
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeDelete()
 {
     $group = $this->getContext()->getUser()->getAttribute('group', null, 'bo');
     if ($group != 'root') {
         $this->forward('default', 'index');
     }
     $params = ParamsPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($params);
     $ref_error = 0;
     foreach ($params->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $params->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('params/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     if ($ref_error > 0) {
         $this->getRequest()->setError('params/delete', '_ERR_DELETE_ (' . $params->toString() . ' - id:' . $params->getId() . ')');
     } else {
         $params->delete();
     }
     return $this->forward('params', 'list');
 }
コード例 #28
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeListScoreAsCSV()
 {
     $course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $cr = new Criteria();
     $cr->add(GradeSpecPeer::PARENT, 1);
     $cr->addAscendingOrderByColumn(GradeSpecPeer::CODE);
     $this->grade1 = GradeSpecPeer::doSelect($cr);
     $this->count1 = GradeSpecPeer::doCount($cr);
     $cw = new Criteria();
     $cw->add(GradeSpecPeer::PARENT, 7);
     $cw->addAscendingOrderByColumn(GradeSpecPeer::CODE);
     $this->grade2 = GradeSpecPeer::doSelect($cw);
     $this->count2 = GradeSpecPeer::doCount($cw);
     $cm = new Criteria();
     $cm->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
     $cm->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $cm->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addJoin(VStudentActivePeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->addJoin(StudentPeer::ID, VStudentActivePeer::ID);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'student');
     $pager = new sfPropelPager('Student', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student'));
     $this->getUser()->setAttribute('page', $page, 'student');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $this->student_count = StudentAccalPeer::doCount($cm);
     $this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
     $this->course_schedule = $course_schedule;
     $this->setLayout(false);
     $this->getResponse()->setHttpHeader('Content-Type', 'text/csv');
     $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="' . $this->getModuleName() . '.csv"');
 }
コード例 #29
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeListLeave()
 {
     $employee_id = $this->getRequestParameter('employee_id');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $accal_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $c = new Criteria();
     $c->add(EmployeePermitPeer::EMPLOYEE_ID, $employee->getId(), Criteria::IN);
     $c->add(EmployeePermitPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
     $this->sortPermit($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->filterPermit($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'employee_permit'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'employee_permit');
     $pager = new sfPropelPager('EmployeePermit', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'employee_permit'));
     $this->getUser()->setAttribute('page', $page, 'employee_permit');
     $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' => "employee_permit_recapt/listLeaveAsCSV?{$filter_string}&employee_id=" . $employee->getId() . "&academic_calendar_id=" . $academic_calendar->getId(), 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "employee_permit_recapt/listLeaveAsPDF?{$filter_string}&employee_id=" . $employee->getId() . "&academic_calendar_id=" . $academic_calendar->getId(), 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = $employee->toString();
     $this->employee = $employee;
     $this->academic_calendar = $academic_calendar;
     $actions2 = array(array('name' => '<span>Rekap Cuti</span>', 'url' => 'employee_permit_recapt/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Detail Cuti</span>', 'url' => 'employee_permit_recapt/listLeave?employee_id=' . $employee->getId() . '&academic_calendar_id=' . $academic_calendar->getId(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
コード例 #30
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $usertype = $this->getContext()->getUser()->getAttribute('usertype', null, 'bo');
     $jobtemplate = $this->getContext()->getUser()->getAttribute('job_template_id', null, 'bo');
     if ($jobtemplate == 1) {
         $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_edit = $acl->getEditPriv() == 1;
         $this->can_remove = $acl->getRemovePriv() == 1;
         $byEmployee = false;
     } else {
         $c = new Criteria();
         $c->add(JobPeer::CODE, 'employee_leave_l');
         $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;
         $byEmployee = true;
     }
     $employee = EmployeePeer::retrieveByPK($this->getRequestParameter('employee_id'));
     if (!$employee) {
         $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
         $employee = EmployeePeer::retrieveByPK($employee_id);
     }
     $this->forward404Unless($employee);
     $this->employee = $employee;
     $this->byEmployee = $byEmployee;
     $c = new Criteria();
     $c->add(EmployeeLeavePeer::EMPLOYEE_ID, $employee->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(), 'employee_leave'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'employee_leave');
     $pager = new sfPropelPager('EmployeeLeave', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'employee_leave'));
     $this->getUser()->setAttribute('page', $page, 'employee_leave');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     if ($acl->getAddPriv()) {
         array_unshift($actions, array('name' => 'Tambah Data', 'url' => 'employee_leave/create?employee_id=' . $employee->getId() . '&byEmployee=' . $byEmployee, 'color' => 'black'));
     }
     $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' => "employee_leave/listAsCSV?{$filter_string}&employee_id=" . $employee->getId(), 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "employee_leave/listAsPDF?{$filter_string}&employee_id=" . $employee->getId(), 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->subtitle = $employee->toString();
     if ($employee) {
         $actions2 = array(array('name' => '<span>Catatan Kepegawaian</span>', 'url' => 'employee_list/list', 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Mutasi Jabatan</span>', 'url' => 'employee_job_history/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Absensi Pegawai</span>', 'url' => 'employee_absence/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Administrasi Cuti</span>', 'url' => 'employee_leave/list?employee_id=' . $employee->getId(), 'color' => 'sun', 'type' => 'direct'));
         array_push($actions2, array('name' => '<span>Administrasi Izin</span>', 'url' => 'employee_permit/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Administrasi Pengobatan</span>', 'url' => 'employee_medical/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Gaji Pegawai</span>', 'url' => 'employee_salary/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         $this->actions2 = $actions2;
     }
 }