00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00036 unset($MCONF);
00037 require ('conf.php');
00038 require ($BACK_PATH.'init.php');
00039 require ($BACK_PATH.'template.php');
00040 $LANG->includeLLFile('EXT:taskcenter/task/locallang.php');
00041 require_once(PATH_t3lib.'class.t3lib_scbase.php');
00042 require_once('class.mod_user_task.php');
00043
00044 $BE_USER->modAccess($MCONF, 1);
00045
00046
00047
00048
00049
00050 class SC_mod_user_task_index extends t3lib_SCbase {
00051 var $allExtClassConf = array();
00052 var $backPath;
00053 var $BE_USER;
00054
00061 function includeAllClasses() {
00062 foreach($this->MOD_MENU['function'] as $key => $name) {
00063 $curExtClassConf = $this->getExternalItemConfig($this->MCONF['name'], 'function', $key);
00064 if (is_array($curExtClassConf) && $curExtClassConf['path']) {
00065 $this->allExtClassConf[] = $curExtClassConf;
00066 $this->include_once[] = $curExtClassConf['path'];
00067 }
00068 }
00069 }
00070
00076 function main() {
00077 global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
00078
00079
00080
00081 $this->doc = t3lib_div::makeInstance('noDoc');
00082 $this->doc->docType = 'xhtml_trans';
00083 $this->doc->divClass = '';
00084 $this->doc->form = '<form action="index.php" method="POST" name="editform">';
00085 $this->backPath = $this->doc->backPath = $BACK_PATH;
00086 $this->doc->JScode = ' <script language="javascript" type="text/javascript">
00087 script_ended = 0;
00088 function jumpToUrl(URL) {
00089 window.location.href = URL;
00090 }
00091 '.(is_object($this->extObj)?$this->extObj->JScode():"").'
00092 </script>
00093 ';
00094 $this->doc->JScode .= $this->doc->getDynTabMenuJScode();
00095 $this->doc->JScode .= ' <script language="javascript" type="text/javascript">
00096 function resizeIframe(frame,max) {
00097 try {
00098 innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
00099 if(max==0) {
00100 frame.height = innerDoc.body.scrollHeight + 30;
00101 } else {
00102 frame.height = Math.max(innerDoc.body.scrollHeight + 30,document.body.scrollHeight);
00103 }
00104 }
00105 catch (e) {
00106 window.status = e.message;
00107 }
00108
00109 }
00110 </script>';
00111
00112
00113 $mainContent = $this->getMainContent();
00114
00115
00116 $this->content = '';
00117 $this->content .= $this->doc->startPage($this->MOD_MENU['function'][$this->MOD_SETTINGS['function']]);
00118 $this->content .= '<table style="width: 98%;"><tr>';
00119 $this->content .= '<td valign="top" style="width: 20%;">'.$this->getleftHeader().$this->getDynTabMenu().'</td>';
00120 $this->content .= '<td valign="top" style="height:100%">'.$mainContent.'</td>';
00121 $this->content .= '</tr></table>';
00122 }
00123
00129 Function getDynTabMenu() {
00130
00131
00132 $parts = Array();
00133 foreach($this->allExtClassConf as $conf) {
00134 $extObj = t3lib_div::makeInstance($conf['name']);
00135
00136
00137 $extObj->init($this, $conf);
00138 $extObj->backPath = $this->backPath;
00139 $extObj->mod_user_task_init($GLOBALS['BE_USER']);
00140 $part = $extObj->overview_main();
00141 if (is_array($part)) {
00142 $parts[] = $part;
00143 }
00144 }
00145 return $this->doc->getDynTabMenu($parts, 'tx_taskcenter', 1, true);
00146 }
00147
00153 function getleftHeader() {
00154 $name = $GLOBALS['BE_USER']->user['realName']?$GLOBALS['BE_USER']->user['realName']:
00155 $GLOBALS['BE_USER']->user['username'];
00156 return '<h1>TYPO3 taskcenter <br />'.$name.'</h1>';
00157
00158 }
00159
00165 function getMainContent() {
00166 if (is_object($this->extObj)) {
00167 $this->extObj->backPath = $this->backPath;
00168 $this->extObj->mod_user_task_init($GLOBALS['BE_USER']);
00169 return $this->extObj->main();
00170 }
00171 }
00172
00178 function printContent() {
00179 $this->content .= $this->doc->endPage();
00180 echo $this->content;
00181 }
00182
00183 }
00184
00185
00186
00187
00188 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']) {
00189 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']);
00190 }
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203 $SOBE = t3lib_div::makeInstance('SC_mod_user_task_index');
00204 $SOBE->init();
00205 $SOBE->includeAllClasses();
00206
00207
00208 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
00209 $SOBE->checkExtObj();
00210
00211 $SOBE->main();
00212 $SOBE->printContent();
00213 ?>