本文整理汇总了PHP中AclPeer类的典型用法代码示例。如果您正苦于以下问题:PHP AclPeer类的具体用法?PHP AclPeer怎么用?PHP AclPeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AclPeer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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_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(AcademicCalendarPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
$filters = null;
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', 999);
$pager = new sfPropelPager('AcademicCalendar', $rpp);
$pager->setPeerMethod('doSelectOrdered');
$pager->setCriteria($c);
$pager->setPage($this->getRequestParameter('page', 1));
$pager->init();
$this->pager = $pager;
$actions = array(array('name' => 'filter', 'color' => 'white'));
$filter_string = "";
if ($filters) {
foreach ($filters as $key => $val) {
$filter_string .= "&filters[{$key}]={$val}";
}
$filter_string = preg_replace('/^&/', '', $filter_string);
}
$this->actions = $actions;
}
开发者ID:taryono,项目名称:school,代码行数:59,代码来源:actions.class.php
示例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_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
$c = new Criteria();
$c->addAscendingOrderByColumn(CourseSchedulePeer::CLASS_GROUP_ID);
$this->sort($c);
if ($this->getRequest()->hasParameter('filters')) {
$filters = $this->getRequestParameter('filters');
if ($filters == 'clear') {
$this->filters = null;
} else {
$defined_filter = false;
foreach ($filters as $f) {
if (is_array($f)) {
if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
$defined_filter = true;
break;
}
} else {
if ($f != null && $f != '') {
$defined_filter = true;
break;
}
}
}
if ($defined_filter) {
$this->filters = $filters;
$this->filter($c, $this->getRequestParameter('filters'));
}
}
}
$rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course'));
$this->getUser()->setAttribute('max_per_page', $rpp, 'course');
$pager = new sfPropelPager('CourseSchedule', $rpp);
$pager->setCriteria($c);
$page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course'));
$this->getUser()->setAttribute('page', $page, 'course');
$pager->setPage($page);
$pager->init();
$this->pager = $pager;
$actions = array();
$this->actions = $actions;
$this->subtitle = $dept->getName();
$this->counseling = new Counseling();
$this->dept = $dept;
}
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php
示例3: 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());
$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(ColLocationPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
$c->addJoin(ColItemPeer::COL_LOCATION_ID, ColLocationPeer::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 ($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(), 'col_item'));
$this->getUser()->setAttribute('max_per_page', 12, 'col_item');
$pager = new sfPropelPager('ColItem', 12);
$pager->setCriteria($c);
$page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'col_item'));
$this->getUser()->setAttribute('page', $page, 'col_item');
$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);
}
$this->filter_string = $filter_string;
$this->subtitle = '';
$actions = array(array('name' => 'cetak', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
$this->actions = $actions;
$this->actions3 = array();
}
开发者ID:taryono,项目名称:school,代码行数:55,代码来源:actions.class.php
示例4: executeShowStudent
public function executeShowStudent()
{
$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');
}
$subject = SubjectPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($subject);
$this->subtitle = $subject->toString() . ' - id:' . $subject->getId();
$this->subject = $subject;
}
开发者ID:taryono,项目名称:school,代码行数:15,代码来源:actions.class.php
示例5: 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;
$actions = array();
$this->actions = $actions;
$this->byEmployee = false;
$this->subtitle = 'Riwayat Penilaian';
$this->counseling = new Counseling();
}
开发者ID:taryono,项目名称:school,代码行数:18,代码来源:actions.class.php
示例6: executeListByEmployee
public function executeListByEmployee()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, 'counseling/listByEmployee');
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
$employee = EmployeePeer::retrieveByPK($employee_id);
$this->forward404Unless($employee);
$dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
$actions = array();
$this->actions = $actions;
$this->subtitle = $employee->toString();
$this->employee_id = $employee_id;
$this->employee = $employee;
$this->counseling = new Counseling();
}
开发者ID:taryono,项目名称:school,代码行数:21,代码来源:actions.class.php
示例7: executeEdit
public function executeEdit()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$payment_student = PaymentJournalPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($payment_student);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'payment_student/delete?id=' . $payment_student->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'payment_student/list', 'color' => 'white'));
$this->subtitle = $payment_student->toString() . ' - id:' . $payment_student->getId();
$this->type = 'edit';
$this->payment_student = $payment_student;
$this->actions = $actions;
$dept = sfContext::getInstance()->getUser()->getAttribute('department', null, 'bo');
$depts = $dept->getChildRecurs(array());
$this->academic_costs = array();
$c = new Criteria();
$c->add(AcademicCalendarPeer::DEPARTMENT_ID, $depts, Criteria::IN);
$c->addJoin(AcademicCalendarPeer::ID, VAcademicCostPeer::ACADEMIC_CALENDAR_ID);
$costs = VAcademicCostPeer::doSelect($c);
foreach ($costs as $cost) {
$academic_costs[$cost->getId()] = $cost->toStringCap();
}
$this->academic_costs = $academic_costs;
}
开发者ID:taryono,项目名称:school,代码行数:36,代码来源:actions.class.php
示例8: executeAchievement
public function executeAchievement()
{
$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->ng_test_applicant = NgTestApplicantPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($this->ng_test_applicant);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'ng_test_applicant/delete?id=' . $this->ng_test_applicant->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'ng_test_applicant/list', 'color' => 'black'));
$this->actions = $actions;
$this->subtitle = $this->ng_test_applicant->getName() . ' - id:' . $this->ng_test_applicant->getId();
$this->type = 'edit';
$this->setTemplate('editPhase');
$this->tipe = 'achievement';
$this->title = 'Detail Prestasi';
$this->actions_url = 'ng_test_applicant/saveAchievement';
$this->tab_attr_tmpl = $this->getContext()->getModuleDirectory() . "/templates/tmplTabSuccess.php";
$actions2 = array(array('name' => 'TestApplicant', 'url' => 'ng_test_applicant/list', 'color' => 'sky'));
array_push($actions2, array('name' => 'Identity Detail', 'url' => 'ng_test_applicant/edit?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Education Detail', 'url' => 'ng_test_applicant/education?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Parents Detail', 'url' => 'ng_test_applicant/parent?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Home Detail', 'url' => 'ng_test_applicant/home?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Medical Detail', 'url' => 'ng_test_applicant/medical?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Talent Detail', 'url' => 'ng_test_applicant/talent?id=' . $this->ng_test_applicant->getId(), 'color' => 'sky'));
array_push($actions2, array('name' => 'Achievement Detail', 'url' => 'ng_test_applicant/achievement?id=' . $this->ng_test_applicant->getId(), 'color' => 'sun', 'type' => 'direct'));
$this->actions2 = $actions2;
}
开发者ID:taryono,项目名称:school,代码行数:35,代码来源:actions.class.php
示例9: executeEdit
public function executeEdit()
{
$emp_id = $this->getRequestParameter('employee_id');
$emp = EmployeePeer::retrieveByPK($emp_id);
$this->forward404Unless($emp);
$this->employee = $emp;
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$teaching_competency = TeachingCompetencyPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($teaching_competency);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'teaching_competency/delete?employee_id=' . $emp_id . '&id=' . $teaching_competency->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'teaching_competency/list?employee_id=' . $emp_id, 'color' => 'white'));
$this->subtitle = $teaching_competency->toString() . ' - id:' . $teaching_competency->getId();
$this->type = 'edit';
$this->teaching_competency = $teaching_competency;
$this->actions = $actions;
}
开发者ID:taryono,项目名称:school,代码行数:29,代码来源:actions.class.php
示例10: executeEdit
public function executeEdit()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$cat_language = CatLanguagePeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($cat_language);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
// if ($acl->getAddPriv()) array_push($actions, array('name'=>'copy','type'=>'submit', 'options'=>array('class'=>'save_button', 'onclick'=>"action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'cat_language/delete?id=' . $cat_language->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'cat_language/list', 'color' => 'black'));
$this->subtitle = $cat_language->toString() . ' - id:' . $cat_language->getId();
$this->type = 'edit';
$this->cat_language = $cat_language;
$this->actions = $actions;
}
开发者ID:taryono,项目名称:school,代码行数:26,代码来源:actions.class.php
示例11: executeEdit
public function executeEdit()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$member_type = MemberTypePeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($member_type);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
// if ($acl->getAddPriv()) array_push($actions, array('name'=>'copy','type'=>'submit', 'options'=>array('class'=>'save_button', 'onclick'=>"action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'member_type/delete?id=' . $member_type->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'member_type/list', 'color' => 'black'));
$this->subtitle = $member_type->toString() . ' - id:' . $member_type->getId();
$this->type = 'edit';
$this->member_type = $member_type;
$this->forward404Unless($this->member_type);
$c = new Criteria();
$this->member_jobs = MemberJobPeer::doSelect($c);
foreach ($this->member_jobs as $member_job) {
$c = new Criteria();
$c->add(MemberJobPeer::PARENT, $member_job->getId());
$c->add(MemberJobPeer::DISPLAY_MENU, true);
$member_job->child = MemberJobPeer::doCount($c);
$c = new Criteria();
$c->add(MemberAclPeer::MEMBER_TYPE_ID, $this->member_type->getId(), Criteria::EQUAL);
$c->add(MemberAclPeer::MEMBER_JOB_ID, $member_job->getId(), Criteria::EQUAL);
$member_job->member_acl = MemberAclPeer::doSelectOne($c);
$member_job->level = $member_job->getLevel();
$member_job->order = $member_job->getMenuOrderRecursive();
}
function sortOrder($a, $b)
{
if ($a->order == $b->order) {
return 0;
}
return $a->order < $b->order ? -1 : 1;
}
usort($this->member_jobs, 'sortOrder');
$this->actions = $actions;
}
开发者ID:taryono,项目名称:school,代码行数:49,代码来源:actions.class.php
示例12: executeListAbsenceByEmployee
public function executeListAbsenceByEmployee()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, 'counseling/listByEmployee');
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$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, 2, Criteria::NOT_EQUAL);
$c->add(StudentPeer::STATUS, 3, Criteria::NOT_EQUAL);
$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/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/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/listByEmployee', 'color' => 'volcadot'));
foreach ($months as $month) {
if ($month->getId() == $title->getId()) {
array_push($actions2, array('name' => '<span>' . $month->getName() . '</span>', 'url' => 'counseling/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/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;
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class1.php
示例13: executeEdit
public function executeEdit()
{
$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_add = $acl->getAddPriv() == 1;
$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_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$byEmployee = true;
}
$employee_leave = EmployeeLeavePeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($employee_leave);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'employee_leave/delete?id=' . $employee_leave->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'employee_leave/list?employee_id=' . $employee_leave->getEmployeeId(), 'color' => 'white'));
$this->subtitle = $employee_leave->toString() . ' - id:' . $employee_leave->getId();
$this->type = 'edit';
$this->employee_leave = $employee_leave;
$this->actions = $actions;
$employee = $employee_leave->getEmployee();
if ($byEmployee == false) {
$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;
}
$this->byEmployee = $byEmployee;
}
开发者ID:taryono,项目名称:school,代码行数:54,代码来源:actions.class.php
示例14: executeEdit
public function executeEdit()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$user_group = UserGroupPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($user_group);
if ($user_group->getJobTemplateId() == 11) {
$c = new Criteria();
$cton1 = $c->getNewCriterion(JobPeer::ID, 132, Criteria::NOT_IN);
$cton2 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, 1, Criteria::IN);
$cton3 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, 3, Criteria::IN);
$cton4 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, 11, Criteria::IN);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addAnd($cton2);
$c->add($cton1);
$c->addAscendingOrderByColumn(JobPeer::MENU_ORDER);
$jobs = JobPeer::doSelect($c);
} else {
$c = new Criteria();
$cton1 = $c->getNewCriterion(JobPeer::ID, 132, Criteria::NOT_IN);
$cton2 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, $user_group->getJobTemplateId(), Criteria::IN);
$cton3 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, $user_group->getJobTemplate()->getParent(), Criteria::IN);
$cton4 = $c->getNewCriterion(JobPeer::JOB_TEMPLATE_ID, 11, Criteria::IN);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addAnd($cton2);
$c->add($cton1);
$c->addAscendingOrderByColumn(JobPeer::MENU_ORDER);
$jobs = JobPeer::doSelect($c);
}
foreach ($jobs as $job) {
$c = new Criteria();
$c->add(JobPeer::PARENT, $job->getId());
$c->add(JobPeer::DISPLAY_MENU, true);
$job->child = JobPeer::doCount($c);
$c = new Criteria();
$c->add(AclPeer::USER_GROUP_ID, $user_group->getId(), Criteria::EQUAL);
$c->add(AclPeer::JOB_ID, $job->getId(), Criteria::EQUAL);
$job->acl = AclPeer::doSelectOne($c);
$job->level = $job->getLevel();
$job->order = $job->getMenuOrderRecursive();
}
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($user_group->getCode() != 'admin' && $user_group->getCode() != 'student' && $user_group->getCode() != 'lector') {
array_push($actions, array('name' => 'delete', 'url' => 'user_group/delete?id=' . $user_group->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'user_group/list', 'color' => 'white'));
$this->subtitle = $user_group->toString() . ' - id:' . $user_group->getId();
$this->type = 'edit';
$this->user_group = $user_group;
$this->icon = 'user_edit.png';
$this->actions = $actions;
$this->jobs = $jobs;
}
开发者ID:taryono,项目名称:school,代码行数:64,代码来源:actions.class.php
示例15: executeEdit
public function executeEdit()
{
$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;
$schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($schedule);
$this->setTemplate('edit');
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'extracurricular/delete?id=' . $schedule->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'extracurricular/list', 'color' => 'black'));
$this->subtitle = $schedule->toStringCap() . ' - id:' . $schedule->getId();
$this->type = 'edit';
$this->schedule = $schedule;
$this->actions = $actions;
$c = new Criteria();
$c->add(ScheduleDetailPeer::SCHEDULE_ID, $schedule->getId());
$c->addDescendingOrderByColumn(ScheduleDetailPeer::ID);
$rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'schedule_detail'));
$this->getUser()->setAttribute('max_per_page', $rpp, 'schedule_detail');
$pager = new sfPropelPager('ScheduleDetail', $rpp);
$pager->setCriteria($c);
$page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'schedule_detail'));
$this->getUser()->setAttribute('page', $page, 'schedule_detail');
$pager->setPage($page);
$pager->init();
$this->pager = $pager;
$actions2 = array(array('name' => 'add', 'url' => 'extracurricular/createSchedule?schedule_id=' . $schedule->getId(), 'color' => 'black'));
$this->actions2 = $actions2;
}
开发者ID:taryono,项目名称:school,代码行数:39,代码来源:actions.class.php
示例16: executeEdit
public function executeEdit()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$jobs = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $jobs->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$job = JobPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($job);
$c = new Criteria();
$c->add(JobInformationPeer::JOB_ID, $job->getId());
$job_information = JobInformationPeer::doSelectOne($c);
if ($job_information) {
$this->job_information = $job_information;
} else {
$this->job_information = new JobInformation();
}
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
if ($acl->getRemovePriv()) {
array_push($actions, array('name' => 'delete', 'url' => 'job_information/delete?id=' . $job->getId(), 'color' => 'red'));
}
array_push($actions, array('name' => 'cancel', 'url' => 'job_information/list', 'color' => 'white'));
$this->subtitle = $job->toString() . ' - id:' . $job->getId();
$this->type = 'edit';
$this->job = $job;
$this->actions = $actions;
$cw = new Criteria();
$cw->add(JobPeer::PARENT, 1078);
$cw->addAscendingOrderByColumn('menu_order');
$parent = JobPeer::doSelectOne($cw);
$cr = new Criteria();
$cton1 = $cr->getNewCriterion(JobPeer::PARENT, $parent->getParent(), Criteria::IN);
$cton2 = $cr->getNewCriterion(JobPeer::ID, $jobs->getId(), Criteria::NOT_IN);
$cton3 = $cr->getNewCriterion(JobPeer::CODE, 'public_information_category/list', Criteria::NOT_IN);
$cton4 = $cr->getNewCriterion(JobPeer::CODE, 'public_information/listArticle', Criteria::NOT_IN);
$cton5 = $cr->getNewCriterion(JobPeer::CODE, 'job_information/list', Criteria::NOT_IN);
$cton6 = $cr->getNewCriterion(JobPeer::CODE, 'job_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>Kategori Artikel</span>', 'url' => 'job_category/list', 'color' => 'sky'));
array_push($actions2, array('name' => '<span>Artikel Web</span>', 'url' => 'public_information/listArticle', 'color' => 'sky'));
array_push($actions2, array('name' => '<span>Kategori Menu</span>', 'url' => 'job_category/list', 'color' => 'sky'));
array_push($actions2, array('name' => '<span>' . $jobs->getName() . '</span>', 'url' => $jobs->getCode(), 'color' => 'sun', 'type' => 'direct'));
$this->actions2 = $actions2;
}
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php
示例17: fromArray
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = AclPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setUserGroupId($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setJobId($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setAddPriv($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setEditPriv($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
$this->setRemovePriv($arr[$keys[4]]);
}
}
开发者ID:taryono,项目名称:school,代码行数:19,代码来源:BaseAcl.php
-
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1586|2022-08-30
-
joaomh/curso-de-matlab
阅读:1149|2022-08-17
-
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1003|2022-11-06
-
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1081|2022-08-17
-
tpoechtrager/cctools-port: Apple cctools port for Linux and *BSD
阅读:480|2022-08-15
-
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:764|2022-08-16
-
”云”或者’云滴‘是云模型的基本单元,所谓云是指在其论域上的一个分布,可以用联合
阅读:545|2022-07-18
-
Vulnerability in the Oracle Solaris product of Oracle Systems (component: SMB Se
阅读:466|2022-07-29
-
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:361|2022-11-06
-
Windows Hyper-V Information Disclosure Vulnerability. This CVE ID is unique from
阅读:936|2022-07-29
|
请发表评论