<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/alt_doc_nodoc.php Source File",
				"datetime" => "Sat Dec 2 19:22:20 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></div>
<h1>alt_doc_nodoc.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="l00052"></a>00052 require('init.php');
<a name="l00053"></a>00053 require('<span class="keyword">template</span>.php');
<a name="l00054"></a>00054 $LANG-&gt;includeLLFile('EXT:lang/locallang_alt_doc.xml');
<a name="l00055"></a>00055 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_loadmodules.php');
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="keywordflow">if</span> (<a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>('taskcenter') &amp;&amp; <a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>('taskcenter_recent'))        {
<a name="l00059"></a>00059         require_once(<a class="code" href="classt3lib__extMgm.html#f395b211d97293002bbf92c3802392f5">t3lib_extMgm::extPath</a>('taskcenter').'task/<span class="keyword">class</span>.<a class="code" href="classmod__user__task.html">mod_user_task</a>.php');
<a name="l00060"></a>00060         require_once(<a class="code" href="classt3lib__extMgm.html#f395b211d97293002bbf92c3802392f5">t3lib_extMgm::extPath</a>('taskcenter_recent').'<span class="keyword">class</span>.tx_taskcenterrecent.php');
<a name="l00061"></a>00061 }
<a name="l00062"></a>00062 
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 
<a name="l00072"></a><a class="code" href="classSC__alt__doc__nodoc.html">00072</a> <span class="keyword">class </span><a class="code" href="classSC__alt__doc__nodoc.html">SC_alt_doc_nodoc</a> {
<a name="l00073"></a>00073 
<a name="l00074"></a>00074                 <span class="comment">// Internal:</span>
<a name="l00075"></a><a class="code" href="classSC__alt__doc__nodoc.html#03b2d2befb3d95eb5512e58ed5402371">00075</a>         var <a class="code" href="classSC__alt__doc__nodoc.html#03b2d2befb3d95eb5512e58ed5402371">$doc</a>;                       <span class="comment">// Document template object</span>
<a name="l00076"></a><a class="code" href="classSC__alt__doc__nodoc.html#d454df695327448e0190a85caa731091">00076</a>         var <a class="code" href="classSC__alt__doc__nodoc.html#d454df695327448e0190a85caa731091">$content</a>;           <span class="comment">// Content accumulation</span>
<a name="l00077"></a><a class="code" href="classSC__alt__doc__nodoc.html#6825fa4467f1c062095e083762165ceb">00077</a>         var <a class="code" href="classSC__alt__doc__nodoc.html#6825fa4467f1c062095e083762165ceb">$loadModules</a>;       <span class="comment">// Object for backend modules.</span>
<a name="l00078"></a>00078 
<a name="l00084"></a><a class="code" href="classSC__alt__doc__nodoc.html#68396f20a44b02bae436797a5a624c94">00084</a>         function <a class="code" href="classSC__alt__doc__nodoc.html#68396f20a44b02bae436797a5a624c94">init</a>() {
<a name="l00085"></a>00085                 global $BACK_PATH;
<a name="l00086"></a>00086 
<a name="l00087"></a>00087                         <span class="comment">// Start the template object:</span>
<a name="l00088"></a>00088                 $this-&gt;doc = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classmediumDoc.html">mediumDoc</a>');
<a name="l00089"></a>00089                 $this-&gt;doc-&gt;docType = 'xhtml_trans';
<a name="l00090"></a>00090                 $this-&gt;doc-&gt;bodyTagMargins[<span class="charliteral">'x'</span>]=5;
<a name="l00091"></a>00091                 $this-&gt;doc-&gt;bodyTagMargins[<span class="charliteral">'y'</span>]=5;
<a name="l00092"></a>00092                 $this-&gt;doc-&gt;backPath = $BACK_PATH;
<a name="l00093"></a>00093 
<a name="l00094"></a>00094                         <span class="comment">// Start the page:</span>
<a name="l00095"></a>00095                 $this-&gt;content='';
<a name="l00096"></a>00096                 $this-&gt;content.=$this-&gt;doc-&gt;startPage('TYPO3 Edit Document');
<a name="l00097"></a>00097 
<a name="l00098"></a>00098                         <span class="comment">// Loads the backend modules available for the logged in user.</span>
<a name="l00099"></a>00099                 $this-&gt;loadModules = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classt3lib__loadModules.html">t3lib_loadModules</a>');
<a name="l00100"></a>00100                 $this-&gt;loadModules-&gt;load($GLOBALS['TBE_MODULES']);
<a name="l00101"></a>00101         }
<a name="l00102"></a>00102 
<a name="l00108"></a><a class="code" href="classSC__alt__doc__nodoc.html#dd9e3c315e23135d01b3a2d1602ed340">00108</a>         function <a class="code" href="classSC__alt__doc__nodoc.html#dd9e3c315e23135d01b3a2d1602ed340">main</a>() {
<a name="l00109"></a>00109                 global $BE_USER,$LANG,$BACK_PATH;
<a name="l00110"></a>00110 
<a name="l00111"></a>00111                 $msg=array();
<a name="l00112"></a>00112 
<a name="l00113"></a>00113                         <span class="comment">// Add a message, telling that no documents were open...</span>
<a name="l00114"></a>00114                 $msg[]='&lt;p&gt;'.$LANG-&gt;getLL('noDocuments_msg',1).'&lt;/p&gt;&lt;br /&gt;';
<a name="l00115"></a>00115 
<a name="l00116"></a>00116                         <span class="comment">// If another page module was specified, replace the default Page module with the new one</span>
<a name="l00117"></a>00117                 $newPageModule = trim($BE_USER-&gt;getTSConfigVal('options.overridePageModule'));
<a name="l00118"></a>00118                 $pageModule = <a class="code" href="classt3lib__BEfunc.html#7aa45aac5e181ce014288b9f0382675e">t3lib_BEfunc::isModuleSetInTBE_MODULES</a>($newPageModule) ? $newPageModule : 'web_layout';
<a name="l00119"></a>00119 
<a name="l00120"></a>00120                         <span class="comment">// Perform some acccess checks:</span>
<a name="l00121"></a>00121                 $a_wl = $BE_USER-&gt;check('modules<span class="charliteral">','</span>web_list');
<a name="l00122"></a>00122                 $a_wp = <a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>('cms') &amp;&amp; $BE_USER-&gt;check('modules',$pageModule);
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 
<a name="l00125"></a>00125                         <span class="comment">// Finding module images: PAGE</span>
<a name="l00126"></a>00126                 $imgFile = $LANG-&gt;moduleLabels['tabs_images']['web_layout_tab'];
<a name="l00127"></a>00127                 $imgInfo = @getimagesize($imgFile);
<a name="l00128"></a>00128                 $img_web_layout = is_array($imgInfo) ? '&lt;img src=<span class="stringliteral">"../'.substr($imgFile,strlen(PATH_site)).'"</span> '.$imgInfo[3].' alt=<span class="stringliteral">""</span> /&gt;' : '';
<a name="l00129"></a>00129 
<a name="l00130"></a>00130                         <span class="comment">// Finding module images: LIST</span>
<a name="l00131"></a>00131                 $imgFile = $LANG-&gt;moduleLabels['tabs_images']['web_list_tab'];
<a name="l00132"></a>00132                 $imgInfo = @getimagesize($imgFile);
<a name="l00133"></a>00133                 $img_web_list = is_array($imgInfo) ? '&lt;img src=<span class="stringliteral">"../'.substr($imgFile,strlen(PATH_site)).'"</span> '.$imgInfo[3].' alt=<span class="stringliteral">""</span> /&gt;' : '';
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 
<a name="l00136"></a>00136                         <span class="comment">// If either the Web&gt;List OR Web&gt;Page module are active, show the little message with links to those modules:</span>
<a name="l00137"></a>00137                 <span class="keywordflow">if</span> ($a_wl || $a_wp)     {
<a name="l00138"></a>00138                         $msg_2 = array();
<a name="l00139"></a>00139                         <span class="keywordflow">if</span> ($a_wp)      {       <span class="comment">// Web&gt;Page:</span>
<a name="l00140"></a>00140                                 $msg_2[]='&lt;strong&gt;&lt;a href=<span class="stringliteral">"#"</span> onclick=<span class="stringliteral">"top.goToModule(\''.$pageModule.'\'); return false;"</span>&gt;'.$LANG-&gt;getLL('noDocuments_pagemodule',1).$img_web_layout.'&lt;/a&gt;&lt;/strong&gt;';
<a name="l00141"></a>00141                                 <span class="keywordflow">if</span> ($a_wl)      $msg_2[]=$LANG-&gt;getLL('noDocuments_OR');
<a name="l00142"></a>00142                         }
<a name="l00143"></a>00143                         <span class="keywordflow">if</span> ($a_wl)      {       <span class="comment">// Web&gt;List</span>
<a name="l00144"></a>00144                                 $msg_2[]='&lt;strong&gt;&lt;a href=<span class="stringliteral">"#"</span> onclick=<span class="stringliteral">"top.goToModule(\'web_list\'); return false;"</span>&gt;'.$LANG-&gt;getLL('noDocuments_listmodule',1).$img_web_list.'&lt;/a&gt;&lt;/strong&gt;';
<a name="l00145"></a>00145                         }
<a name="l00146"></a>00146                         $msg[]='&lt;p&gt;'.sprintf($LANG-&gt;getLL('noDocuments_msg2',1),implode(<span class="charliteral">' '</span>,$msg_2)).'&lt;/p&gt;&lt;br /&gt;';
<a name="l00147"></a>00147                 }
<a name="l00148"></a>00148 
<a name="l00149"></a>00149                         <span class="comment">// If the task center is loaded and the module of recent documents is, then display the list of the most recently edited documents:</span>
<a name="l00150"></a>00150                 <span class="keywordflow">if</span> ($BE_USER-&gt;check('modules<span class="charliteral">','</span>user_task') &amp;&amp; <a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>('taskcenter_recent'))      {
<a name="l00151"></a>00151                         $modObj = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('tx_taskcenterrecent');
<a name="l00152"></a>00152                         $modObj-&gt;backPath = $BACK_PATH;
<a name="l00153"></a>00153                         $modObj-&gt;BE_USER = $BE_USER;
<a name="l00154"></a>00154                         $modObj-&gt;perms_clause = $BE_USER-&gt;getPagePermsClause(1);
<a name="l00155"></a>00155 
<a name="l00156"></a>00156                         $msg[]='&lt;p&gt;'.$LANG-&gt;getLL('noDocuments_msg3',1).'&lt;/p&gt;&lt;br /&gt;'.$modObj-&gt;_renderRecent();
<a name="l00157"></a>00157                 }
<a name="l00158"></a>00158 
<a name="l00159"></a>00159                         <span class="comment">// Adding the content:</span>
<a name="l00160"></a>00160                 $this-&gt;content.=$this-&gt;doc-&gt;section($LANG-&gt;getLL('noDocuments'),implode(<span class="charliteral">' '</span>,$msg),0,1);
<a name="l00161"></a>00161         }
<a name="l00162"></a>00162 
<a name="l00168"></a><a class="code" href="classSC__alt__doc__nodoc.html#d81b61d33e52c592dde719fc9eb36cc3">00168</a>         function <a class="code" href="classSC__alt__doc__nodoc.html#d81b61d33e52c592dde719fc9eb36cc3">printContent</a>() {
<a name="l00169"></a>00169                 $this-&gt;content.= $this-&gt;doc-&gt;endPage();
<a name="l00170"></a>00170                 $this-&gt;content = $this-&gt;doc-&gt;insertStylesAndJS($this-&gt;content);
<a name="l00171"></a>00171                 echo $this-&gt;content;
<a name="l00172"></a>00172         }
<a name="l00173"></a>00173 }
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 <span class="comment">// Include extension?</span>
<a name="l00176"></a>00176 <span class="keywordflow">if</span> (defined('TYPO3_MODE') &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_doc_nodoc.php']) {
<a name="l00177"></a>00177         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_doc_nodoc.php']);
<a name="l00178"></a>00178 }
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 
<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 
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 <span class="comment">// Make instance:</span>
<a name="l00191"></a>00191 $SOBE = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classSC__alt__doc__nodoc.html">SC_alt_doc_nodoc</a>');
<a name="l00192"></a>00192 $SOBE-&gt;init();
<a name="l00193"></a>00193 $SOBE-&gt;main();
<a name="l00194"></a>00194 $SOBE-&gt;printContent();
<a name="l00195"></a>00195 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>