<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/db_new.php Source File",
				"datetime" => "Sat Dec 2 19:22:21 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>db_new.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="l00067"></a>00067 $BACK_PATH='';
<a name="l00068"></a>00068 require('init.php');
<a name="l00069"></a>00069 require('<span class="keyword">template</span>.php');
<a name="l00070"></a>00070 $LANG-&gt;includeLLFile('EXT:lang/locallang_misc.xml');
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="comment">// ***************************</span>
<a name="l00073"></a>00073 <span class="comment">// Including classes</span>
<a name="l00074"></a>00074 <span class="comment">// ***************************</span>
<a name="l00075"></a>00075 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_page.php');
<a name="l00076"></a>00076 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_positionmap.php');
<a name="l00077"></a>00077 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_pagetree.php');
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 
<a name="l00090"></a>00090 <span class="keyword">class </span><a class="code" href="classlocalPageTree.html">localPageTree</a> <span class="keyword">extends</span> <a class="code" href="classt3lib__pageTree.html">t3lib_pageTree</a> {
<a name="l00091"></a>00091 
<a name="l00099"></a><a class="code" href="classlocalPageTree.html#2aab953ee732c0c91f63999398024f53">00099</a>         function <a class="code" href="classlocalPageTree.html#0153460d158e759bc856f6c7b17f009a">wrapIcon</a>($icon,$row)   {
<a name="l00100"></a>00100                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classt3lib__treeView.html#0b387d1f3456da38e312b249fd2be85d">addTagAttributes</a>($icon,' title=<span class="stringliteral">"id='.htmlspecialchars($row['uid']).'"</span>');
<a name="l00101"></a>00101         }
<a name="l00102"></a>00102 
<a name="l00110"></a><a class="code" href="classlocalPageTree.html#f0eaab49a9a08f960a8416371b2afcd4">00110</a>         function <a class="code" href="classlocalPageTree.html#f0eaab49a9a08f960a8416371b2afcd4">expandNext</a>($id)        {
<a name="l00111"></a>00111                 <span class="keywordflow">return</span> $id==$GLOBALS['SOBE']-&gt;id ? 1 : 0;
<a name="l00112"></a>00112         }
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 
<a name="l00128"></a><a class="code" href="classSC__db__new.html">00128</a> <span class="keyword">class </span><a class="code" href="classSC__db__new.html">SC_db_new</a> {
<a name="l00129"></a><a class="code" href="classSC__db__new.html#e7f51c791143cbe5dd240e97b22a62d7">00129</a>         var <a class="code" href="classSC__db__new.html#e7f51c791143cbe5dd240e97b22a62d7">$pageinfo</a>;
<a name="l00130"></a><a class="code" href="classSC__db__new.html#8c6a1a30cf67be4914b4ba53b022601a">00130</a>         var <a class="code" href="classSC__db__new.html#8c6a1a30cf67be4914b4ba53b022601a">$pidInfo</a>;
<a name="l00131"></a><a class="code" href="classSC__db__new.html#ca422b6d09016f79374ed92403136897">00131</a>         var <a class="code" href="classSC__db__new.html#ca422b6d09016f79374ed92403136897">$newPagesInto</a>;
<a name="l00132"></a><a class="code" href="classSC__db__new.html#f7fd37edd24078085bbcd8c077da525d">00132</a>         var <a class="code" href="classSC__db__new.html#f7fd37edd24078085bbcd8c077da525d">$newContentInto</a>;
<a name="l00133"></a><a class="code" href="classSC__db__new.html#3330fb2520147b897c18b9663d8d955a">00133</a>         var <a class="code" href="classSC__db__new.html#3330fb2520147b897c18b9663d8d955a">$newPagesAfter</a>;
<a name="l00134"></a><a class="code" href="classSC__db__new.html#0a268970b0b62408d5371dc45b47eac9">00134</a>         var <a class="code" href="classSC__db__new.html#0a268970b0b62408d5371dc45b47eac9">$web_list_modTSconfig</a>;
<a name="l00135"></a><a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">00135</a>         var <a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a>;
<a name="l00136"></a><a class="code" href="classSC__db__new.html#2e62e6d2a0da0665cf55524e0e8c1948">00136</a>         var <a class="code" href="classSC__db__new.html#2e62e6d2a0da0665cf55524e0e8c1948">$web_list_modTSconfig_pid</a>;
<a name="l00137"></a><a class="code" href="classSC__db__new.html#98f9a7e2b260824dc56bab9650c26e53">00137</a>         var <a class="code" href="classSC__db__new.html#98f9a7e2b260824dc56bab9650c26e53">$allowedNewTables_pid</a>;
<a name="l00138"></a><a class="code" href="classSC__db__new.html#27386fc0ad7837ca3a7f472af5911de4">00138</a>         var <a class="code" href="classSC__db__new.html#27386fc0ad7837ca3a7f472af5911de4">$code</a>;
<a name="l00139"></a><a class="code" href="classSC__db__new.html#bbb06ac082c6046d94cfc5626d85d8ad">00139</a>         var <a class="code" href="classSC__db__new.html#bbb06ac082c6046d94cfc5626d85d8ad">$R_URI</a>;
<a name="l00140"></a>00140 
<a name="l00141"></a>00141                 <span class="comment">// Internal, static: GPvar</span>
<a name="l00142"></a><a class="code" href="classSC__db__new.html#722b892760c08dba3437c36a94a0e69b">00142</a>         var <a class="code" href="classSC__db__new.html#722b892760c08dba3437c36a94a0e69b">$id</a>;                        <span class="comment">// see init()</span>
<a name="l00143"></a><a class="code" href="classSC__db__new.html#2b4484f3210207db85629e50e91e5026">00143</a>         var <a class="code" href="classSC__db__new.html#2b4484f3210207db85629e50e91e5026">$returnUrl</a>;         <span class="comment">// Return url.</span>
<a name="l00144"></a><a class="code" href="classSC__db__new.html#b4d07d2082161a93f84d67b8ffc25fa0">00144</a>         var <a class="code" href="classSC__db__new.html#b4d07d2082161a93f84d67b8ffc25fa0">$pagesOnly</a>;         <span class="comment">// pagesOnly flag.</span>
<a name="l00145"></a>00145 
<a name="l00146"></a>00146                 <span class="comment">// Internal</span>
<a name="l00147"></a><a class="code" href="classSC__db__new.html#18538568ac6e37c37df379a5e80edf88">00147</a>         var <a class="code" href="classSC__db__new.html#18538568ac6e37c37df379a5e80edf88">$perms_clause</a>;      <span class="comment">// see init()</span>
<a name="l00148"></a><a class="code" href="classSC__db__new.html#42bf27728c3cba1fc3eb8a5996ba5f8e">00148</a>         var <a class="code" href="classSC__db__new.html#42bf27728c3cba1fc3eb8a5996ba5f8e">$doc</a>;                       <span class="comment">// see init()</span>
<a name="l00149"></a><a class="code" href="classSC__db__new.html#2c0cd4147eb2656c2c334821ab769e36">00149</a>         var <a class="code" href="classSC__db__new.html#2c0cd4147eb2656c2c334821ab769e36">$content</a>;           <span class="comment">// Accumulated HTML output</span>
<a name="l00150"></a>00150 
<a name="l00151"></a>00151 
<a name="l00157"></a><a class="code" href="classSC__db__new.html#775b4465c4f0705c2332a41d724340a5">00157</a>         function <a class="code" href="classSC__db__new.html#775b4465c4f0705c2332a41d724340a5">init</a>() {
<a name="l00158"></a>00158                 global $BE_USER,$LANG,$BACK_PATH;
<a name="l00159"></a>00159 
<a name="l00160"></a>00160                         <span class="comment">// page-selection permission clause (reading)</span>
<a name="l00161"></a>00161                 $this-&gt;perms_clause = $BE_USER-&gt;getPagePermsClause(1);
<a name="l00162"></a>00162 
<a name="l00163"></a>00163                         <span class="comment">// this will hide records from display - it has nothing todo with user rights!!</span>
<a name="l00164"></a>00164                 <span class="keywordflow">if</span> ($pidList = $GLOBALS['BE_USER']-&gt;getTSConfigVal('options.hideRecords.pages')) {
<a name="l00165"></a>00165                         <span class="keywordflow">if</span> ($pidList = $GLOBALS['TYPO3_DB']-&gt;cleanIntList($pidList)) {
<a name="l00166"></a>00166                                 $this-&gt;perms_clause .= ' AND pages.uid NOT IN ('.$pidList.<span class="charliteral">')'</span>;
<a name="l00167"></a>00167                         }
<a name="l00168"></a>00168                 }
<a name="l00169"></a>00169                         <span class="comment">// Setting GPvars:</span>
<a name="l00170"></a>00170                 $this-&gt;<span class="keywordtype">id</span> = intval(<a class="code" href="classt3lib__div.html#016d2190758279b2dbb953826c690118">t3lib_div::_GP</a>('<span class="keywordtype">id</span>'));       <span class="comment">// The page id to operate from</span>
<a name="l00171"></a>00171                 $this-&gt;returnUrl = <a class="code" href="classt3lib__div.html#016d2190758279b2dbb953826c690118">t3lib_div::_GP</a>('returnUrl');
<a name="l00172"></a>00172                 $this-&gt;<a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">pagesOnly</a> = <a class="code" href="classt3lib__div.html#016d2190758279b2dbb953826c690118">t3lib_div::_GP</a>('<a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">pagesOnly</a>');
<a name="l00173"></a>00173 
<a name="l00174"></a>00174                         <span class="comment">// Create instance of template class for output</span>
<a name="l00175"></a>00175                 $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="l00176"></a>00176                 $this-&gt;doc-&gt;backPath = $BACK_PATH;
<a name="l00177"></a>00177                 $this-&gt;doc-&gt;docType= 'xhtml_trans';
<a name="l00178"></a>00178                 $this-&gt;doc-&gt;JScode='';
<a name="l00179"></a>00179 
<a name="l00180"></a>00180                         <span class="comment">// Creating content</span>
<a name="l00181"></a>00181                 $this-&gt;content='';
<a name="l00182"></a>00182                 $this-&gt;content.=$this-&gt;doc-&gt;startPage($LANG-&gt;sL('LLL:EXT:lang/locallang_core.php:db_new.php.pagetitle'));
<a name="l00183"></a>00183                 $this-&gt;content.=$this-&gt;doc-&gt;header($LANG-&gt;sL('LLL:EXT:lang/locallang_core.php:db_new.php.pagetitle'));
<a name="l00184"></a>00184 
<a name="l00185"></a>00185                         <span class="comment">// Id a positive id is supplied, ask for the page record with permission information contained:</span>
<a name="l00186"></a>00186                 <span class="keywordflow">if</span> ($this-&gt;<span class="keywordtype">id</span> &gt; 0)      {
<a name="l00187"></a>00187                         $this-&gt;pageinfo = <a class="code" href="classt3lib__BEfunc.html#b99fd2c4e3d5bae861525165091fe5de">t3lib_BEfunc::readPageAccess</a>($this-&gt;<span class="keywordtype">id</span>,$this-&gt;perms_clause);
<a name="l00188"></a>00188                 }
<a name="l00189"></a>00189 
<a name="l00190"></a>00190                         <span class="comment">// If a page-record was returned, the user had read-access to the page.</span>
<a name="l00191"></a>00191                 <span class="keywordflow">if</span> ($this-&gt;pageinfo['uid'])     {
<a name="l00192"></a>00192                                 <span class="comment">// Get record of parent page</span>
<a name="l00193"></a>00193 
<a name="l00194"></a>00194                         $this-&gt;pidInfo=<a class="code" href="classt3lib__BEfunc.html#c0a110679ba0fac9af0d66f34026f378">t3lib_BEfunc::getRecord</a>('pages',$this-&gt;pageinfo['pid']);
<a name="l00195"></a>00195                                 <span class="comment">// Checking the permissions for the user with regard to the parent page: Can he create new pages, new content record, new page after?</span>
<a name="l00196"></a>00196                         <span class="keywordflow">if</span> ($BE_USER-&gt;doesUserHaveAccess($this-&gt;pageinfo,8))    {
<a name="l00197"></a>00197                                 $this-&gt;newPagesInto=1;
<a name="l00198"></a>00198                         }
<a name="l00199"></a>00199                         <span class="keywordflow">if</span> ($BE_USER-&gt;doesUserHaveAccess($this-&gt;pageinfo,16))   {
<a name="l00200"></a>00200                                 $this-&gt;newContentInto=1;
<a name="l00201"></a>00201                         }
<a name="l00202"></a>00202 
<a name="l00203"></a>00203                         <span class="keywordflow">if</span> (($BE_USER-&gt;isAdmin()||is_array($this-&gt;pidInfo)) &amp;&amp; $BE_USER-&gt;doesUserHaveAccess($this-&gt;pidInfo,8))  {
<a name="l00204"></a>00204                                 $this-&gt;newPagesAfter=1;
<a name="l00205"></a>00205                         }
<a name="l00206"></a>00206                 } elseif ($BE_USER-&gt;isAdmin())  {
<a name="l00207"></a>00207                                 <span class="comment">// Admins can do it all</span>
<a name="l00208"></a>00208                         $this-&gt;newPagesInto=1;
<a name="l00209"></a>00209                         $this-&gt;newContentInto=1;
<a name="l00210"></a>00210                         $this-&gt;newPagesAfter=0;
<a name="l00211"></a>00211                 } <span class="keywordflow">else</span> {
<a name="l00212"></a>00212                                 <span class="comment">// People with no permission can do nothing</span>
<a name="l00213"></a>00213                         $this-&gt;newPagesInto=0;
<a name="l00214"></a>00214                         $this-&gt;newContentInto=0;
<a name="l00215"></a>00215                         $this-&gt;newPagesAfter=0;
<a name="l00216"></a>00216                 }
<a name="l00217"></a>00217         }
<a name="l00218"></a>00218 
<a name="l00224"></a><a class="code" href="classSC__db__new.html#d9cfb4f168828e152ba8a564d53684f4">00224</a>         function <a class="code" href="classSC__db__new.html#d9cfb4f168828e152ba8a564d53684f4">main</a>() {
<a name="l00225"></a>00225                 global $BE_USER,$LANG;
<a name="l00226"></a>00226 
<a name="l00227"></a>00227                         <span class="comment">// If there was a page - or if the user is admin (admins has access to the root) we proceed:</span>
<a name="l00228"></a>00228                 <span class="keywordflow">if</span> ($this-&gt;pageinfo['uid'] || $BE_USER-&gt;isAdmin())      {
<a name="l00229"></a>00229                                 <span class="comment">// Acquiring TSconfig for this module/current page:</span>
<a name="l00230"></a>00230                         $this-&gt;web_list_modTSconfig = <a class="code" href="classt3lib__BEfunc.html#3e3f63eb1c3bb4ae0d5ad009dea00cc5">t3lib_BEfunc::getModTSconfig</a>($this-&gt;pageinfo['uid'],'mod.web_list');
<a name="l00231"></a>00231                         $this-&gt;allowedNewTables = <a class="code" href="classt3lib__div.html#cfb87d585b85e9b32841bde40beaa96c">t3lib_div::trimExplode</a>(<span class="charliteral">','</span>,$this-&gt;web_list_modTSconfig['properties']['allowedNewTables'],1);
<a name="l00232"></a>00232 
<a name="l00233"></a>00233                                 <span class="comment">// Acquiring TSconfig for this module/parent page:</span>
<a name="l00234"></a>00234                         $this-&gt;web_list_modTSconfig_pid = <a class="code" href="classt3lib__BEfunc.html#3e3f63eb1c3bb4ae0d5ad009dea00cc5">t3lib_BEfunc::getModTSconfig</a>($this-&gt;pageinfo['pid'],'mod.web_list');
<a name="l00235"></a>00235                         $this-&gt;allowedNewTables_pid = <a class="code" href="classt3lib__div.html#cfb87d585b85e9b32841bde40beaa96c">t3lib_div::trimExplode</a>(<span class="charliteral">','</span>,$this-&gt;web_list_modTSconfig_pid['properties']['allowedNewTables'],1);
<a name="l00236"></a>00236 
<a name="l00237"></a>00237                                 <span class="comment">// More init:</span>
<a name="l00238"></a>00238                         <span class="keywordflow">if</span> (!$this-&gt;<a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>('pages'))    {
<a name="l00239"></a>00239                                 $this-&gt;newPagesInto=0;
<a name="l00240"></a>00240                         }
<a name="l00241"></a>00241                         <span class="keywordflow">if</span> (!$this-&gt;<a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>('pages',$this-&gt;allowedNewTables_pid))        {
<a name="l00242"></a>00242                                 $this-&gt;newPagesAfter=0;
<a name="l00243"></a>00243                         }
<a name="l00244"></a>00244 
<a name="l00245"></a>00245 
<a name="l00246"></a>00246                                 <span class="comment">// Set header-HTML and return_url</span>
<a name="l00247"></a>00247                         $this-&gt;code=$this-&gt;doc-&gt;getHeader('pages',$this-&gt;pageinfo,$this-&gt;pageinfo['_thePath']).'&lt;br /&gt;
<a name="l00248"></a>00248                         ';
<a name="l00249"></a>00249                         $this-&gt;R_URI=$this-&gt;returnUrl;
<a name="l00250"></a>00250 
<a name="l00251"></a>00251                                 <span class="comment">// GENERATE the HTML-output depending on mode (pagesOnly is the page wizard)</span>
<a name="l00252"></a>00252                         <span class="keywordflow">if</span> (!$this-&gt;<a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">pagesOnly</a>)  {       <span class="comment">// Regular new element:</span>
<a name="l00253"></a>00253                                 $this-&gt;<a class="code" href="classSC__db__new.html#7220fe1fc87ea97ff74349718c49e75e">regularNew</a>();
<a name="l00254"></a>00254                         } elseif ($this-&gt;<a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>('pages')) {     <span class="comment">// Pages only wizard</span>
<a name="l00255"></a>00255                                 $this-&gt;<a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">pagesOnly</a>();
<a name="l00256"></a>00256                         }
<a name="l00257"></a>00257 
<a name="l00258"></a>00258                                 <span class="comment">// Create go-back link.</span>
<a name="l00259"></a>00259                         <span class="keywordflow">if</span> ($this-&gt;R_URI)       {
<a name="l00260"></a>00260                                 $this-&gt;code.='&lt;br /&gt;
<a name="l00261"></a>00261                 &lt;a href=<span class="stringliteral">"'.htmlspecialchars($this-&gt;R_URI).'"</span> <span class="keyword">class</span>=<span class="stringliteral">"typo3-goBack"</span>&gt;'.
<a name="l00262"></a>00262                 '&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/goback.gif<span class="charliteral">','</span>width=<span class="stringliteral">"14"</span> height=<span class="stringliteral">"14"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00263"></a>00263                 $LANG-&gt;getLL('goBack',1).
<a name="l00264"></a>00264                 '&lt;/a&gt;';
<a name="l00265"></a>00265                         }
<a name="l00266"></a>00266                                 <span class="comment">// Add all the content to an output section</span>
<a name="l00267"></a>00267                         $this-&gt;content.=$this-&gt;doc-&gt;section('',$this-&gt;code);
<a name="l00268"></a>00268                 }
<a name="l00269"></a>00269         }
<a name="l00270"></a>00270 
<a name="l00276"></a><a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">00276</a>         function <a class="code" href="classSC__db__new.html#044da443f30cf33abbf02c32945b5fd5">pagesOnly</a>()    {
<a name="l00277"></a>00277                 global $LANG;
<a name="l00278"></a>00278 
<a name="l00279"></a>00279                 $posMap = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classt3lib__positionMap.html">t3lib_positionMap</a>');
<a name="l00280"></a>00280                 $this-&gt;code.='
<a name="l00281"></a>00281                         &lt;h3&gt;'.htmlspecialchars($LANG-&gt;getLL('selectPosition')).':&lt;/h3&gt;
<a name="l00282"></a>00282                 ';
<a name="l00283"></a>00283                 $this-&gt;code.= $posMap-&gt;positionTree($this-&gt;<span class="keywordtype">id</span>,$this-&gt;pageinfo,$this-&gt;perms_clause,$this-&gt;R_URI);
<a name="l00284"></a>00284 
<a name="l00285"></a>00285                                 <span class="comment">// Add CSH:</span>
<a name="l00286"></a>00286                 $this-&gt;code.= <a class="code" href="classt3lib__BEfunc.html#a235b246dec429e439742b1fc76c9d97">t3lib_BEfunc::cshItem</a>('xMOD_csh_corebe', 'new_pages', $GLOBALS['BACK_PATH'],'&lt;br/&gt;');
<a name="l00287"></a>00287         }
<a name="l00288"></a>00288 
<a name="l00294"></a><a class="code" href="classSC__db__new.html#7220fe1fc87ea97ff74349718c49e75e">00294</a>         function <a class="code" href="classSC__db__new.html#7220fe1fc87ea97ff74349718c49e75e">regularNew</a>()   {
<a name="l00295"></a>00295                 global $BE_USER,$LANG,$BACK_PATH,$TCA;
<a name="l00296"></a>00296 
<a name="l00297"></a>00297                 $doNotShowFullDescr = FALSE;
<a name="l00298"></a>00298 
<a name="l00299"></a>00299                         <span class="comment">// Slight spacer from header:</span>
<a name="l00300"></a>00300                 $this-&gt;code.='&lt;img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/halfline.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"8"</span>').' alt=<span class="stringliteral">""</span> /&gt;&lt;br /&gt;';
<a name="l00301"></a>00301 
<a name="l00302"></a>00302                         <span class="comment">// Initialize array for accumulating table rows:</span>
<a name="l00303"></a>00303                 $tRows = array();
<a name="l00304"></a>00304 
<a name="l00305"></a>00305                         <span class="comment">// New pages INSIDE this pages</span>
<a name="l00306"></a>00306                 <span class="keywordflow">if</span> ($this-&gt;newPagesInto
<a name="l00307"></a>00307                         &amp;&amp; $this-&gt;<a class="code" href="classSC__db__new.html#bfa74c8b37f874a9e4430d7982c638a0">isTableAllowedForThisPage</a>($this-&gt;pageinfo, 'pages')
<a name="l00308"></a>00308                         &amp;&amp; $BE_USER-&gt;check('tables_modify<span class="charliteral">','</span>pages')
<a name="l00309"></a>00309                         &amp;&amp; $BE_USER-&gt;workspaceCreateNewRecord($this-&gt;pageinfo['_ORIG_uid']?$this-&gt;pageinfo['_ORIG_uid']:$this-&gt;<span class="keywordtype">id</span>, 'pages')
<a name="l00310"></a>00310                         )       {
<a name="l00311"></a>00311 
<a name="l00312"></a>00312                                 <span class="comment">// Create link to new page inside:</span>
<a name="l00313"></a>00313                         $t = 'pages';
<a name="l00314"></a>00314                         $v = $TCA[$t];
<a name="l00315"></a>00315                         $rowContent = '&lt;img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00316"></a>00316                                         $this-&gt;<a class="code" href="classSC__db__new.html#21c82c8c0c8b98fee705dddc095e0a1b">linkWrap</a>(
<a name="l00317"></a>00317                                                 '&lt;img'.<a class="code" href="classt3lib__iconWorks.html#8885a3d8ebbdd02ccd05a708b2c3f53b">t3lib_iconWorks::skinImg</a>($BACK_PATH,'gfx/i/'.($v['ctrl']['iconfile'] ? $v['ctrl']['iconfile'] : $t.'.gif'),'width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00318"></a>00318                                                         $LANG-&gt;sL($v['ctrl']['title'],1).' ('.$LANG-&gt;sL('LLL:EXT:lang/locallang_core.php:db_new.php.inside',1).<span class="charliteral">')'</span>,
<a name="l00319"></a>00319                                                 $t,
<a name="l00320"></a>00320                                                 $this-&gt;id).'&lt;br/&gt;';
<a name="l00321"></a>00321 
<a name="l00322"></a>00322                                 <span class="comment">// Link to page-wizard:</span>
<a name="l00323"></a>00323                         $rowContent.= '&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/ol/line.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/ol/joinbottom.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00324"></a>00324                                 '&lt;a href=<span class="stringliteral">"'.htmlspecialchars(t3lib_div::linkThisScript(array('pagesOnly'=&gt;1))).'"</span>&gt;'.
<a name="l00325"></a>00325                                 '&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/new_page.gif<span class="charliteral">','</span>width=<span class="stringliteral">"13"</span> height=<span class="stringliteral">"12"</span>').' alt=<span class="stringliteral">""</span> /&gt; '.
<a name="l00326"></a>00326                                 htmlspecialchars($LANG-&gt;getLL('clickForWizard')).
<a name="l00327"></a>00327                                 '&lt;/a&gt;';
<a name="l00328"></a>00328                                 <span class="comment">// Half-line:</span>
<a name="l00329"></a>00329                         $rowContent.= '&lt;br /&gt;&lt;img'.t3lib_iconWorks::skinImg('<span class="charliteral">','</span>gfx/ol/halfline.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"8"</span>').' alt=<span class="stringliteral">""</span> /&gt;';
<a name="l00330"></a>00330 
<a name="l00331"></a>00331                                 <span class="comment">// Compile table row:</span>
<a name="l00332"></a>00332                         $tRows[]='
<a name="l00333"></a>00333                                 &lt;tr&gt;
<a name="l00334"></a>00334                                         &lt;td nowrap=<span class="stringliteral">"nowrap"</span>&gt;'.$rowContent.'&lt;/td&gt;
<a name="l00335"></a>00335                                         &lt;td&gt;'.t3lib_BEfunc::cshItem($t,'',$GLOBALS['BACK_PATH'],'',$doNotShowFullDescr).'&lt;/td&gt;
<a name="l00336"></a>00336                                 &lt;/tr&gt;
<a name="l00337"></a>00337                         ';
<a name="l00338"></a>00338                 }
<a name="l00339"></a>00339 
<a name="l00340"></a>00340                         <span class="comment">// New tables (but not pages) INSIDE this pages</span>
<a name="l00341"></a>00341                 <span class="keywordflow">if</span> ($this-&gt;newContentInto)      {
<a name="l00342"></a>00342                         <span class="keywordflow">if</span> (is_array($TCA))     {
<a name="l00343"></a>00343                                 foreach($TCA as $t =&gt; $v)       {
<a name="l00344"></a>00344                                         <span class="keywordflow">if</span> ($t!='pages'
<a name="l00345"></a>00345                                                         &amp;&amp; $this-&gt;<a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>($t)
<a name="l00346"></a>00346                                                         &amp;&amp; $this-&gt;<a class="code" href="classSC__db__new.html#bfa74c8b37f874a9e4430d7982c638a0">isTableAllowedForThisPage</a>($this-&gt;pageinfo, $t)
<a name="l00347"></a>00347                                                         &amp;&amp; $BE_USER-&gt;check('tables_modify',$t)
<a name="l00348"></a>00348                                                         &amp;&amp; (($v['ctrl']['rootLevel'] xor $this-&gt;<span class="keywordtype">id</span>) || $v['ctrl']['rootLevel']==-1)
<a name="l00349"></a>00349                                                         &amp;&amp; $BE_USER-&gt;workspaceCreateNewRecord($this-&gt;pageinfo['_ORIG_uid']?$this-&gt;pageinfo['_ORIG_uid']:$this-&gt;<span class="keywordtype">id</span>, $t)
<a name="l00350"></a>00350                                                         )       {
<a name="l00351"></a>00351 
<a name="l00352"></a>00352                                                         <span class="comment">// Create new link for record:</span>
<a name="l00353"></a>00353                                                 $rowContent = '&lt;img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00354"></a>00354                                                                 $this-&gt;<a class="code" href="classSC__db__new.html#21c82c8c0c8b98fee705dddc095e0a1b">linkWrap</a>(
<a name="l00355"></a>00355                                                                 <a class="code" href="classt3lib__iconWorks.html#09ccf5c505e700d523bd9c71a43d0fb4">t3lib_iconWorks::getIconImage</a>($t,array(),$BACK_PATH,'').
<a name="l00356"></a>00356                                                                 $LANG-&gt;sL($v['ctrl']['title'],1)
<a name="l00357"></a>00357                                                         ,$t
<a name="l00358"></a>00358                                                         ,$this-&gt;<span class="keywordtype">id</span>);
<a name="l00359"></a>00359 
<a name="l00360"></a>00360                                                         <span class="comment">// If the table is 'tt_content' (from "cms" extension), create link to wizard</span>
<a name="l00361"></a>00361                                                 <span class="keywordflow">if</span> ($t=='tt_content')   {
<a name="l00362"></a>00362 
<a name="l00363"></a>00363                                                                 <span class="comment">// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's wizard instead:</span>
<a name="l00364"></a>00364                                                         $overrideExt = $this-&gt;web_list_modTSconfig['properties']['newContentWiz.']['overrideWithExtension'];
<a name="l00365"></a>00365                                                         $pathToWizard = (<a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>($overrideExt)) ? (<a class="code" href="classt3lib__extMgm.html#e058d5ce8038f7cf52a6726018dce8d7">t3lib_extMgm::extRelPath</a>($overrideExt).'mod1/db_new_content_el.php') : 'sysext/cms/layout/db_new_content_el.php';
<a name="l00366"></a>00366 
<a name="l00367"></a>00367                                                         $href = $pathToWizard.'?<span class="keywordtype">id</span>='.$this-&gt;id.'&amp;returnUrl='.rawurlencode($this-&gt;R_URI);
<a name="l00368"></a>00368                                                         $rowContent.= '&lt;br /&gt;&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/ol/line.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00369"></a>00369                                                                                 '&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/ol/joinbottom.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00370"></a>00370                                                                                 '&lt;a href=<span class="stringliteral">"'.htmlspecialchars($href).'"</span>&gt;&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/new_record.gif<span class="charliteral">','</span>width=<span class="stringliteral">"16"</span> height=<span class="stringliteral">"12"</span>').' alt=<span class="stringliteral">""</span> /&gt; '.
<a name="l00371"></a>00371                                                                                 htmlspecialchars($LANG-&gt;getLL('clickForWizard')).
<a name="l00372"></a>00372                                                                                 '&lt;/a&gt;';
<a name="l00373"></a>00373 
<a name="l00374"></a>00374                                                                 <span class="comment">// Half-line added:</span>
<a name="l00375"></a>00375                                                         $rowContent.= '&lt;br /&gt;&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/ol/halfline.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"8"</span>').' alt=<span class="stringliteral">""</span> /&gt;';
<a name="l00376"></a>00376                                                 }
<a name="l00377"></a>00377 
<a name="l00378"></a>00378 
<a name="l00379"></a>00379                                                         <span class="comment">// Compile table row:</span>
<a name="l00380"></a>00380                                                 $tRows[] = '
<a name="l00381"></a>00381                                 &lt;tr&gt;
<a name="l00382"></a>00382                                         &lt;td nowrap=<span class="stringliteral">"nowrap"</span>&gt;'.$rowContent.'&lt;/td&gt;
<a name="l00383"></a>00383                                         &lt;td&gt;'.t3lib_BEfunc::cshItem($t,'',$GLOBALS['BACK_PATH'],'',$doNotShowFullDescr).'&lt;/td&gt;
<a name="l00384"></a>00384                                 &lt;/tr&gt;
<a name="l00385"></a>00385                         ';
<a name="l00386"></a>00386 
<a name="l00387"></a>00387                                         }
<a name="l00388"></a>00388                                 }
<a name="l00389"></a>00389                         }
<a name="l00390"></a>00390                 }
<a name="l00391"></a>00391 
<a name="l00392"></a>00392                         <span class="comment">// New pages AFTER this pages</span>
<a name="l00393"></a>00393                 <span class="keywordflow">if</span> ($this-&gt;newPagesAfter
<a name="l00394"></a>00394                         &amp;&amp; $this-&gt;<a class="code" href="classSC__db__new.html#bfa74c8b37f874a9e4430d7982c638a0">isTableAllowedForThisPage</a>($this-&gt;pidInfo,'pages')
<a name="l00395"></a>00395                         &amp;&amp; $BE_USER-&gt;check('tables_modify<span class="charliteral">','</span>pages')
<a name="l00396"></a>00396                         &amp;&amp; $BE_USER-&gt;workspaceCreateNewRecord($this-&gt;pidInfo['uid'], 'pages')
<a name="l00397"></a>00397                         )       {
<a name="l00398"></a>00398 
<a name="l00399"></a>00399                                 <span class="comment">// Create link to new page after</span>
<a name="l00400"></a>00400                         $t = 'pages';
<a name="l00401"></a>00401                         $v = $TCA[$t];
<a name="l00402"></a>00402                         $rowContent = $this-&gt;<a class="code" href="classSC__db__new.html#21c82c8c0c8b98fee705dddc095e0a1b">linkWrap</a>(
<a name="l00403"></a>00403                                         <a class="code" href="classt3lib__iconWorks.html#09ccf5c505e700d523bd9c71a43d0fb4">t3lib_iconWorks::getIconImage</a>($t,array(),$BACK_PATH,'').
<a name="l00404"></a>00404                                                 $LANG-&gt;sL($v['ctrl']['title'],1).' ('.$LANG-&gt;sL('LLL:EXT:lang/locallang_core.php:db_new.php.after',1).<span class="charliteral">')'</span>,
<a name="l00405"></a>00405                                         'pages',
<a name="l00406"></a>00406                                         -$this-&gt;id
<a name="l00407"></a>00407                                 );
<a name="l00408"></a>00408 
<a name="l00409"></a>00409                                 <span class="comment">// Compile table row:</span>
<a name="l00410"></a>00410                         $tRows[] = '
<a name="l00411"></a>00411                                 &lt;tr&gt;
<a name="l00412"></a>00412                                         &lt;td nowrap=<span class="stringliteral">"nowrap"</span>&gt;'.$rowContent.'&lt;/td&gt;
<a name="l00413"></a>00413                                         &lt;td&gt;'.t3lib_BEfunc::cshItem($t,'',$GLOBALS['BACK_PATH'],'',$doNotShowFullDescr).'&lt;/td&gt;
<a name="l00414"></a>00414                                 &lt;/tr&gt;
<a name="l00415"></a>00415                         ';
<a name="l00416"></a>00416                 } <span class="keywordflow">else</span> {
<a name="l00417"></a>00417                                 <span class="comment">// Compile table row:</span>
<a name="l00418"></a>00418                         $tRows[]='
<a name="l00419"></a>00419                                 &lt;tr&gt;
<a name="l00420"></a>00420                                         &lt;td&gt;&lt;img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/stopper.gif<span class="charliteral">','</span>width=<span class="stringliteral">"18"</span> height=<span class="stringliteral">"16"</span>').' alt=<span class="stringliteral">""</span> /&gt;&lt;/td&gt;
<a name="l00421"></a>00421                                         &lt;td&gt;&lt;/td&gt;
<a name="l00422"></a>00422                                 &lt;/tr&gt;
<a name="l00423"></a>00423                         ';
<a name="l00424"></a>00424                 }
<a name="l00425"></a>00425 
<a name="l00426"></a>00426                         <span class="comment">// Make table:</span>
<a name="l00427"></a>00427                 $this-&gt;code.='
<a name="l00428"></a>00428                         &lt;table border=<span class="stringliteral">"0"</span> cellpadding=<span class="stringliteral">"0"</span> cellspacing=<span class="stringliteral">"0"</span> <span class="keywordtype">id</span>=<span class="stringliteral">"typo3-newRecord"</span>&gt;
<a name="l00429"></a>00429                         '.implode('',$tRows).'
<a name="l00430"></a>00430                         &lt;/table&gt;
<a name="l00431"></a>00431                 ';
<a name="l00432"></a>00432 
<a name="l00433"></a>00433                         <span class="comment">// Create a link to the new-pages wizard.</span>
<a name="l00434"></a>00434                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>('pages'))     {
<a name="l00435"></a>00435                         $this-&gt;code.='
<a name="l00436"></a>00436 
<a name="l00437"></a>00437                                 &lt;!--
<a name="l00438"></a>00438                                         Link; create <span class="keyword">new</span> page:
<a name="l00439"></a>00439                                 --&gt;
<a name="l00440"></a>00440                                 &lt;div <span class="keywordtype">id</span>=<span class="stringliteral">"typo3-newPageLink"</span>&gt;
<a name="l00441"></a>00441                                         &lt;a href=<span class="stringliteral">"'.htmlspecialchars(t3lib_div::linkThisScript(array('pagesOnly'=&gt;'1'))).'"</span>&gt;'.
<a name="l00442"></a>00442                                         '&lt;img'.t3lib_iconWorks::skinImg($this-&gt;doc-&gt;backPath,'gfx/new_page.gif<span class="charliteral">','</span>width=<span class="stringliteral">"13"</span> height=<span class="stringliteral">"12"</span>').' alt=<span class="stringliteral">""</span> /&gt;'.
<a name="l00443"></a>00443                                         htmlspecialchars($LANG-&gt;getLL('createNewPage')).
<a name="l00444"></a>00444                                         '&lt;/a&gt;
<a name="l00445"></a>00445                                 &lt;/div&gt;
<a name="l00446"></a>00446                                 ';
<a name="l00447"></a>00447                 }
<a name="l00448"></a>00448 
<a name="l00449"></a>00449                         <span class="comment">// Add CSH:</span>
<a name="l00450"></a>00450                 $this-&gt;code.= <a class="code" href="classt3lib__BEfunc.html#a235b246dec429e439742b1fc76c9d97">t3lib_BEfunc::cshItem</a>('xMOD_csh_corebe', 'new_regular', $GLOBALS['BACK_PATH'],'&lt;br/&gt;');
<a name="l00451"></a>00451         }
<a name="l00452"></a>00452 
<a name="l00458"></a><a class="code" href="classSC__db__new.html#c8aaa02f8decd824f9a62fde8d4cb3e4">00458</a>         function <a class="code" href="classSC__db__new.html#c8aaa02f8decd824f9a62fde8d4cb3e4">printContent</a>() {
<a name="l00459"></a>00459                 $this-&gt;content.= $this-&gt;doc-&gt;endPage();
<a name="l00460"></a>00460                 $this-&gt;content = $this-&gt;doc-&gt;insertStylesAndJS($this-&gt;content);
<a name="l00461"></a>00461                 echo $this-&gt;content;
<a name="l00462"></a>00462         }
<a name="l00463"></a>00463 
<a name="l00473"></a><a class="code" href="classSC__db__new.html#21c82c8c0c8b98fee705dddc095e0a1b">00473</a>         function <a class="code" href="classSC__db__new.html#21c82c8c0c8b98fee705dddc095e0a1b">linkWrap</a>(<a class="code" href="classSC__db__new.html#27386fc0ad7837ca3a7f472af5911de4">$code</a>,$table,$pid,$addContentTable=0) {
<a name="l00474"></a>00474                 $params = '&amp;edit['.$table.']['.$pid.']=<span class="keyword">new</span>'.
<a name="l00475"></a>00475                         ($table=='pages'
<a name="l00476"></a>00476                                 &amp;&amp; $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']
<a name="l00477"></a>00477                                 &amp;&amp; isset($GLOBALS['TCA'][$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']])
<a name="l00478"></a>00478                                 &amp;&amp; $addContentTable     ?
<a name="l00479"></a>00479                                 '&amp;edit['.$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'].'][prev]=<span class="keyword">new</span>&amp;returnNewPageId=1'     :
<a name="l00480"></a>00480                                 ''
<a name="l00481"></a>00481                         );
<a name="l00482"></a>00482                 $onClick = <a class="code" href="classt3lib__BEfunc.html#7a0f36e11e40ce7b2b808fe06d7d1f92">t3lib_BEfunc::editOnClick</a>($params,'',$this-&gt;returnUrl);
<a name="l00483"></a>00483                 <span class="keywordflow">return</span> '&lt;a href=<span class="stringliteral">"#"</span> onclick=<span class="stringliteral">"'.htmlspecialchars($onClick).'"</span>&gt;'.$code.'&lt;/a&gt;';
<a name="l00484"></a>00484         }
<a name="l00485"></a>00485 
<a name="l00493"></a><a class="code" href="classSC__db__new.html#bfa74c8b37f874a9e4430d7982c638a0">00493</a>         function <a class="code" href="classSC__db__new.html#bfa74c8b37f874a9e4430d7982c638a0">isTableAllowedForThisPage</a>($pid_row, $checkTable)       {
<a name="l00494"></a>00494                 global $TCA, $PAGES_TYPES;
<a name="l00495"></a>00495                 <span class="keywordflow">if</span> (!is_array($pid_row))        {
<a name="l00496"></a>00496                         <span class="keywordflow">if</span> ($GLOBALS['BE_USER']-&gt;user['admin']) {
<a name="l00497"></a>00497                                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00498"></a>00498                         } <span class="keywordflow">else</span> {
<a name="l00499"></a>00499                                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00500"></a>00500                         }
<a name="l00501"></a>00501                 }
<a name="l00502"></a>00502                         <span class="comment">// be_users and be_groups may not be created anywhere but in the root.</span>
<a name="l00503"></a>00503                 <span class="keywordflow">if</span> ($checkTable=='be_users' || $checkTable=='be_groups')        {
<a name="l00504"></a>00504                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00505"></a>00505                 }
<a name="l00506"></a>00506                         <span class="comment">// Checking doktype:</span>
<a name="l00507"></a>00507                 $doktype = intval($pid_row['doktype']);
<a name="l00508"></a>00508                 <span class="keywordflow">if</span> (!$allowedTableList = $PAGES_TYPES[$doktype]['allowedTables'])       {
<a name="l00509"></a>00509                         $allowedTableList = $PAGES_TYPES['<span class="keywordflow">default</span>']['allowedTables'];
<a name="l00510"></a>00510                 }
<a name="l00511"></a>00511                 <span class="keywordflow">if</span> (strstr($allowedTableList,<span class="charliteral">'*'</span>) || <a class="code" href="classt3lib__div.html#d994a5608365c288d051d6022d4e9976">t3lib_div::inList</a>($allowedTableList,$checkTable))  {               <span class="comment">// If all tables or the table is listed as a allowed type, return true</span>
<a name="l00512"></a>00512                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00513"></a>00513                 }
<a name="l00514"></a>00514         }
<a name="l00515"></a>00515 
<a name="l00523"></a><a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">00523</a>         function <a class="code" href="classSC__db__new.html#84e09b861aa893c5921abe94e2afeccc">showNewRecLink</a>($table,<a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a>='')    {
<a name="l00524"></a>00524                 <a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a> = is_array(<a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a>) ? <a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a> : $this-&gt;allowedNewTables;
<a name="l00525"></a>00525                 <span class="keywordflow">return</span> !count(<a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a>) || in_array($table,<a class="code" href="classSC__db__new.html#df38b7a142ebefb8d56302c44bacd9ad">$allowedNewTables</a>);
<a name="l00526"></a>00526         }
<a name="l00527"></a>00527 }
<a name="l00528"></a>00528 
<a name="l00529"></a>00529 <span class="comment">// Include extension?</span>
<a name="l00530"></a>00530 <span class="keywordflow">if</span> (defined('TYPO3_MODE') &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/db_new.php'])        {
<a name="l00531"></a>00531         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/db_new.php']);
<a name="l00532"></a>00532 }
<a name="l00533"></a>00533 
<a name="l00534"></a>00534 
<a name="l00535"></a>00535 
<a name="l00536"></a>00536 
<a name="l00537"></a>00537 
<a name="l00538"></a>00538 <span class="comment">// Make instance:</span>
<a name="l00539"></a>00539 $SOBE = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classSC__db__new.html">SC_db_new</a>');
<a name="l00540"></a>00540 $SOBE-&gt;init();
<a name="l00541"></a>00541 $SOBE-&gt;main();
<a name="l00542"></a>00542 $SOBE-&gt;printContent();
<a name="l00543"></a>00543 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>