<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/taskcenter/task/index.php Source File",
				"datetime" => "Sat Dec 2 19:22:17 2006",
				"date" => "2 Dec 2006",
				"doxygenversion" => "1.4.6",
				"projectname" => "TYPO3 4.0.1",
				"projectnumber" => "4.0.1"
			);
  get_header($doxygen_vars);
?>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_c8daf1ad746050abf985cc546c89e248.html">typo3_src-4.0.1</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_18071ae4545d8b3e0364d30c0659c74a.html">typo3</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_57bf1ed8249c1fd5b014486d01bcb27a.html">sysext</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_6a6cc620f082e024e77de01e009e65a3.html">taskcenter</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_1bb2edecb772a71ff506fb65c68c7358.html">task</a></div>
<h1>index.php</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00002"></a>00002         <span class="comment">/***************************************************************</span>
<a name="l00003"></a>00003 <span class="comment">        *  Copyright notice</span>
<a name="l00004"></a>00004 <span class="comment">        *</span>
<a name="l00005"></a>00005 <span class="comment">        *  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)</span>
<a name="l00006"></a>00006 <span class="comment">        *  All rights reserved</span>
<a name="l00007"></a>00007 <span class="comment">        *</span>
<a name="l00008"></a>00008 <span class="comment">        *  This script is part of the TYPO3 project. The TYPO3 project is</span>
<a name="l00009"></a>00009 <span class="comment">        *  free software; you can redistribute it and/or modify</span>
<a name="l00010"></a>00010 <span class="comment">        *  it under the terms of the GNU General Public License as published by</span>
<a name="l00011"></a>00011 <span class="comment">        *  the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00012"></a>00012 <span class="comment">        *  (at your option) any later version.</span>
<a name="l00013"></a>00013 <span class="comment">        *</span>
<a name="l00014"></a>00014 <span class="comment">        *  The GNU General Public License can be found at</span>
<a name="l00015"></a>00015 <span class="comment">        *  http://www.gnu.org/copyleft/gpl.html.</span>
<a name="l00016"></a>00016 <span class="comment">        *  A copy is found in the textfile GPL.txt and important notices to the license</span>
<a name="l00017"></a>00017 <span class="comment">        *  from the author is found in LICENSE.txt distributed with these scripts.</span>
<a name="l00018"></a>00018 <span class="comment">        *</span>
<a name="l00019"></a>00019 <span class="comment">        *</span>
<a name="l00020"></a>00020 <span class="comment">        *  This script is distributed in the hope that it will be useful,</span>
<a name="l00021"></a>00021 <span class="comment">        *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00022"></a>00022 <span class="comment">        *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00023"></a>00023 <span class="comment">        *  GNU General Public License for more details.</span>
<a name="l00024"></a>00024 <span class="comment">        *</span>
<a name="l00025"></a>00025 <span class="comment">        *  This copyright notice MUST APPEAR in all copies of the script!</span>
<a name="l00026"></a>00026 <span class="comment">        ***************************************************************/</span>
<a name="l00036"></a>00036         unset($MCONF);
<a name="l00037"></a>00037         require ('conf.php');
<a name="l00038"></a>00038         require ($BACK_PATH.'init.php');
<a name="l00039"></a>00039         require ($BACK_PATH.'<span class="keyword">template</span>.php');
<a name="l00040"></a>00040         $LANG-&gt;includeLLFile('EXT:taskcenter/task/locallang.php');
<a name="l00041"></a>00041         require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_scbase.php');
<a name="l00042"></a>00042         require_once('<span class="keyword">class</span>.<a class="code" href="classmod__user__task.html">mod_user_task</a>.php');
<a name="l00043"></a>00043 
<a name="l00044"></a>00044         $BE_USER-&gt;modAccess($MCONF, 1);
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 
<a name="l00047"></a>00047         <span class="comment">// ***************************</span>
<a name="l00048"></a>00048         <span class="comment">// Script Classes</span>
<a name="l00049"></a>00049         <span class="comment">// ***************************</span>
<a name="l00050"></a><a class="code" href="classSC__mod__user__task__index.html">00050</a>         <span class="keyword">class </span><a class="code" href="classSC__mod__user__task__index.html">SC_mod_user_task_index</a> <span class="keyword">extends</span> <a class="code" href="classt3lib__SCbase.html">t3lib_SCbase</a> {
<a name="l00051"></a><a class="code" href="classSC__mod__user__task__index.html#079ce712ca0182fe53a8d3bb2be3031a">00051</a>                 var <a class="code" href="classSC__mod__user__task__index.html#079ce712ca0182fe53a8d3bb2be3031a">$allExtClassConf</a> = array();
<a name="l00052"></a><a class="code" href="classSC__mod__user__task__index.html#190743494b55faef45a02ffea142b12b">00052</a>                 var <a class="code" href="classSC__mod__user__task__index.html#190743494b55faef45a02ffea142b12b">$backPath</a>;
<a name="l00053"></a><a class="code" href="classSC__mod__user__task__index.html#ad71b20524102931c7ad19e48be3e8b3">00053</a>                 var <a class="code" href="classSC__mod__user__task__index.html#ad71b20524102931c7ad19e48be3e8b3">$BE_USER</a>;
<a name="l00054"></a>00054 
<a name="l00061"></a><a class="code" href="classSC__mod__user__task__index.html#f74db4b087e50a1b2cca5975182cf9d1">00061</a>                 function <a class="code" href="classSC__mod__user__task__index.html#f74db4b087e50a1b2cca5975182cf9d1">includeAllClasses</a>() {
<a name="l00062"></a>00062                         foreach($this-&gt;MOD_MENU['function'] as $key =&gt; $name) {
<a name="l00063"></a>00063                                 $curExtClassConf = $this-&gt;<a class="code" href="classt3lib__SCbase.html#482d3d987e457cbf1e4fec04075d4115">getExternalItemConfig</a>($this-&gt;MCONF['name'], 'function', $key);
<a name="l00064"></a>00064                                 <span class="keywordflow">if</span> (is_array($curExtClassConf) &amp;&amp; $curExtClassConf['path']) {
<a name="l00065"></a>00065                                         $this-&gt;allExtClassConf[] = $curExtClassConf;
<a name="l00066"></a>00066                                         $this-&gt;include_once[] = $curExtClassConf['path'];
<a name="l00067"></a>00067                                 }
<a name="l00068"></a>00068                         }
<a name="l00069"></a>00069                 }
<a name="l00070"></a>00070 
<a name="l00076"></a><a class="code" href="classSC__mod__user__task__index.html#9f306b206e4d9d4a8255f07320d6a63b">00076</a>                 function <a class="code" href="classSC__mod__user__task__index.html#9f306b206e4d9d4a8255f07320d6a63b">main</a>() {
<a name="l00077"></a>00077                         global <a class="code" href="classSC__mod__user__task__index.html#ad71b20524102931c7ad19e48be3e8b3">$BE_USER</a>, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 
<a name="l00080"></a>00080                         <span class="comment">/* Setup document template */</span>
<a name="l00081"></a>00081                         $this-&gt;doc = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classnoDoc.html">noDoc</a>');
<a name="l00082"></a>00082                         $this-&gt;doc-&gt;docType = 'xhtml_trans';
<a name="l00083"></a>00083                         $this-&gt;doc-&gt;divClass = '';
<a name="l00084"></a>00084                         $this-&gt;doc-&gt;form = '&lt;form action=<span class="stringliteral">"index.php"</span> method=<span class="stringliteral">"POST"</span> name=<span class="stringliteral">"editform"</span>&gt;';
<a name="l00085"></a>00085                         $this-&gt;<a class="code" href="classSC__mod__user__task__index.html#568982d432ca5fdaa00d0bd0eae10239">backPath</a> = $this-&gt;doc-&gt;backPath = $BACK_PATH;
<a name="l00086"></a>00086                         $this-&gt;doc-&gt;JScode = '  &lt;script <a class="code" href="classlanguage.html">language</a>=<span class="stringliteral">"javascript"</span> type=<span class="stringliteral">"text/javascript"</span>&gt;
<a name="l00087"></a>00087                                 script_ended = 0;
<a name="l00088"></a>00088                                 function jumpToUrl(URL) {
<a name="l00089"></a>00089                                 window.location.href = URL;
<a name="l00090"></a>00090                                 }
<a name="l00091"></a>00091                                 '.(is_object($this-&gt;extObj)?$this-&gt;extObj-&gt;JScode():<span class="stringliteral">""</span>).'
<a name="l00092"></a>00092                                 &lt;/script&gt;
<a name="l00093"></a>00093                                 ';
<a name="l00094"></a>00094                         $this-&gt;doc-&gt;JScode .= $this-&gt;doc-&gt;getDynTabMenuJScode();
<a name="l00095"></a>00095                         $this-&gt;doc-&gt;JScode .= '  &lt;script language=<span class="stringliteral">"javascript"</span> type=<span class="stringliteral">"text/javascript"</span>&gt;
<a name="l00096"></a>00096                         function resizeIframe(frame,max) {
<a name="l00097"></a>00097                         <span class="keywordflow">try</span> {
<a name="l00098"></a>00098                                         innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
<a name="l00099"></a>00099                                                         <span class="keywordflow">if</span>(max==0) {
<a name="l00100"></a>00100                                                 frame.height = innerDoc.body.scrollHeight + 30;
<a name="l00101"></a>00101                                                         } <span class="keywordflow">else</span> {
<a name="l00102"></a>00102                                                 frame.height = Math.max(innerDoc.body.scrollHeight + 30,document.body.scrollHeight);
<a name="l00103"></a>00103                                                         }
<a name="l00104"></a>00104                         }
<a name="l00105"></a>00105                         <span class="keywordflow">catch</span> (e) {
<a name="l00106"></a>00106                         window.status = e.message;
<a name="l00107"></a>00107                         }
<a name="l00108"></a>00108 
<a name="l00109"></a>00109                         }
<a name="l00110"></a>00110  &lt;/script&gt;';
<a name="l00111"></a>00111 
<a name="l00112"></a>00112                         <span class="comment">/* call getMainContent first, because what happens here might affect leftContent */</span>
<a name="l00113"></a>00113                         $mainContent = $this-&gt;<a class="code" href="classSC__mod__user__task__index.html#58c0bb4256f3879f61f98a8d576de88d">getMainContent</a>();
<a name="l00114"></a>00114 
<a name="l00115"></a>00115                         <span class="comment">/* content... */</span>
<a name="l00116"></a>00116                         $this-&gt;content = '';
<a name="l00117"></a>00117                         $this-&gt;content .= $this-&gt;doc-&gt;startPage($this-&gt;MOD_MENU['function'][$this-&gt;MOD_SETTINGS['function']]);
<a name="l00118"></a>00118                         $this-&gt;content .= '&lt;table style=<span class="stringliteral">"width: 98%;"</span>&gt;&lt;tr&gt;';
<a name="l00119"></a>00119                         $this-&gt;content .= '&lt;td valign=<span class="stringliteral">"top"</span> style=<span class="stringliteral">"width: 20%;"</span>&gt;'.$this-&gt;getleftHeader().$this-&gt;getDynTabMenu().'&lt;/td&gt;';
<a name="l00120"></a>00120                         $this-&gt;content .= '&lt;td valign=<span class="stringliteral">"top"</span> style=<span class="stringliteral">"height:100%"</span>&gt;'.$mainContent.'&lt;/td&gt;';
<a name="l00121"></a>00121                         $this-&gt;content .= '&lt;/tr&gt;&lt;/table&gt;';
<a name="l00122"></a>00122                 }
<a name="l00123"></a>00123 
<a name="l00129"></a>00129                 Function getDynTabMenu() {
<a name="l00130"></a>00130                         <span class="comment">//walk through registered submodules and generate configuration</span>
<a name="l00131"></a>00131                         <span class="comment">//for tabmenu</span>
<a name="l00132"></a>00132                         $parts = Array();
<a name="l00133"></a>00133                         foreach($this-&gt;allExtClassConf as $conf) {
<a name="l00134"></a>00134                                 <a class="code" href="classt3lib__SCbase.html#ba2922df813939f549238915f43066d7">$extObj</a> = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>($conf['name']);
<a name="l00135"></a>00135                                 <span class="comment">/* call init to make sure the LOCAL_LANG is included for all listed</span>
<a name="l00136"></a>00136 <span class="comment">                                * extensions. If they OVERRIDE each other there is trouble! */</span>
<a name="l00137"></a>00137                                 <a class="code" href="classt3lib__SCbase.html#ba2922df813939f549238915f43066d7">$extObj</a>-&gt;init($this, $conf);
<a name="l00138"></a><a class="code" href="classSC__mod__user__task__index.html#568982d432ca5fdaa00d0bd0eae10239">00138</a>                                 <a class="code" href="classt3lib__SCbase.html#ba2922df813939f549238915f43066d7">$extObj</a>-&gt;backPath = $this-&gt;<a class="code" href="classSC__mod__user__task__index.html#568982d432ca5fdaa00d0bd0eae10239">backPath</a>;
<a name="l00139"></a>00139                                 <a class="code" href="classt3lib__SCbase.html#ba2922df813939f549238915f43066d7">$extObj</a>-&gt;mod_user_task_init($GLOBALS['BE_USER']);
<a name="l00140"></a><a class="code" href="classSC__mod__user__task__index.html#8c4933386d9d9e3b8941e0705349cc10">00140</a>                                 <a class="code" href="classSC__mod__user__task__index.html#8c4933386d9d9e3b8941e0705349cc10">$part</a> = <a class="code" href="classt3lib__SCbase.html#ba2922df813939f549238915f43066d7">$extObj</a>-&gt;overview_main();
<a name="l00141"></a>00141                                 <span class="keywordflow">if</span> (is_array(<a class="code" href="classSC__mod__user__task__index.html#8c4933386d9d9e3b8941e0705349cc10">$part</a>)) {
<a name="l00142"></a>00142                                         $parts[] = <a class="code" href="classSC__mod__user__task__index.html#8c4933386d9d9e3b8941e0705349cc10">$part</a>;
<a name="l00143"></a>00143                                 }
<a name="l00144"></a>00144                         }
<a name="l00145"></a>00145                         <span class="keywordflow">return</span> $this-&gt;doc-&gt;getDynTabMenu($parts, 'tx_taskcenter', 1, <span class="keyword">true</span>);
<a name="l00146"></a>00146                 }
<a name="l00147"></a>00147 
<a name="l00153"></a><a class="code" href="classSC__mod__user__task__index.html#7449a38406175cab1c97473da4652a6e">00153</a>                 function <a class="code" href="classSC__mod__user__task__index.html#7449a38406175cab1c97473da4652a6e">getleftHeader</a>() {
<a name="l00154"></a>00154                         $name = $GLOBALS['BE_USER']-&gt;user['realName']?$GLOBALS['BE_USER']-&gt;user['realName']:
<a name="l00155"></a>00155                         $GLOBALS['BE_USER']-&gt;user['username'];
<a name="l00156"></a>00156                         <span class="keywordflow">return</span> '&lt;h1&gt;TYPO3 taskcenter &lt;br /&gt;'.$name.'&lt;/h1&gt;';
<a name="l00157"></a>00157 
<a name="l00158"></a>00158                 }
<a name="l00159"></a>00159 
<a name="l00165"></a><a class="code" href="classSC__mod__user__task__index.html#58c0bb4256f3879f61f98a8d576de88d">00165</a>                 function <a class="code" href="classSC__mod__user__task__index.html#58c0bb4256f3879f61f98a8d576de88d">getMainContent</a>() {
<a name="l00166"></a>00166                         <span class="keywordflow">if</span> (is_object($this-&gt;extObj)) {
<a name="l00167"></a>00167                                 $this-&gt;extObj-&gt;backPath = $this-&gt;<a class="code" href="classSC__mod__user__task__index.html#568982d432ca5fdaa00d0bd0eae10239">backPath</a>;
<a name="l00168"></a>00168                                 $this-&gt;extObj-&gt;mod_user_task_init($GLOBALS['BE_USER']);
<a name="l00169"></a>00169                                 <span class="keywordflow">return</span> $this-&gt;extObj-&gt;main();
<a name="l00170"></a>00170                         }
<a name="l00171"></a>00171                 }
<a name="l00172"></a>00172 
<a name="l00178"></a><a class="code" href="classSC__mod__user__task__index.html#aabc44c5cdcd32e72071f6485ca489cd">00178</a>                 function <a class="code" href="classSC__mod__user__task__index.html#aabc44c5cdcd32e72071f6485ca489cd">printContent</a>() {
<a name="l00179"></a>00179                         $this-&gt;content .= $this-&gt;doc-&gt;endPage();
<a name="l00180"></a>00180                         echo $this-&gt;content;
<a name="l00181"></a>00181                 }
<a name="l00182"></a>00182 
<a name="l00183"></a>00183         }
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 
<a name="l00186"></a>00186 
<a name="l00187"></a>00187         <span class="comment">// Include extension?</span>
<a name="l00188"></a>00188         <span class="keywordflow">if</span> (defined('TYPO3_MODE') &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']) {
<a name="l00189"></a>00189                 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/taskcenter/task/index.php']);
<a name="l00190"></a>00190         }
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 
<a name="l00202"></a>00202         <span class="comment">// Make instance:</span>
<a name="l00203"></a>00203         $SOBE = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classSC__mod__user__task__index.html">SC_mod_user_task_index</a>');
<a name="l00204"></a>00204         $SOBE-&gt;init();
<a name="l00205"></a>00205         $SOBE-&gt;includeAllClasses();
<a name="l00206"></a>00206 
<a name="l00207"></a>00207         <span class="comment">// Include files?</span>
<a name="l00208"></a>00208         foreach($SOBE-&gt;include_once as $INC_FILE) include_once($INC_FILE);
<a name="l00209"></a>00209         $SOBE-&gt;checkExtObj(); <span class="comment">// Checking for first level external objects</span>
<a name="l00210"></a>00210 
<a name="l00211"></a>00211         $SOBE-&gt;main();
<a name="l00212"></a>00212         $SOBE-&gt;printContent();
<a name="l00213"></a>00213 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>