pages/manager/TimelineHandler.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00015 //$Id$
00016 
00017 import('pages.manager.ManagerHandler');
00018 
00019 class TimelineHandler extends ManagerHandler {
00023    function TimelineHandler() {
00024       parent::ManagerHandler();
00025    }
00026 
00030    function timeline($args) {
00031       $this->validate();
00032       $this->setupTemplate(true);
00033 
00034       import('manager.form.TimelineForm');
00035 
00036       if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00037          $timelineForm = new TimelineForm(Request::getUserVar('overrideDates'));
00038       } else {
00039          $timelineForm =& new TimelineForm(Request::getUserVar('overrideDates'));
00040       }
00041       $timelineForm->initData();
00042       $timelineForm->display();
00043 
00044    }
00045 
00046    function updateTimeline($args) {
00047       $this->validate();
00048       $this->setupTemplate(true);
00049 
00050       import('manager.form.TimelineForm');
00051 
00052       if (checkPhpVersion('5.0.0')) { // WARNING: This form needs $this in constructor
00053          $timelineForm = new TimelineForm(Request::getUserVar('overrideDates'));
00054       } else {
00055          $timelineForm =& new TimelineForm(Request::getUserVar('overrideDates'));
00056       }
00057       $timelineForm->readInputData();
00058 
00059       if ($timelineForm->validate()) {
00060          $timelineForm->execute();
00061          Request::redirect(null, null, null, 'index');
00062       } else {
00063          $timelineForm->setData('errorsExist', true);
00064          $timelineForm->display();
00065       }
00066    }
00067 
00068 }
00069 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7