00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/ActionHandlerConfig.php';
00027 require_once dirname(__FILE__) . '/../Model/News.php';
00028 require_once dirname(__FILE__) . '/actions.php';
00029
00030
00031
00032
00044
00045 class FF_ActionHandlerConfig_News extends FF_ActionHandlerConfig {
00046
00047
00054 function loadConfig()
00055 {
00056 $appName = $this->actionHandler->o_registry->getCurrentApp();
00057 $o_output =& FF_Output::factory();
00058 if ($this->actionHandler->getActionId() == ACTION_WORKSHOP_DISPLAY) {
00059 $o_output->o_tpl->assign('I_title', $o_output->imgTag(
00060 't_workshops.gif', 'title', array('app' => $appName)));
00061 }
00062 else {
00063 $o_output->o_tpl->assign('I_title', $o_output->imgTag(
00064 't_news.gif', 'title', array('app' => $appName)));
00065 }
00066
00067 $this->actionHandler->setDefaultActionId(ACTION_DISPLAY);
00068 $this->actionHandler->batchModifyActions(
00069 array(ACTION_LIST, ACTION_EDIT, ACTION_ADD, ACTION_EDIT_SUBMIT, ACTION_ADD_SUBMIT, ACTION_DISPLAY, ACTION_DELETE),
00070 $this->actionHandler->o_registry->getAppFile('Action', $appName, 'libs'),
00071 '_News',
00072 'News'
00073 );
00074 $this->actionHandler->addAction(
00075 ACTION_CONTACT,
00076 $this->actionHandler->o_registry->getAppFile('Action/Contact.php', $appName, 'libs'),
00077 'FF_Action_AlumContact'
00078 );
00079 $this->actionHandler->addAction(
00080 ACTION_CONTACT_SUBMIT,
00081 $this->actionHandler->o_registry->getAppFile('Action/ContactSubmit.php', $appName, 'libs'),
00082 'FF_Action_AlumContactSubmit'
00083 );
00084 $this->actionHandler->addAction(
00085 ACTION_WORKSHOP_DISPLAY,
00086 $this->actionHandler->o_registry->getAppFile('Action/WorkshopDisplay.php', $appName, 'libs'),
00087 'FF_Action_Display_Workshop'
00088 );
00089 $this->actionHandler->o_model =& new FF_Model_News();
00090 }
00091
00092
00093
00094
00101 function hasCheckAuth()
00102 {
00103 return true;
00104 }
00105
00106
00107
00108
00116 function checkAuth()
00117 {
00118 if ($this->actionHandler->getActionId() != ACTION_DISPLAY &&
00119 $this->actionHandler->getActionId() != ACTION_WORKSHOP_DISPLAY) {
00120 $this->actionHandler->checkAuth(true);
00121 }
00122 }
00123
00124
00125 }
00126 ?>