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


PHP AcademicCalendarPeer类代码示例

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


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

示例1: doSelectByAccal

 public static function doSelectByAccal()
 {
     $student_course_id = sfContext::getInstance()->getRequest()->getParameter('id');
     $student_course = StudentCoursePeer::retrieveByPK($student_course_id);
     if ($student_course) {
         if (!$student_course->getSubjectAccal()) {
             return array();
         }
         $accal = $student_course->getSubjectAccal()->getAcademicCalendar();
     } else {
         $accal_id = sfContext::getInstance()->getRequest()->getParameter('accal_id');
         $accal = AcademicCalendarPeer::retrieveByPK($accal_id);
     }
     if ($accal == null) {
         return array();
     }
     $c = new Criteria();
     $c->addAscendingOrderByColumn(AcademicCalendarPeer::CODE);
     $c->addAscendingOrderByColumn(SubjectPeer::NAME);
     $c->addAscendingOrderByColumn(EmployeePeer::NAME);
     $c->addJoin(AcademicCalendarPeer::ID, SubjectAccalPeer::ACADEMIC_CALENDAR_ID);
     $c->addJoin(SubjectPeer::ID, SubjectAccalPeer::SUBJECT_ID);
     $c->addJoin(EmployeePeer::ID, SubjectAccalPeer::EMPLOYEE_ID);
     $c->add(SubjectAccalPeer::ACADEMIC_CALENDAR_ID, $accal->getId());
     $objs = SubjectAccalPeer::doSelect($c);
     return $objs;
 }
开发者ID:taryono,项目名称:school,代码行数:27,代码来源:SubjectAccalPeer.php

示例2: executeList

 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;
     $accal_id = $this->getRequestParameter('accal_id');
     $accal = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($accal);
     $this->accal = $accal;
     $c = new Criteria();
     $c->add(SubjectAccalPeer::ACADEMIC_CALENDAR_ID, $accal_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_accal_s'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'subject_accal_s');
     $pager = new sfPropelPager('SubjectAccal', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'subject_accal_s'));
     $this->getUser()->setAttribute('page', $page, 'subject_accal_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' => 'subject_accal_s/create?accal_id=' . $accal_id, 'color' => 'green'));
     }
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:59,代码来源:actions.class.php

示例3: getAccal

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

示例4: getCustody

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

示例5: __

<tr>
	<td width="39%" valign="top">
	<!-- Course Schedule -->
	<table class="form">
	<tr><td class="form">
		<table class="form_content" width="100%">
			<tbody>
				<tr>
          				<td class='first' width="25%" style="vertical-align:top;"><label><?php 
echo __('Academic calendar');
?>
</label></td>
           				<td class="first" width="2%" style="text-align:center; vertical-align:top;">:</td>
					<td class="first" style="vertical-align:top;">
					<?php 
echo my_object_select_tag($course_schedule, 'getAcademicCalendarId', AcademicCalendarPeer::getParents(), array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'peer_method' => 'doSelectFiltered'));
?>
            				<?php 
echo form_error('academic_calendar_id');
?>
            				</td>
        			</tr>
        
        			<tr>
        				<td style="vertical-align:middle;"><label><?php 
echo __('Class group');
?>
</label></td>
            				<td style="text-align:center; vertical-align:middle;">:</td>
					<td style="vertical-align:middle;">
					<?php 
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:createSuccess.php

示例6: executePrintAll

 public function executePrintAll()
 {
     header('Cache-Control: no-cache, must-revalidate');
     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
     header('Content-type: application/json', true);
     /* TODO: Optimize code without file_get_contents. Use save from sfDomPdf */
     /* Set Report Base Dir */
     $this->reportBaseDir = WWW_ROOT . '/report';
     /* Get Param */
     $time = $this->getRequestParameter('time');
     $time2 = $this->getRequestParameter('time2');
     $tgl = $this->getRequestParameter('tgl');
     $counseling_id = $this->getRequestParameter('counseling_id');
     $accal_id = $this->getRequestParameter('accal_id');
     $student_id = $this->getRequestParameter('student_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     /* Preparing Directory */
     /* WWW_ROOT/report/{accal_id}/{counseling_id}/{student_id} */
     $studentDir = $this->prepareReportDir($accal_id, $counseling_id, $student_id);
     /* Set Param */
     $param = "time={$time}&time2={$time2}&tgl={$tgl}&counseling_id={$counseling_id}&accal_id={$accal_id}&student_id={$student_id}";
     /* Set Prefix Filename */
     /* {accal_id}_{counseling_id}_{student_id}_{cover/register/final} */
     $prefixFilename = $accal_id . '_' . $counseling_id . '_' . $student_id . '_';
     /* Preparing zip file */
     $files_to_zip = array();
     /* Save Cover */
     $coverUrl = 'http://' . BASE_HREF . '/bo/' . SF_ENVFILE . '.php/counseling_sd/printCover/?' . $param;
     $cover = file_get_contents($coverUrl);
     $coverFilename = $prefixFilename . 'cover.pdf';
     $coverPath = $studentDir . '/' . $coverFilename;
     file_put_contents($coverPath, $cover);
     $files_to_zip[] = array('path' => $coverPath, 'filename' => $coverFilename);
     /* Save Register */
     $registerUrl = 'http://' . BASE_HREF . '/bo/' . SF_ENVFILE . '.php/counseling_sd/printRegister/?' . $param;
     $register = file_get_contents($registerUrl);
     $registerFilename = $prefixFilename . 'register.pdf';
     $registerPath = $studentDir . '/' . $registerFilename;
     file_put_contents($registerPath, $register);
     $files_to_zip[] = array('path' => $registerPath, 'filename' => $registerFilename);
     /* Save Final */
     if ($academic_calendar->getDepartment()->getCourseModel() == Department::CM_TK) {
         $finalUrl = 'http://' . BASE_HREF . '/bo/' . SF_ENVFILE . '.php/counseling_sd/printReport/?' . $param;
     } else {
         $finalUrl = 'http://' . BASE_HREF . '/bo/' . SF_ENVFILE . '.php/counseling_sd/printFinal/?' . $param;
     }
     $final = file_get_contents($finalUrl);
     $finalFilename = $prefixFilename . 'final.pdf';
     $finalPath = $studentDir . '/' . $finalFilename;
     file_put_contents($finalPath, $final);
     $files_to_zip[] = array('path' => $finalPath, 'filename' => $finalFilename);
     $result = $this->create_zip($files_to_zip, $studentDir . '/' . $prefixFilename . 'report.zip', true);
     $zipFile = 'http://' . BASE_HREF . '/bo/report/' . $accal_id . '/' . $counseling_id . '/' . $student_id . '/' . $prefixFilename . 'report.zip';
     $coverFile = 'http://' . BASE_HREF . '/bo/report/' . $accal_id . '/' . $counseling_id . '/' . $student_id . '/' . $prefixFilename . 'cover.pdf';
     $registerFile = 'http://' . BASE_HREF . '/bo/report/' . $accal_id . '/' . $counseling_id . '/' . $student_id . '/' . $prefixFilename . 'register.pdf';
     $finalFile = 'http://' . BASE_HREF . '/bo/report/' . $accal_id . '/' . $counseling_id . '/' . $student_id . '/' . $prefixFilename . 'final.pdf';
     $output = array('zip' => $zipFile, 'cover' => $coverFile, 'register' => $registerFile, 'final' => $finalFile, 'finalUrl' => $finalUrl);
     $this->jsonwrapper->print_json($output);
     die;
 }
开发者ID:taryono,项目名称:school,代码行数:60,代码来源:actions.class.php

示例7: include_partial

echo include_partial('global/title', array('type' => 'list', 'title' => __('Admin Penilaian'), 'actions' => $actions, 'subtitle' => $subtitle . ($sf_request->haserrors() ? '<div class=form_error>* ' . __('_form_has_error_') . '</div>' : '')));
echo input_hidden_tag('employee_id', $employee->getid());
?>
    <table class="form" width="100%">
    <tr>
    <td class="form" style="vertical-align:top;">
            <table class="form_content" width="100%">
            <tbody>
                    <tr>
                            <td class='first' width="100%" style="vertical-align:top;">
                                    <label><?php 
echo __('Academic calendar');
?>
</label><br/>
                                            <?php 
echo my_object_select_tag($counseling, 'getAcademicCalendarId', AcademicCalendarPeer::getParents(), array('related_class' => 'AcademicCalendar', 'include_blank' => true, 'peer_method' => 'doSelectFiltered'));
?>
<br />
                                    <div class="tips">pilih tahun ajaran yang diinginkan</div>    
                            </td>
                    </tr>

                    <tr>
                            <td width="100%" class="first">
                                    <div id='subject_list' style="overflow: auto; width: 100%; height: 50em;"></div>
                                    <?php 
echo observe_field('academic_calendar_id', array('update' => 'subject_list', 'url' => 'score_admin/getSubject', 'with' => "'academic_calendar_id='+\$('academic_calendar_id').value+'&employee_id='+\$('employee_id').value+'&include_blank=true'", 'before' => "showIndicator('subject_list', 'snakebig_black');", 'complete' => "hideIndicator();"));
?>
                            </td>
                    </tr>			
开发者ID:taryono,项目名称:school,代码行数:30,代码来源:listSuccess.php

示例8: Criteria

                    
                    			<td>
					<b><?php 
        echo $counseling->getStudentCount() . ' Siswa';
        ?>
</b></td>
                    
                    			<?php 
        $c = new Criteria();
        $c->add(AcademicCalendarPeer::COURSE_MODEL, 'A');
        $c->add(AcademicCalendarPeer::PARENT, $counseling->getAcademicCalendarId());
        $accal1 = AcademicCalendarPeer::doSelectOne($c);
        $cw = new Criteria();
        $cw->add(AcademicCalendarPeer::COURSE_MODEL, 'B');
        $cw->add(AcademicCalendarPeer::PARENT, $counseling->getAcademicCalendarId());
        $accal2 = AcademicCalendarPeer::doSelectOne($cw);
        ?>
                    
                    			<!-- UTS -->
                    			<td style="text-align: center;" class="first">
                    			<?php 
        echo link_to_remote(image_tag('nilai.png', 'title=Rekap Nilai UTS Semester 1'), array('url' => 'counseling_menu/listUts?accal_id=' . $accal1->getId() . '&counseling_id=' . $counseling->getId() . '&employee_id=' . $employee_id, 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
        ?>
                    			</td>
                    
                    
                    			<td style="text-align: center;" class="first">
                    			<?php 
        echo link_to_remote(image_tag('nilai.png', 'title=Rekap Nilai UTS Semester 2'), array('url' => 'counseling_menu/listUts?accal_id=' . $accal2->getId() . '&counseling_id=' . $counseling->getId() . '&employee_id=' . $employee_id, 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
        ?>
                    			</td>
开发者ID:taryono,项目名称:school,代码行数:30,代码来源:listLedgerSuccess.php

示例9: doSelectJoinAllExceptClassType

 public static function doSelectJoinAllExceptClassType(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CounselingPeer::addSelectColumns($c);
     $startcol2 = CounselingPeer::NUM_COLUMNS - CounselingPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + AcademicCalendarPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     $c->addJoin(CounselingPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(CounselingPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = CounselingPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initCounselings();
             $obj2->addCounseling($obj1);
         }
         $omClass = AcademicCalendarPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getAcademicCalendar();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initCounselings();
             $obj3->addCounseling($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroup();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initCounselings();
             $obj4->addCounseling($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
开发者ID:taryono,项目名称:school,代码行数:82,代码来源:BaseCounselingPeer.php

示例10: executeListLeave

 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;
 }
开发者ID:taryono,项目名称:school,代码行数:64,代码来源:actions.class.php

示例11: executeSave

 public function executeSave()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $term = $this->getRequestParameter('term');
     $accal_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $employee_id = $this->getRequestParameter('employee_id');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $descs = $this->getRequestParameter('desc');
     foreach ($descs as $m => $desc) {
         if ($desc != null) {
             if ($desc != '-') {
                 $ced = new Criteria();
                 $ced->add(StudentDescPeer::STUDENT_ACCAL_ID, $m);
                 $ced->add(StudentDescPeer::TERM, $term);
                 $spec = StudentDescPeer::doSelectOne($ced);
                 if ($spec == null) {
                     $spec = new StudentDesc();
                 }
                 $spec->setStudentAccalId($m);
                 $spec->setTerm($term);
                 $spec->setNote($desc);
                 $spec->save();
             } else {
                 $ced = new Criteria();
                 $ced->add(StudentDescPeer::STUDENT_ACCAL_ID, $m);
                 $ced->add(StudentDescPeer::TERM, $term);
                 $spec = StudentDescPeer::doSelectOne($ced);
                 if ($spec != null) {
                     $spec->delete();
                 }
             }
         }
     }
     return $this->redirect('course_tk/listScore?accal_id=' . $academic_calendar->getId() . '&term=' . $term . '&counseling_id=' . $counseling->getId() . '&employee_id=' . $employee_id);
 }
开发者ID:taryono,项目名称:school,代码行数:40,代码来源:actions.class.php

示例12: executeGetListForCourse

 public function executeGetListForCourse()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $cr = new Criteria();
     $academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
     $class_group_id = $this->getRequestParameter('class_group_id');
     $accal = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
     $class = ClassGroupPeer::retrieveByPK($class_group_id);
     $cr->add(VCourseSchedulePeer::ACADEMIC_CALENDAR_ID, $this->getRequestParameter('academic_calendar_id'));
     $cr->add(VCourseSchedulePeer::CLASS_GROUP_ID, $this->getRequestParameter('class_group_id'));
     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->filterSubject($cr, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course_schedule'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'course_schedule');
     $pager = new sfPropelPager('VCourseSchedule', $rpp);
     $pager->setCriteria($cr);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course_schedule'));
     $this->getUser()->setAttribute('page', $page, 'course_schedule');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     $this->filter_string = $filter_string;
     $this->subtitle = '';
     $this->actions = $actions;
     $this->academic_calendar_id = $academic_calendar_id;
     $this->class_group_id = $class_group_id;
 }
开发者ID:taryono,项目名称:school,代码行数:51,代码来源:actions.class.php

示例13: executeSaveCopy

 public function executeSaveCopy()
 {
     $accal_tujuan = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal1'));
     $accal_asal = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal2'));
     $params = array();
     foreach (explode('&', $this->getRequestParameter('ekskul_list_ser')) as $p) {
         $p = explode('=', $p);
         $params[rawurldecode($p[0])][] = rawurldecode($p[1]);
     }
     if (array_key_exists('ekskuls', $params)) {
         foreach ($params['ekskuls'] as $ekskul_id) {
             $sc = SchedulePeer::retrieveByPK($ekskul_id);
             $cw = new Criteria();
             $cw->add(ScheduleDetailPeer::SCHEDULE_ID, $sc->getId());
             $sc_details = ScheduleDetailPeer::doSelect($cw);
             $cd = new Criteria();
             $cd->add(ScheduleTutorPeer::SCHEDULE_ID, $sc->getId());
             $sc_tutors = ScheduleTutorPeer::doSelect($cd);
             $schedule = new Schedule();
             $schedule->setGradeComponentId($sc->getGradeComponentId());
             $schedule->setAcademicCalendarId($accal_tujuan->getId());
             $schedule->setType(2);
             $schedule->setEmployeeId($sc->getEmployeeId());
             $schedule->save();
             foreach ($sc_details as $sc_detail) {
                 $schedule_detail = new ScheduleDetail();
                 $schedule_detail->setSchedule($schedule);
                 $schedule_detail->setLocationId($sc_detail->getLocationId());
                 $schedule_detail->setClassSessionId($sc_detail->getClassSessionId());
                 $schedule_detail->setDay($sc_detail->getDay());
                 $schedule_detail->save();
                 $cb = new Criteria();
                 $cb->add(StudentRaportPeer::GRADE_COMPONENT_ID, $sc->getGradeComponentId());
                 $cb->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $sc->getAcademicCalendarId());
                 $cb->add(StudentRaportPeer::SCHEDULE_DETAIL_ID, $sc_detail->getId());
                 $cb->add(StudentRaportPeer::SCHEDULE_ID, $sc->getId());
                 $stu_raports = StudentRaportPeer::doSelect($cb);
                 foreach ($stu_raports as $stu_raport) {
                     $sr = new StudentRaport();
                     $sr->setStudentId($stu_raport->getStudentId());
                     $sr->setAcademicCalendarId($accal_tujuan->getId());
                     $sr->setGradeComponentId($sc->getGradeComponentId());
                     $sr->setClassGroupId($sc->getClassGroupId());
                     $sr->setSchedule($schedule);
                     $sr->setScheduleDetail($schedule_detail);
                     $sr->save();
                 }
             }
             foreach ($sc_tutors as $sc_tutor) {
                 $schedule_tutor = new ScheduleTutor();
                 $schedule_tutor->setSchedule($schedule);
                 $schedule_tutor->setEmployeeId($sc_tutor->getEmployeeId());
                 $schedule_tutor->save();
             }
         }
     }
     return $this->redirect('extracurricular/list');
 }
开发者ID:taryono,项目名称:school,代码行数:58,代码来源:actions.class.php

示例14: doSelectJoinAllExceptGradeComponent

 public static function doSelectJoinAllExceptGradeComponent(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SchedulePeer::addSelectColumns($c);
     $startcol2 = SchedulePeer::NUM_COLUMNS - SchedulePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     SubjectCurrPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + SubjectCurrPeer::NUM_COLUMNS;
     EmployeePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + EmployeePeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     LocationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + LocationPeer::NUM_COLUMNS;
     ClassSessionPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + ClassSessionPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + AcademicCalendarPeer::NUM_COLUMNS;
     GradeSpecPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + GradeSpecPeer::NUM_COLUMNS;
     $c->addJoin(SchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
     $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(SchedulePeer::LOCATION_ID, LocationPeer::ID);
     $c->addJoin(SchedulePeer::CLASS_SESSION_ID, ClassSessionPeer::ID);
     $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(SchedulePeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SchedulePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = SubjectCurrPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getSubjectCurr();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSchedules();
             $obj2->addSchedule($obj1);
         }
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getEmployee();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initSchedules();
             $obj3->addSchedule($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroup();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addSchedule($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initSchedules();
             $obj4->addSchedule($obj1);
         }
         $omClass = LocationPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getLocation();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:BaseSchedulePeer.php

示例15: __

?>

<table class="form">
<tr><td class="form">
	<table class="form_content" width="100%">
	<tbody>
		<tr>
          	<td class='first' width="20%" style="vertical-align:top;"><label><?php 
echo __('Academic calendar');
?>
</label></td>
           	<td class="first" width="2%" style="text-align:center; vertical-align:top;">:</td>
			<td class="first" colspan="4" style="vertical-align:top;">
			<p class="detail" style="font-weight: bold;">
			<?php 
echo $accal_id ? AcademicCalendarPeer::retrieveByPk($accal_id)->getName() : '-';
?>
</p>
            <?php 
echo input_hidden_tag('academic_calendar_id', $accal_id);
?>
            </td>
        </tr>
        
        <tr>
        	<td width="20%" style="vertical-align:middle;"><label><?php 
echo __('Class group');
?>
</label></td>
            <td width="2%" style="text-align:center; vertical-align:middle;">:</td>
			<td style="vertical-align:middle;" width="28%">
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:scheduleSuccess.php


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