Пример #1
0
 public function getMonth($con = null)
 {
     include_once 'lib/model/om/BaseMonthPeer.php';
     if ($this->aMonth === null && $this->month_id !== null) {
         $this->aMonth = MonthPeer::retrieveByPK($this->month_id, $con);
     }
     return $this->aMonth;
 }
Пример #2
0
 public function executeListAbsent()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $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);
     $month_id = $this->getRequestParameter('month_id');
     $title = MonthPeer::retrieveByPK($month_id);
     $this->forward404Unless($title);
     $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);
     $this->sortStudent($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->filterStudent($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $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();
     $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' => "counseling_sd/listAbsentAsCSV?accal_id=" . $academic_calendar->getId() . "&counseling_id=" . $counseling_id . "&{$filter_string}&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "counseling_sd/listAbsentAsPDF?accal_id=" . $academic_calendar->getId() . "&counseling_id=" . $counseling_id . "&{$filter_string}&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $bln1 = substr($academic_calendar->getStart(), 5, 2);
     $bln2 = substr($academic_calendar->getEnd(), 5, 2);
     $cw = new Criteria();
     $cton1 = $cw->getNewCriterion(MonthPeer::ID, $bln1, Criteria::GREATER_EQUAL);
     $cton2 = $cw->getNewCriterion(MonthPeer::ID, $bln2, Criteria::LESS_EQUAL);
     $cton1->addAnd($cton2);
     $cw->add($cton1);
     $months = MonthPeer::doSelect($cw);
     $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'counseling_sd/list?academic_calendar_id=' . $academic_calendar->getId(), 'color' => 'sun'));
     foreach ($months as $month) {
         if ($month->getId() == $title->getId()) {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'counseling_sd/listAbsent?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&month_id=' . $month->getId(), 'color' => 'sky', 'type' => 'direct'));
         } else {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'counseling_sd/listAbsent?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&month_id=' . $month->getId(), 'color' => 'sun'));
         }
     }
     $this->actions2 = $actions2;
     $this->counseling = $counseling;
     $this->title = $title;
     $this->month = $title;
     $this->judul = $title->getName();
     $this->tahun = $academic_calendar->getYear();
     $this->subtitle = 'Recapt Absent ' . $title->getName() . ' - ' . $academic_calendar->getYear() . ' # ' . $counseling->getClassGroup()->toString();
     $this->employee_id = $employee_id;
     $this->academic_calendar = $academic_calendar;
     $this->jumHari = cal_days_in_month(CAL_GREGORIAN, $title->getMonth(), $academic_calendar->getYear());
 }
Пример #3
0
 public function executeListAbsence()
 {
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $course_id = $this->getRequestParameter('course_id');
     $course_schedule = CourseSchedulePeer::retrieveByPK($course_id);
     $this->forward404Unless($course_schedule);
     $accal_id = $this->getRequestParameter('accal_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $month_id = $this->getRequestParameter('month_id');
     $title = MonthPeer::retrieveByPK($month_id);
     $this->forward404Unless($title);
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
     $c->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->add(StudentPeer::STATUS, 2, Criteria::NOT_EQUAL);
     $c->add(StudentPeer::STATUS, 3, Criteria::NOT_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_unshift($actions, array('name' => 'Print Excel', 'url' => "course/listAbsenceAsCSV?accal_id=" . $academic_calendar->getId() . "&course_id=" . $course_schedule->getId() . "&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => 'Print PDF', 'url' => "course/listAbsenceAsPDF?accal_id=" . $academic_calendar->getId() . "&course_id=" . $course_schedule->getId() . "&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $bln1 = substr($academic_calendar->getStart(), 5, 2);
     $bln2 = substr($academic_calendar->getEnd(), 5, 2);
     $cw = new Criteria();
     $cton1 = $cw->getNewCriterion(MonthPeer::ID, $bln1, Criteria::GREATER_EQUAL);
     $cton2 = $cw->getNewCriterion(MonthPeer::ID, $bln2, Criteria::LESS_EQUAL);
     $cton1->addAnd($cton2);
     $cw->add($cton1);
     $months = MonthPeer::doSelect($cw);
     if ($course_schedule->getAcademicCalendar()->getCourseModel() == 'A') {
         $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'course/listScore', 'color' => 'sun'));
     } else {
         $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'course/listScore2', 'color' => 'sun'));
     }
     foreach ($months as $month) {
         if ($month->getId() == $title->getId()) {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'course/listAbsence?accal_id=' . $academic_calendar->getId() . '&course_id=' . $course_schedule->getId() . "&month_id=" . $month->getId(), 'color' => 'sky', 'type' => 'direct'));
         } else {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'course/listAbsence?accal_id=' . $academic_calendar->getId() . '&course_id=' . $course_schedule->getId() . "&month_id=" . $month->getId(), 'color' => 'sun'));
         }
     }
     $this->actions2 = $actions2;
     $this->course_schedule = $course_schedule;
     $this->title = $title;
     $this->month = $title;
     $this->judul = $title->getName();
     $this->tahun = $academic_calendar->getYear();
     $this->subtitle = 'Absensi Bulan ' . $title->getName() . ' - ' . $academic_calendar->getYear() . ' # ' . $course_schedule->getClassGroup()->toString();
     $this->employee_id = $employee_id;
     $this->academic_calendar = $academic_calendar;
     $this->jumHari = cal_days_in_month(CAL_GREGORIAN, $title->getMonth(), $academic_calendar->getYear());
 }
Пример #4
0
 public function executePrintAbsenceXLS()
 {
     $academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
     $this->forward404Unless($academic_calendar);
     $department_id = $this->getRequestParameter('department_id');
     $department = DepartmentPeer::retrieveByPK($department_id);
     $this->forward404Unless($department);
     $month_id = $this->getRequestParameter('month_id');
     $month = MonthPeer::retrieveByPK($month_id);
     $this->forward404Unless($month);
     $tgl_absen1 = $this->getRequestParameter('tgl_absen1');
     $tgl_absen2 = $this->getRequestParameter('tgl_absen2');
     $time = $this->getRequestParameter('time');
     $time2 = $this->getRequestParameter('time2');
     $tgl_cetak = $this->getRequestParameter('tgl_cetak');
     $cr = new Criteria();
     $cr->add(TempTablePeer::COUNSELING_ID, $academic_calendar->getId());
     $cr->add(TempTablePeer::STUDENT_ID, $department->getId());
     $cr->add(TempTablePeer::TIME, $time);
     $cr->addJoin(EmployeePeer::ID, TempTablePeer::EMPLOYEE_ID);
     $cr->addAscendingOrderByColumn(EmployeePeer::ID);
     $employees = EmployeePeer::doSelect($cr);
     $this->academic_calendar = $academic_calendar;
     $this->department = $department;
     $this->time = $time;
     $this->time2 = $time2;
     $this->tgl_cetak = $tgl_cetak;
     $this->tgl_absen1 = $tgl_absen1;
     $this->tgl_absen2 = $tgl_absen2;
     $this->employees = $employees;
     $this->month = $month;
     $cli = new Criteria();
     $cli->add(EmployeeRegulationPeer::REGULATION_TYPE, EmployeeRegulation::ABSENCE);
     $employ_regulations = EmployeeRegulationPeer::doSelect($cli);
     $groups = array();
     $types = array();
     $alls = array();
     foreach ($employ_regulations as $emp_reg) {
         $groups[$emp_reg->getAcademicCalendarId() . '#' . $emp_reg->getGroups()] = $emp_reg->getId();
         $types[$emp_reg->getAcademicCalendarId() . '#' . $emp_reg->getStaffTypeId()] = $emp_reg->getId();
         $alls[$emp_reg->getAcademicCalendarId() . '#' . $emp_reg->getStaffTypeId() . '#' . $emp_reg->getGroups()] = $emp_reg->getId();
     }
     $this->employ_regulations = $employ_regulations;
     $this->alls = $alls;
     $this->groups = $groups;
     $this->types = $types;
     $this->setLayout(false);
     $this->getResponse()->setHttpHeader('Content-Type', 'application/vnd-ms-excel');
     $this->getResponse()->setHttpHeader('Content-Disposition', 'attachment; filename="' . $this->getModuleName() . '.xls"');
 }
Пример #5
0
 public function executeListDetail()
 {
     $class_id = $this->getRequestParameter('class_group_id');
     $user_id = $this->getRequestParameter('user_id');
     $paid_at = $this->getRequestParameter('paid_at');
     $paid = $this->getRequestParameter('paid');
     $accal_id = $this->getRequestParameter('accal_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $class_group = ClassGroupPeer::retrieveByPK($class_id);
     $this->forward404Unless($class_group);
     $user = UserPeer::retrieveByPK($user_id);
     $this->forward404Unless($user);
     $tanggal = substr($paid_at, 8, 2);
     $bln = substr($paid_at, 5, 2);
     $tahun = substr($paid_at, 0, 4);
     $title = MonthPeer::retrieveByPK($bln);
     $this->forward404Unless($title);
     $c = new Criteria();
     $c->add(AcademicCalendarPeer::COURSE_MODEL, 'B', Criteria::IN);
     $c->add(AcademicCalendarPeer::PARENT, $academic_calendar->getId(), Criteria::IN);
     $c->addJoin(StudentAccalPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $class_id, Criteria::IN);
     $c->addJoin(VSppPeer::STUDENT_ID, StudentAccalPeer::STUDENT_ID);
     $c->add(VSppPeer::USER_ID, $user_id);
     $c->add(VSppPeer::PAID_AT, $paid_at);
     $c->add(VSppPeer::PAID, $paid);
     $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', 10, 'pay_history'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'pay_history');
     $pager = new sfPropelPager('VSpp', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'pay_history'));
     $this->getUser()->setAttribute('page', $page, 'pay_history');
     $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) {
             if ($key == 'PAID_AT') {
                 $filter_string .= "&filters[{$key}][from]=" . $val['from'];
                 $filter_string .= "&filters[{$key}][to]=" . $val['to'];
             } else {
                 if ($val != '' && $val != null) {
                     $filter_string .= "&filters[{$key}]={$val}";
                 }
             }
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "history_spp/listDetailAsCSV?{$filter_string}&class_group_id=" . $class_id . "&user_id=" . $user_id . "&paid_at=" . $paid_at . "&paid=" . $paid . "&accal_id=" . $accal_id, 'color' => 'white', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "history_spp/listDetailAsPDF?{$filter_string}&class_group_id=" . $class_id . "&user_id=" . $user_id . "&paid_at=" . $paid_at . "&paid=" . $paid . "&accal_id=" . $accal_id, 'color' => 'white', 'type' => 'direct'));
     $this->actions = $actions;
     $this->tanggal = $tanggal;
     $this->bln = $bln;
     $this->tahun = $tahun;
     $this->class_id = $class_id;
     $this->accal_id = $accal_id;
     $this->user_id = $user_id;
     $this->paid_at = $paid_at;
     $this->paid = $paid;
     if ($user) {
         $this->subtitle = $class_group->toString() . ' - ' . $user->getLogin() . ' (' . $tanggal . ' ' . $title->getName() . ' ' . $tahun . ')';
     } else {
         $this->subtitle = $class_group->toString() . ' (' . $tanggal . ' ' . $title->getName() . ' ' . $tahun . ')';
     }
 }
Пример #6
0
 public function executeListDetail()
 {
     $cost_id = $this->getRequestParameter('academic_cost_component_id');
     $user_id = $this->getRequestParameter('user_id');
     $paid_at = $this->getRequestParameter('paid_at');
     $academic_cost_component = AcademicCostComponentPeer::retrieveByPK($cost_id);
     $this->forward404Unless($academic_cost_component);
     $user = UserPeer::retrieveByPK($user_id);
     $this->forward404Unless($user);
     $tanggal = substr($paid_at, 8, 2);
     $bln = substr($paid_at, 5, 2);
     $tahun = substr($paid_at, 0, 4);
     $title = MonthPeer::retrieveByPK($bln);
     $this->forward404Unless($title);
     $c = new Criteria();
     $c->add(VInfaqPaymentPeer::USER_ID, $user_id);
     $c->add(VInfaqPaymentPeer::PAID_AT, $paid_at);
     $c->add(VInfaqPaymentPeer::ACADEMIC_COST_COMPONENT_ID, $academic_cost_component->getId());
     $this->sortPayment($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->filterPayment($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', 50, 'pay_history'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'pay_history');
     $pager = new sfPropelPager('VInfaqPayment', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'pay_history'));
     $this->getUser()->setAttribute('page', $page, 'pay_history');
     $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) {
             if ($key == 'PAID_AT') {
                 $filter_string .= "&filters[{$key}][from]=" . $val['from'];
                 $filter_string .= "&filters[{$key}][to]=" . $val['to'];
             } else {
                 if ($val != '' && $val != null) {
                     $filter_string .= "&filters[{$key}]={$val}";
                 }
             }
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "history_applicant/listDetailAsCSV?{$filter_string}&academic_cost_component_id=" . $cost_id . "&user_id=" . $user_id . "&paid_at=" . $paid_at, 'color' => 'white', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "history_applicant/listDetailAsPDF?{$filter_string}&academic_cost_component_id=" . $cost_id . "&user_id=" . $user_id . "&paid_at=" . $paid_at, 'color' => 'white', 'type' => 'direct'));
     $this->actions = $actions;
     $this->tanggal = $tanggal;
     $this->bln = $bln;
     $this->tahun = $tahun;
     $this->cost_id = $cost_id;
     $this->user_id = $user_id;
     $this->paid_at = $paid_at;
     if ($user) {
         $this->subtitle = $academic_cost_component->toString() . ' - ' . $user->getLogin() . ' (' . $tanggal . ' ' . $title->getName() . ' ' . $tahun . ')';
     } else {
         $this->subtitle = $academic_cost_component->toString() . ' (' . $tanggal . ' ' . $title->getName() . ' ' . $tahun . ')';
     }
 }
Пример #7
0
 public function executeListAbsenceByEmployee()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'counseling_menu/listAbsence');
     $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);
     $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);
     $month_id = $this->getRequestParameter('month_id');
     $title = MonthPeer::retrieveByPK($month_id);
     $this->forward404Unless($title);
     $c = new Criteria();
     $c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
     $c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
     $c->addJoin(VStudentActivePeer::ID, StudentAccalPeer::STUDENT_ID);
     $c->addJoin(StudentPeer::ID, VStudentActivePeer::ID);
     $c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
     $this->sortStudent($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->filterStudent($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $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' => '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' => "counseling_menu/listAbsenceByEmployeeAsCSV?accal_id=" . $academic_calendar->getId() . "&counseling_id=" . $counseling_id . "&{$filter_string}&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "counseling_menu/listAbsenceByEmployeeAsPDF?accal_id=" . $academic_calendar->getId() . "&counseling_id=" . $counseling_id . "&{$filter_string}&month_id=" . $month_id, 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $bln1 = substr($academic_calendar->getStart(), 5, 2);
     $bln2 = substr($academic_calendar->getEnd(), 5, 2);
     $cw = new Criteria();
     $cton1 = $cw->getNewCriterion(MonthPeer::ID, $bln1, Criteria::GREATER_EQUAL);
     $cton2 = $cw->getNewCriterion(MonthPeer::ID, $bln2, Criteria::LESS_EQUAL);
     $cton1->addAnd($cton2);
     $cw->add($cton1);
     $months = MonthPeer::doSelect($cw);
     $actions2 = array(array('name' => '<span>' . $academic_calendar->toString() . '</span>', 'url' => 'counseling_menu/listAbsence', 'color' => 'sun'));
     foreach ($months as $month) {
         if ($month->getId() == $title->getId()) {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'counseling_menu/listAbsenceByEmployee?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&month_id=' . $month->getId(), 'color' => 'sky', 'type' => 'direct'));
         } else {
             array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'counseling_menu/listAbsenceByEmployee?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&month_id=' . $month->getId(), 'color' => 'sun'));
         }
     }
     $this->actions2 = $actions2;
     $this->counseling = $counseling;
     $this->title = $title;
     $this->month = $title;
     $this->judul = $title->getName();
     $this->tahun = $academic_calendar->getYear();
     $this->subtitle = 'Absensi Bulan ' . $title->getName() . ' - ' . $academic_calendar->getYear() . ' # ' . $counseling->getClassGroup()->toString();
     $this->employee_id = $employee_id;
     $this->academic_calendar = $academic_calendar;
 }