<?php
  include_once '../doc-typo3-funcs.php';
  $doxygen_vars = array(	"title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/indexed_search/mod/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_1144f7dd65e866e7cd4aa66020137172.html">indexed_search</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_bfc10c0c41ae5a57a4e59ecfd930f193.html">mod</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="l00065"></a>00065 unset($MCONF);
<a name="l00066"></a>00066 require (<span class="stringliteral">"conf.php"</span>);
<a name="l00067"></a>00067 require ($BACK_PATH.<span class="stringliteral">"init.php"</span>);
<a name="l00068"></a>00068 require ($BACK_PATH.<span class="stringliteral">"template.php"</span>);
<a name="l00069"></a>00069 $BE_USER-&gt;modAccess($MCONF,1);
<a name="l00070"></a>00070 
<a name="l00071"></a>00071 <a class="code" href="classt3lib__extMgm.html#297116a3b1e17045ff193f170b8c4a29">t3lib_extMgm::isLoaded</a>(<span class="stringliteral">"indexed_search"</span>,1);
<a name="l00072"></a>00072 require_once(<a class="code" href="classt3lib__extMgm.html#f395b211d97293002bbf92c3802392f5">t3lib_extMgm::extPath</a>('indexed_search').'<span class="keyword">class</span>.indexer.php');
<a name="l00073"></a>00073 
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 
<a name="l00083"></a><a class="code" href="classSC__mod__tools__isearch__index.html">00083</a> <span class="keyword">class </span><a class="code" href="classSC__mod__tools__isearch__index.html">SC_mod_tools_isearch_index</a> {
<a name="l00084"></a><a class="code" href="classSC__mod__tools__isearch__index.html#ceeda00973fe53b966b50c52ff01d54c">00084</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#ceeda00973fe53b966b50c52ff01d54c">$MCONF</a>=array();
<a name="l00085"></a><a class="code" href="classSC__mod__tools__isearch__index.html#c270fee4c2bda721b7e8f2af9e5473c6">00085</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#c270fee4c2bda721b7e8f2af9e5473c6">$MOD_MENU</a>=array();
<a name="l00086"></a><a class="code" href="classSC__mod__tools__isearch__index.html#4d34802449fe4d57c970a009c507b127">00086</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#4d34802449fe4d57c970a009c507b127">$MOD_SETTINGS</a>=array();
<a name="l00087"></a><a class="code" href="classSC__mod__tools__isearch__index.html#f26a2471c8cf605907795c65cb50271e">00087</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#f26a2471c8cf605907795c65cb50271e">$doc</a>;
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="classSC__mod__tools__isearch__index.html#0eb30d34c6bb4a124f177ca13abe8695">00089</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#0eb30d34c6bb4a124f177ca13abe8695">$include_once</a>=array();
<a name="l00090"></a><a class="code" href="classSC__mod__tools__isearch__index.html#9d4399079fceaedeee4be1fdb03f0f42">00090</a>         var <a class="code" href="classSC__mod__tools__isearch__index.html#9d4399079fceaedeee4be1fdb03f0f42">$content</a>;
<a name="l00091"></a>00091 
<a name="l00097"></a><a class="code" href="classSC__mod__tools__isearch__index.html#bb16787f9cd167dbbca6fbb5f28ff513">00097</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#bb16787f9cd167dbbca6fbb5f28ff513">init</a>() {
<a name="l00098"></a>00098                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
<a name="l00099"></a>00099                 $this-&gt;MCONF = $GLOBALS[<span class="stringliteral">"MCONF"</span>];
<a name="l00100"></a>00100 
<a name="l00101"></a>00101                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#0b9d6e22bb8178dc98baa01fe7df3940">menuConfig</a>();
<a name="l00102"></a>00102 
<a name="l00103"></a>00103                 $this-&gt;doc = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>(<span class="stringliteral">"noDoc"</span>);
<a name="l00104"></a>00104                 $this-&gt;doc-&gt;form='&lt;form action=<span class="stringliteral">""</span> method=<span class="stringliteral">"POST"</span>&gt;';
<a name="l00105"></a>00105                 $this-&gt;doc-&gt;backPath = $BACK_PATH;
<a name="l00106"></a>00106                                 <span class="comment">// JavaScript</span>
<a name="l00107"></a>00107                 $this-&gt;doc-&gt;JScode = '
<a name="l00108"></a>00108                 &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="l00109"></a>00109                         script_ended = 0;
<a name="l00110"></a>00110                         function jumpToUrl(URL) {
<a name="l00111"></a>00111                                 window.location.href = URL;
<a name="l00112"></a>00112                         }
<a name="l00113"></a>00113                 &lt;/script&gt;
<a name="l00114"></a>00114                 ';
<a name="l00115"></a>00115                 $this-&gt;doc-&gt;tableLayout = Array (
<a name="l00116"></a>00116                         <span class="stringliteral">"defRow"</span> =&gt; Array (
<a name="l00117"></a>00117                                 <span class="stringliteral">"0"</span> =&gt; Array('&lt;td valign=<span class="stringliteral">"top"</span> nowrap&gt;<span class="charliteral">','</span>&lt;/td&gt;'),
<a name="l00118"></a>00118                                 <span class="stringliteral">"defCol"</span> =&gt; Array('&lt;TD&gt;&lt;img src=<span class="stringliteral">"'.$this-&gt;doc-&gt;backPath.'clear.gif"</span> width=10 height=1&gt;&lt;/td&gt;&lt;td valign=<span class="stringliteral">"top"</span> nowrap&gt;<span class="charliteral">','</span>&lt;/td&gt;')
<a name="l00119"></a>00119                         )
<a name="l00120"></a>00120                 );
<a name="l00121"></a>00121 
<a name="l00122"></a>00122                 $indexer = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classtx__indexedsearch__indexer.html">tx_indexedsearch_indexer</a>');
<a name="l00123"></a>00123                 $indexer-&gt;initializeExternalParsers();
<a name="l00124"></a>00124 <span class="preprocessor">                #debug(array_keys($indexer-&gt;external_parsers));</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">                #debug($indexer-&gt;internal_log);</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>        }
<a name="l00127"></a>00127 
<a name="l00133"></a><a class="code" href="classSC__mod__tools__isearch__index.html#0b9d6e22bb8178dc98baa01fe7df3940">00133</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#0b9d6e22bb8178dc98baa01fe7df3940">menuConfig</a>()   {
<a name="l00134"></a>00134                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
<a name="l00135"></a>00135 
<a name="l00136"></a>00136                 <span class="comment">// MENU-ITEMS:</span>
<a name="l00137"></a>00137                         <span class="comment">// If array, then it's a selector box menu</span>
<a name="l00138"></a>00138                         <span class="comment">// If empty string it's just a variable, that'll be saved.</span>
<a name="l00139"></a>00139                         <span class="comment">// Values NOT in this array will not be saved in the settings-array for the module.</span>
<a name="l00140"></a>00140                 $this-&gt;MOD_MENU = array(
<a name="l00141"></a>00141                         <span class="stringliteral">"function"</span> =&gt; array(
<a name="l00142"></a>00142                                 <span class="stringliteral">"stat"</span> =&gt; <span class="stringliteral">"General statistics"</span>,
<a name="l00143"></a>00143                                 <span class="stringliteral">"typo3pages"</span> =&gt; <span class="stringliteral">"List: TYPO3 Pages"</span>,
<a name="l00144"></a>00144                                 <span class="stringliteral">"externalDocs"</span> =&gt; <span class="stringliteral">"List: External documents"</span>,
<a name="l00145"></a>00145                         )
<a name="l00146"></a>00146                 );
<a name="l00147"></a>00147                         <span class="comment">// CLEANSE SETTINGS</span>
<a name="l00148"></a>00148                 $this-&gt;MOD_SETTINGS = <a class="code" href="classt3lib__BEfunc.html#d5b55158accbc63f6bb71de27e03f708">t3lib_BEfunc::getModuleData</a>($this-&gt;MOD_MENU, <a class="code" href="classt3lib__div.html#016d2190758279b2dbb953826c690118">t3lib_div::_GP</a>(<span class="stringliteral">"SET"</span>), $this-&gt;MCONF[<span class="stringliteral">"name"</span>], <span class="stringliteral">"ses"</span>);
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150 
<a name="l00156"></a><a class="code" href="classSC__mod__tools__isearch__index.html#9d3b346ac58f73af408c91c5a124def6">00156</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#9d3b346ac58f73af408c91c5a124def6">main</a>() {
<a name="l00157"></a>00157                 global $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159                 $this-&gt;content=<span class="stringliteral">""</span>;
<a name="l00160"></a>00160                 $this-&gt;content.=$this-&gt;doc-&gt;startPage(<span class="stringliteral">"Indexing Engine Statistics"</span>);
<a name="l00161"></a>00161 
<a name="l00162"></a>00162                 $menu=<a class="code" href="classt3lib__BEfunc.html#832c7b3d00fe067d463cb12ce1a77091">t3lib_BEfunc::getFuncMenu</a>(0,<span class="stringliteral">"SET[function]"</span>,$this-&gt;MOD_SETTINGS[<span class="stringliteral">"function"</span>],$this-&gt;MOD_MENU[<span class="stringliteral">"function"</span>]);
<a name="l00163"></a>00163 
<a name="l00164"></a>00164                 $this-&gt;content.=$this-&gt;doc-&gt;header(<span class="stringliteral">"Indexing Engine Statistics"</span>);
<a name="l00165"></a>00165                 $this-&gt;content.=$this-&gt;doc-&gt;spacer(5);
<a name="l00166"></a>00166                 $this-&gt;content.=$this-&gt;doc-&gt;section('',$menu);
<a name="l00167"></a>00167 
<a name="l00168"></a>00168                 <span class="keywordflow">switch</span>($this-&gt;MOD_SETTINGS[<span class="stringliteral">"function"</span>]) {
<a name="l00169"></a>00169                         <span class="keywordflow">case</span> <span class="stringliteral">"stat"</span>:
<a name="l00170"></a>00170                                 $this-&gt;content.=$this-&gt;doc-&gt;section('Records',$this-&gt;doc-&gt;table($this-&gt;getRecordsNumbers()),0,1);
<a name="l00171"></a>00171                                 $this-&gt;content.=$this-&gt;doc-&gt;spacer(15);
<a name="l00172"></a>00172                 <span class="comment">//              $this-&gt;content.=$this-&gt;doc-&gt;section('index_phash STATISTICS',$this-&gt;doc-&gt;table($this-&gt;getPhashStat()),1);</span>
<a name="l00173"></a>00173                 <span class="comment">//              $this-&gt;content.=$this-&gt;doc-&gt;spacer(15);</span>
<a name="l00174"></a>00174                                 $this-&gt;content.=$this-&gt;doc-&gt;section('index_phash TYPES',$this-&gt;doc-&gt;table($this-&gt;getPhashTypes()),1);
<a name="l00175"></a>00175                                 $this-&gt;content.=$this-&gt;doc-&gt;spacer(15);
<a name="l00176"></a>00176                         <span class="keywordflow">break</span>;
<a name="l00177"></a>00177                         <span class="keywordflow">case</span> <span class="stringliteral">"externalDocs"</span>:
<a name="l00178"></a>00178                                 $this-&gt;content.=$this-&gt;doc-&gt;section('External documents',$this-&gt;doc-&gt;table($this-&gt;getPhashExternalDocs()),0,1);
<a name="l00179"></a>00179                                 $this-&gt;content.=$this-&gt;doc-&gt;spacer(15);
<a name="l00180"></a>00180                         <span class="keywordflow">break</span>;
<a name="l00181"></a>00181                         <span class="keywordflow">case</span> <span class="stringliteral">"typo3pages"</span>:
<a name="l00182"></a>00182                                 $this-&gt;content.=$this-&gt;doc-&gt;section('TYPO3 Pages',$this-&gt;doc-&gt;table($this-&gt;getPhashT3pages()),0,1);
<a name="l00183"></a>00183                                 $this-&gt;content.=$this-&gt;doc-&gt;spacer(15);
<a name="l00184"></a>00184                         <span class="keywordflow">break</span>;
<a name="l00185"></a>00185                 }
<a name="l00186"></a>00186         }
<a name="l00187"></a>00187 
<a name="l00193"></a><a class="code" href="classSC__mod__tools__isearch__index.html#9d59f7babf7eb37f61cafdef2eef24fd">00193</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#9d59f7babf7eb37f61cafdef2eef24fd">printContent</a>() {
<a name="l00194"></a>00194                 $this-&gt;content.=$this-&gt;doc-&gt;endPage();
<a name="l00195"></a>00195                 echo $this-&gt;content;
<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 
<a name="l00203"></a>00203 
<a name="l00204"></a>00204 
<a name="l00205"></a>00205 
<a name="l00206"></a>00206 
<a name="l00207"></a>00207         <span class="comment">/***************************</span>
<a name="l00208"></a>00208 <span class="comment">         *</span>
<a name="l00209"></a>00209 <span class="comment">         * OTHER FUNCTIONS:</span>
<a name="l00210"></a>00210 <span class="comment">         *</span>
<a name="l00211"></a>00211 <span class="comment">         ***************************/</span>
<a name="l00212"></a>00212 
<a name="l00216"></a><a class="code" href="classSC__mod__tools__isearch__index.html#1761794800f45171d6bc56bfa975419c">00216</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#1761794800f45171d6bc56bfa975419c">getRecordsNumbers</a>()    {
<a name="l00217"></a>00217                 $tables=explode(<span class="stringliteral">","</span>,<span class="stringliteral">"index_phash,index_words,index_rel,index_grlist,index_section,index_fulltext"</span>);
<a name="l00218"></a>00218                 $recList=array();
<a name="l00219"></a>00219                 reset($tables);
<a name="l00220"></a>00220                 <span class="keywordflow">while</span>(list(,$t)=each($tables))  {
<a name="l00221"></a>00221                         $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', $t, '');
<a name="l00222"></a>00222                         $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00223"></a>00223                         $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>($t), $row[0]);
<a name="l00224"></a>00224                 }
<a name="l00225"></a>00225                 <span class="keywordflow">return</span> $recList;
<a name="l00226"></a>00226         }
<a name="l00227"></a>00227 
<a name="l00234"></a><a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">00234</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>($str)        {
<a name="l00235"></a>00235                 <span class="keywordflow">return</span> <span class="stringliteral">"&lt;strong&gt;"</span>.$str.<span class="stringliteral">":&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;"</span>;
<a name="l00236"></a>00236         }
<a name="l00237"></a>00237 
<a name="l00243"></a><a class="code" href="classSC__mod__tools__isearch__index.html#ffe18455f6545b08f9c0614a286e9c06">00243</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#ffe18455f6545b08f9c0614a286e9c06">getPhashStat</a>() {
<a name="l00244"></a>00244                 $recList = array();
<a name="l00245"></a>00245 
<a name="l00246"></a>00246                         <span class="comment">// TYPO3 pages, unique</span>
<a name="l00247"></a>00247                 $items = array();
<a name="l00248"></a>00248                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*),phash', 'index_phash', 'data_page_id!=0', 'phash_grouping,pcount,phash');
<a name="l00249"></a>00249                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res)) {
<a name="l00250"></a>00250                         $items[] = $row;
<a name="l00251"></a>00251                 }
<a name="l00252"></a>00252                 $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"TYPO3 pages"</span>), count($items));
<a name="l00253"></a>00253 
<a name="l00254"></a>00254                         <span class="comment">// TYPO3 pages:</span>
<a name="l00255"></a>00255                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_phash', 'data_page_id!=0');
<a name="l00256"></a>00256                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00257"></a>00257                 $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"TYPO3 pages, raw"</span>), $row[0]);
<a name="l00258"></a>00258 
<a name="l00259"></a>00259                         <span class="comment">// External files, unique</span>
<a name="l00260"></a>00260                 $items = array();
<a name="l00261"></a>00261                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*),phash', 'index_phash', 'data_filename!=\<span class="charliteral">'\''</span>, 'phash_grouping');
<a name="l00262"></a>00262                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00263"></a>00263                 $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"External files"</span>), $row[0]);
<a name="l00264"></a>00264 
<a name="l00265"></a>00265                         <span class="comment">// External files</span>
<a name="l00266"></a>00266                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_phash', 'data_filename!=\<span class="charliteral">'\''</span>);
<a name="l00267"></a>00267                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00268"></a>00268                 $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"External files, raw"</span>), $row[0]);
<a name="l00269"></a>00269 
<a name="l00270"></a>00270                 <span class="keywordflow">return</span> $recList;
<a name="l00271"></a>00271         }
<a name="l00272"></a>00272 
<a name="l00278"></a><a class="code" href="classSC__mod__tools__isearch__index.html#5f6f41de8021b562c8a864c8cf23ace8">00278</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#5f6f41de8021b562c8a864c8cf23ace8">getPhashT3pages</a>()      {
<a name="l00279"></a>00279                 $recList[]=array(
<a name="l00280"></a>00280                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"id/type"</span>),
<a name="l00281"></a>00281                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Title"</span>),
<a name="l00282"></a>00282                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Size"</span>),
<a name="l00283"></a>00283                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Words"</span>),
<a name="l00284"></a>00284                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"mtime"</span>),
<a name="l00285"></a>00285                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Indexed"</span>),
<a name="l00286"></a>00286                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Updated"</span>),
<a name="l00287"></a>00287                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Parsetime"</span>),
<a name="l00288"></a>00288                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"#sec/gr/full"</span>),
<a name="l00289"></a>00289                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"#sub"</span>),
<a name="l00290"></a>00290                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Lang"</span>),
<a name="l00291"></a>00291                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"cHash"</span>),
<a name="l00292"></a>00292                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"phash"</span>)
<a name="l00293"></a>00293                 );
<a name="l00294"></a>00294 
<a name="l00295"></a>00295                         <span class="comment">// TYPO3 pages, unique</span>
<a name="l00296"></a>00296                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'data_page_id!=0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid', 'data_page_id');
<a name="l00297"></a>00297                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($res))       {
<a name="l00298"></a>00298 
<a name="l00299"></a>00299                         $cHash = count(unserialize($row[<span class="stringliteral">"cHashParams"</span>])) ? $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#19134a28cc8d1a652db33fb37420ed7f">formatCHash</a>(unserialize($row[<span class="stringliteral">"cHashParams"</span>])) : <span class="stringliteral">""</span>;
<a name="l00300"></a>00300                         $grListRec = $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">getGrlistRecord</a>($row[<span class="stringliteral">"phash"</span>]);
<a name="l00301"></a>00301                         $recList[] = array(
<a name="l00302"></a>00302                                 $row[<span class="stringliteral">"data_page_id"</span>].($row[<span class="stringliteral">"data_page_type"</span>]?<span class="stringliteral">"/"</span>.$row[<span class="stringliteral">"data_page_type"</span>]:<span class="stringliteral">""</span>),
<a name="l00303"></a>00303                                 <a class="code" href="classt3lib__div.html#6c2adca01abbf533fd2b06d61608fd27">t3lib_div::fixed_lgd</a>($row[<span class="stringliteral">"item_title"</span>],30),
<a name="l00304"></a>00304                                 <a class="code" href="classt3lib__div.html#0c708e4d01dd1b05ed7922042ca17289">t3lib_div::formatSize</a>($row[<span class="stringliteral">"item_size"</span>]),
<a name="l00305"></a>00305                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">getNumberOfWords</a>($row[<span class="stringliteral">"phash"</span>]),
<a name="l00306"></a>00306                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"item_mtime"</span>]),
<a name="l00307"></a>00307                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"crdate"</span>]),
<a name="l00308"></a>00308                                 ($row[<span class="stringliteral">"tstamp"</span>]!=$row[<span class="stringliteral">"crdate"</span>] ? <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"tstamp"</span>]) : <span class="stringliteral">""</span>),
<a name="l00309"></a>00309                                 $row[<span class="stringliteral">"parsetime"</span>],
<a name="l00310"></a>00310                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">getNumberOfSections</a>($row[<span class="stringliteral">"phash"</span>]).<span class="stringliteral">"/"</span>.$grListRec[0][<span class="stringliteral">"pcount"</span>].<span class="stringliteral">"/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">getNumberOfFulltext</a>($row[<span class="stringliteral">"phash"</span>]),
<a name="l00311"></a>00311                                 $row[<span class="stringliteral">"pcount"</span>].<span class="stringliteral">"/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#5bd0c8271292bc7f9d29d34fcfdc2ba6">formatFeGroup</a>($grListRec),
<a name="l00312"></a>00312                                 $row[<span class="stringliteral">"sys_language_uid"</span>],
<a name="l00313"></a>00313                                 $cHash,
<a name="l00314"></a>00314                                 $row[<span class="stringliteral">"phash"</span>]
<a name="l00315"></a>00315                         );
<a name="l00316"></a>00316 
<a name="l00317"></a>00317                         <span class="keywordflow">if</span> ($row[<span class="stringliteral">"pcount"</span>]&gt;1)   {
<a name="l00318"></a>00318                                 $res2 = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('index_phash.*', 'index_phash', 'phash_grouping='.intval($row['phash_grouping']).' AND phash!='.intval($row['phash']));
<a name="l00319"></a>00319                                 <span class="keywordflow">while</span>($row2 = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($res2))     {
<a name="l00320"></a>00320                                         $grListRec = $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">getGrlistRecord</a>($row2[<span class="stringliteral">"phash"</span>]);
<a name="l00321"></a>00321                                         $recList[] = array(
<a name="l00322"></a>00322                                                 <span class="stringliteral">""</span>,
<a name="l00323"></a>00323                                                 <span class="stringliteral">""</span>,
<a name="l00324"></a>00324                                                 <a class="code" href="classt3lib__div.html#0c708e4d01dd1b05ed7922042ca17289">t3lib_div::formatSize</a>($row2[<span class="stringliteral">"item_size"</span>]),
<a name="l00325"></a>00325                                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">getNumberOfWords</a>($row2[<span class="stringliteral">"phash"</span>]),
<a name="l00326"></a>00326                                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row2[<span class="stringliteral">"item_mtime"</span>]),
<a name="l00327"></a>00327                                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row2[<span class="stringliteral">"crdate"</span>]),
<a name="l00328"></a>00328                                                 ($row2[<span class="stringliteral">"tstamp"</span>]!=$row2[<span class="stringliteral">"crdate"</span>] ? <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row2[<span class="stringliteral">"tstamp"</span>]) : <span class="stringliteral">""</span>),
<a name="l00329"></a>00329                                                 $row2[<span class="stringliteral">"parsetime"</span>],
<a name="l00330"></a>00330                                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">getNumberOfSections</a>($row2[<span class="stringliteral">"phash"</span>]).<span class="stringliteral">"/"</span>.$grListRec[0][<span class="stringliteral">"pcount"</span>].<span class="stringliteral">"/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">getNumberOfFulltext</a>($row2[<span class="stringliteral">"phash"</span>]),
<a name="l00331"></a>00331                                                 <span class="stringliteral">"-/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#5bd0c8271292bc7f9d29d34fcfdc2ba6">formatFeGroup</a>($grListRec),
<a name="l00332"></a>00332                                                 <span class="stringliteral">""</span>,
<a name="l00333"></a>00333                                                 <span class="stringliteral">""</span>,
<a name="l00334"></a>00334                                                 $row2[<span class="stringliteral">"phash"</span>]
<a name="l00335"></a>00335                                         );
<a name="l00336"></a>00336                                 }
<a name="l00337"></a>00337                         }
<a name="l00338"></a>00338                 }
<a name="l00339"></a>00339                 <span class="keywordflow">return</span> $recList;
<a name="l00340"></a>00340         }
<a name="l00341"></a>00341 
<a name="l00347"></a><a class="code" href="classSC__mod__tools__isearch__index.html#36a2bb322195a8a8f9626afbddc1ff2a">00347</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#36a2bb322195a8a8f9626afbddc1ff2a">getPhashExternalDocs</a>() {
<a name="l00348"></a>00348                 $recList[]=array(
<a name="l00349"></a>00349                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Filename"</span>),
<a name="l00350"></a>00350                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Size"</span>),
<a name="l00351"></a>00351                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Words"</span>),
<a name="l00352"></a>00352                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"mtime"</span>),
<a name="l00353"></a>00353                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Indexed"</span>),
<a name="l00354"></a>00354                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Updated"</span>),
<a name="l00355"></a>00355                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Parsetime"</span>),
<a name="l00356"></a>00356                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"#sec/gr/full"</span>),
<a name="l00357"></a>00357                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"#sub"</span>),
<a name="l00358"></a>00358                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"cHash"</span>),
<a name="l00359"></a>00359                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"phash"</span>),
<a name="l00360"></a>00360                         $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>(<span class="stringliteral">"Path"</span>)
<a name="l00361"></a>00361                 );
<a name="l00362"></a>00362 
<a name="l00363"></a>00363                         <span class="comment">// TYPO3 pages, unique</span>
<a name="l00364"></a>00364                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'item_type&gt;0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid', 'item_type');
<a name="l00365"></a>00365                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($res))       {
<a name="l00366"></a>00366 
<a name="l00367"></a>00367                         $cHash = count(unserialize($row[<span class="stringliteral">"cHashParams"</span>])) ? $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#19134a28cc8d1a652db33fb37420ed7f">formatCHash</a>(unserialize($row[<span class="stringliteral">"cHashParams"</span>])) : <span class="stringliteral">""</span>;
<a name="l00368"></a>00368                         $grListRec = $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">getGrlistRecord</a>($row[<span class="stringliteral">"phash"</span>]);
<a name="l00369"></a>00369                         $recList[]=array(
<a name="l00370"></a>00370                                 <a class="code" href="classt3lib__div.html#6c2adca01abbf533fd2b06d61608fd27">t3lib_div::fixed_lgd</a>($row[<span class="stringliteral">"item_title"</span>],30),
<a name="l00371"></a>00371                                 <a class="code" href="classt3lib__div.html#0c708e4d01dd1b05ed7922042ca17289">t3lib_div::formatSize</a>($row[<span class="stringliteral">"item_size"</span>]),
<a name="l00372"></a>00372                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">getNumberOfWords</a>($row[<span class="stringliteral">"phash"</span>]),
<a name="l00373"></a>00373                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"item_mtime"</span>]),
<a name="l00374"></a>00374                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"crdate"</span>]),
<a name="l00375"></a>00375                                 ($row[<span class="stringliteral">"tstamp"</span>]!=$row[<span class="stringliteral">"crdate"</span>] ? <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row[<span class="stringliteral">"tstamp"</span>]) : <span class="stringliteral">""</span>),
<a name="l00376"></a>00376                                 $row[<span class="stringliteral">"parsetime"</span>],
<a name="l00377"></a>00377                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">getNumberOfSections</a>($row[<span class="stringliteral">"phash"</span>]).<span class="stringliteral">"/"</span>.$grListRec[0][<span class="stringliteral">"pcount"</span>].<span class="stringliteral">"/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">getNumberOfFulltext</a>($row[<span class="stringliteral">"phash"</span>]),
<a name="l00378"></a>00378                                 $row[<span class="stringliteral">"pcount"</span>],
<a name="l00379"></a>00379                                 $cHash,
<a name="l00380"></a>00380                                 $row[<span class="stringliteral">"phash"</span>],
<a name="l00381"></a>00381                                 <a class="code" href="classt3lib__div.html#6c2adca01abbf533fd2b06d61608fd27">t3lib_div::fixed_lgd</a>($row[<span class="stringliteral">"data_filename"</span>],100)
<a name="l00382"></a>00382                         );
<a name="l00383"></a>00383 
<a name="l00384"></a>00384                         <span class="keywordflow">if</span> ($row[<span class="stringliteral">"pcount"</span>]&gt;1)   {
<a name="l00385"></a>00385                                 $res2 = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('index_phash.*', 'index_phash', 'phash_grouping='.intval($row['phash_grouping']).' AND phash!='.intval($row['phash']));
<a name="l00386"></a>00386                                 <span class="keywordflow">while</span>($row2 = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($res2))     {
<a name="l00387"></a>00387                                         $cHash = count(unserialize($row2[<span class="stringliteral">"cHashParams"</span>])) ? $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#19134a28cc8d1a652db33fb37420ed7f">formatCHash</a>(unserialize($row2[<span class="stringliteral">"cHashParams"</span>])) : <span class="stringliteral">""</span>;
<a name="l00388"></a>00388                                         $grListRec = $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">getGrlistRecord</a>($row2[<span class="stringliteral">"phash"</span>]);
<a name="l00389"></a>00389                                         $recList[]=array(
<a name="l00390"></a>00390                                                 <span class="stringliteral">""</span>,
<a name="l00391"></a>00391                                                 <span class="stringliteral">""</span>,
<a name="l00392"></a>00392                                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">getNumberOfWords</a>($row2[<span class="stringliteral">"phash"</span>]),
<a name="l00393"></a>00393                                                 <span class="stringliteral">""</span>,
<a name="l00394"></a>00394                                                 <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row2[<span class="stringliteral">"crdate"</span>]),
<a name="l00395"></a>00395                                                 ($row2[<span class="stringliteral">"tstamp"</span>]!=$row2[<span class="stringliteral">"crdate"</span>] ? <a class="code" href="classt3lib__BEfunc.html#7252b479336e434817081578bd031e5d">t3lib_BEfunc::datetime</a>($row2[<span class="stringliteral">"tstamp"</span>]) : <span class="stringliteral">""</span>),
<a name="l00396"></a>00396                                                 $row2[<span class="stringliteral">"parsetime"</span>],
<a name="l00397"></a>00397                                                 $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">getNumberOfSections</a>($row2[<span class="stringliteral">"phash"</span>]).<span class="stringliteral">"/"</span>.$grListRec[0][<span class="stringliteral">"pcount"</span>].<span class="stringliteral">"/"</span>.$this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">getNumberOfFulltext</a>($row2[<span class="stringliteral">"phash"</span>]),
<a name="l00398"></a>00398                                                 <span class="stringliteral">""</span>,
<a name="l00399"></a>00399                                                 $cHash,
<a name="l00400"></a>00400                                                 $row2[<span class="stringliteral">"phash"</span>],
<a name="l00401"></a>00401                                                 <span class="stringliteral">""</span>
<a name="l00402"></a>00402                                         );
<a name="l00403"></a>00403                                 }
<a name="l00404"></a>00404                         }
<a name="l00405"></a>00405         <span class="comment">//              debug($row);</span>
<a name="l00406"></a>00406                 }
<a name="l00407"></a>00407                 <span class="keywordflow">return</span> $recList;
<a name="l00408"></a>00408         }
<a name="l00409"></a>00409 
<a name="l00416"></a><a class="code" href="classSC__mod__tools__isearch__index.html#5bd0c8271292bc7f9d29d34fcfdc2ba6">00416</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#5bd0c8271292bc7f9d29d34fcfdc2ba6">formatFeGroup</a>($fegroup_recs)   {
<a name="l00417"></a>00417                 reset($fegroup_recs);
<a name="l00418"></a>00418                 $str = array();
<a name="l00419"></a>00419                 <span class="keywordflow">while</span>(list(,$row)=each($fegroup_recs))  {
<a name="l00420"></a>00420                         $str[] = $row[<span class="stringliteral">"gr_list"</span>]==<span class="stringliteral">"0,-1"</span> ? <span class="stringliteral">"NL"</span> : $row[<span class="stringliteral">"gr_list"</span>];
<a name="l00421"></a>00421                 }
<a name="l00422"></a>00422                 arsort($str);
<a name="l00423"></a>00423                 <span class="keywordflow">return</span> implode(<span class="stringliteral">"|"</span>,$str);
<a name="l00424"></a>00424         }
<a name="l00425"></a>00425 
<a name="l00432"></a><a class="code" href="classSC__mod__tools__isearch__index.html#19134a28cc8d1a652db33fb37420ed7f">00432</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#19134a28cc8d1a652db33fb37420ed7f">formatCHash</a>($arr)      {
<a name="l00433"></a>00433                 reset($arr);
<a name="l00434"></a>00434                 $list=array();
<a name="l00435"></a>00435                 <span class="keywordflow">while</span>(list($k,$v)=each($arr))   {
<a name="l00436"></a>00436                         $list[]=$k.<span class="stringliteral">"="</span>.$v;
<a name="l00437"></a>00437                 }
<a name="l00438"></a>00438                 <span class="keywordflow">return</span> implode(<span class="stringliteral">"&lt;BR&gt;"</span>,$list);
<a name="l00439"></a>00439         }
<a name="l00440"></a>00440 
<a name="l00447"></a><a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">00447</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#22c1fd2d309a736f1929e6bdef97caca">getNumberOfSections</a>($phash)    {
<a name="l00448"></a>00448                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_section', 'phash='.intval($phash));
<a name="l00449"></a>00449                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00450"></a>00450                 <span class="keywordflow">return</span> $row[0];
<a name="l00451"></a>00451         }
<a name="l00452"></a>00452 
<a name="l00459"></a><a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">00459</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#64a2a23aae54d3788603a870041eadaf">getNumberOfWords</a>($phash)       {
<a name="l00460"></a>00460                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_rel', 'phash='.intval($phash));
<a name="l00461"></a>00461                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00462"></a>00462                 <span class="keywordflow">return</span> $row[0];
<a name="l00463"></a>00463         }
<a name="l00464"></a>00464 
<a name="l00471"></a><a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">00471</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#b77777a635b1ad9319390f2100eaf4e5">getGrlistRecord</a>($phash)        {
<a name="l00472"></a>00472                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('index_grlist.*', 'index_grlist', 'phash='.intval($phash));
<a name="l00473"></a>00473                 $allRows = array();
<a name="l00474"></a>00474                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_assoc($res))       {
<a name="l00475"></a>00475                         $row[<span class="stringliteral">"pcount"</span>] = $GLOBALS['TYPO3_DB']-&gt;sql_num_rows($res);
<a name="l00476"></a>00476                         $allRows[] = $row;
<a name="l00477"></a>00477                 }
<a name="l00478"></a>00478                 <span class="keywordflow">return</span> $allRows;
<a name="l00479"></a>00479         }
<a name="l00480"></a>00480 
<a name="l00487"></a><a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">00487</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#98b576dcef0d52af3ebcc3f649daccf6">getNumberOfFulltext</a>($phash)    {
<a name="l00488"></a>00488                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_fulltext', 'phash='.intval($phash));
<a name="l00489"></a>00489                 $row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res);
<a name="l00490"></a>00490                 <span class="keywordflow">return</span> $row[0];
<a name="l00491"></a>00491         }
<a name="l00492"></a>00492 
<a name="l00498"></a><a class="code" href="classSC__mod__tools__isearch__index.html#88bc97ef3d12423753e7c80db0a92cea">00498</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#88bc97ef3d12423753e7c80db0a92cea">getPhashTypes</a>()        {
<a name="l00499"></a>00499                 $recList=array();
<a name="l00500"></a>00500 
<a name="l00501"></a>00501                 <span class="comment">// Types:</span>
<a name="l00502"></a>00502                 $Itypes = array(
<a name="l00503"></a>00503                         <span class="stringliteral">"html"</span> =&gt; 1,
<a name="l00504"></a>00504                         <span class="stringliteral">"htm"</span> =&gt; 1,
<a name="l00505"></a>00505                         <span class="stringliteral">"pdf"</span> =&gt; 2,
<a name="l00506"></a>00506                         <span class="stringliteral">"doc"</span> =&gt; 3,
<a name="l00507"></a>00507                         <span class="stringliteral">"txt"</span> =&gt; 4
<a name="l00508"></a>00508                 );
<a name="l00509"></a>00509 
<a name="l00510"></a>00510                 $revTypes=array_flip($Itypes);
<a name="l00511"></a>00511                 $revTypes[0]=<span class="stringliteral">"TYPO3 page"</span>;
<a name="l00512"></a>00512 
<a name="l00513"></a>00513                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*),item_type', 'index_phash', '', 'item_type', 'item_type');
<a name="l00514"></a>00514                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res)) {
<a name="l00515"></a>00515                         $iT = $row[1];
<a name="l00516"></a>00516                         $recList[] = array($this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#a2e2198f30f4db33bfacacf7996fbc85">tableHead</a>($revTypes[$iT].<span class="stringliteral">" ($iT)"</span>), $this-&gt;<a class="code" href="classSC__mod__tools__isearch__index.html#b654c3b2483405e60e16834dfd5959f3">countUniqueTypes</a>($iT).<span class="stringliteral">"/"</span>.$row[0]);
<a name="l00517"></a>00517                 }
<a name="l00518"></a>00518 
<a name="l00519"></a>00519                 <span class="keywordflow">return</span> $recList;
<a name="l00520"></a>00520         }
<a name="l00521"></a>00521 
<a name="l00528"></a><a class="code" href="classSC__mod__tools__isearch__index.html#b654c3b2483405e60e16834dfd5959f3">00528</a>         function <a class="code" href="classSC__mod__tools__isearch__index.html#b654c3b2483405e60e16834dfd5959f3">countUniqueTypes</a>($item_type)   {
<a name="l00529"></a>00529                         <span class="comment">// TYPO3 pages, unique</span>
<a name="l00530"></a>00530                 $res = $GLOBALS['TYPO3_DB']-&gt;exec_SELECTquery('count(*)', 'index_phash', 'item_type='.intval($item_type), 'phash_grouping');
<a name="l00531"></a>00531                 $items = array();
<a name="l00532"></a>00532                 <span class="keywordflow">while</span>($row = $GLOBALS['TYPO3_DB']-&gt;sql_fetch_row($res)) {
<a name="l00533"></a>00533                         $items[] = $row;
<a name="l00534"></a>00534                 }
<a name="l00535"></a>00535                 <span class="keywordflow">return</span> count($items);
<a name="l00536"></a>00536         }
<a name="l00537"></a>00537 }
<a name="l00538"></a>00538 
<a name="l00539"></a>00539 <span class="comment">// Include extension?</span>
<a name="l00540"></a>00540 <span class="keywordflow">if</span> (defined(<span class="stringliteral">"TYPO3_MODE"</span>) &amp;&amp; $TYPO3_CONF_VARS[TYPO3_MODE][<span class="stringliteral">"XCLASS"</span>][<span class="stringliteral">"ext/indexed_search/mod/index.php"</span>])        {
<a name="l00541"></a>00541         include_once($TYPO3_CONF_VARS[TYPO3_MODE][<span class="stringliteral">"XCLASS"</span>][<span class="stringliteral">"ext/indexed_search/mod/index.php"</span>]);
<a name="l00542"></a>00542 }
<a name="l00543"></a>00543 
<a name="l00544"></a>00544 
<a name="l00545"></a>00545 
<a name="l00546"></a>00546 
<a name="l00547"></a>00547 
<a name="l00548"></a>00548 
<a name="l00549"></a>00549 
<a name="l00550"></a>00550 
<a name="l00551"></a>00551 
<a name="l00552"></a>00552 
<a name="l00553"></a>00553 
<a name="l00554"></a>00554 
<a name="l00555"></a>00555 <span class="comment">// Make instance:</span>
<a name="l00556"></a>00556 $SOBE = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>(<span class="stringliteral">"SC_mod_tools_isearch_index"</span>);
<a name="l00557"></a>00557 $SOBE-&gt;init();
<a name="l00558"></a>00558 $SOBE-&gt;main();
<a name="l00559"></a>00559 $SOBE-&gt;printContent();
<a name="l00560"></a>00560 ?&gt;
</pre></div><?php
  include_once '../doc-typo3-funcs.php';
  get_footer();
?>