"TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php Source File", "datetime" => "Sat Dec 2 19:22:34 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?>
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com) 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * A copy is found in the textfile GPL.txt and important notices to the license 00017 * from the author is found in LICENSE.txt distributed with these scripts. 00018 * 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00031 require_once(PATH_t3lib."class.t3lib_extobjbase.php"); 00032 00033 class tx_tstemplateobjbrowser extends t3lib_extobjbase { 00034 function modMenu() { 00035 global $LANG; 00036 00037 $modMenu = array ( 00038 "ts_browser_type" => array( 00039 "setup" => "Setup", 00040 "const" => "Constants" 00041 ), 00042 "ts_browser_toplevel_setup" => array( 00043 "0" => "ALL" 00044 ), 00045 "ts_browser_toplevel_const" => array( 00046 "0" => "ALL" 00047 ), 00048 "ts_browser_const" => array( 00049 "0" => "Plain substitution (default)", 00050 "subst" => "Substituted constants in green", 00051 "const" => "UN-substituted constants in green" 00052 ), 00053 "ts_browser_regexsearch" => "", 00054 "ts_browser_fixedLgd" => "1", 00055 "ts_browser_linkObjects" => "1", 00056 ); 00057 00058 foreach(array('setup','const') as $bType) { 00059 $addKey = t3lib_div::_GET('addKey'); 00060 if (is_array($addKey)) { // If any plus-signs were clicked, it's registred. 00061 reset($addKey); 00062 if (current($addKey)) { 00063 $this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType][key($addKey)] = key($addKey); 00064 } else { 00065 unset($this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType][key($addKey)]); 00066 } 00067 $GLOBALS['BE_USER']->pushModuleData($this->pObj->MCONF['name'],$this->pObj->MOD_SETTINGS); 00068 } 00069 00070 if (count($this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType])) { 00071 $modMenu['ts_browser_toplevel_'.$bType]['-']='---'; 00072 $modMenu['ts_browser_toplevel_'.$bType] = $modMenu['ts_browser_toplevel_'.$bType] + $this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType]; 00073 } 00074 } 00075 00076 return $modMenu; 00077 } 00078 00087 function verify_TSobjects($propertyArray,$parentType,$parentValue) { 00088 $TSobjTable = array( 00089 "PAGE" => array( 00090 "prop" => array ( 00091 "typeNum" => "int", 00092 "1,2,3" => "COBJ", 00093 "bodyTag" => "string" 00094 ) 00095 ), 00096 "TEXT" => array( 00097 "prop" => array ( 00098 "value" => "string" 00099 ) 00100 ), 00101 "HTML" => array( 00102 "prop" => array ( 00103 "value" => "stdWrap" 00104 ) 00105 ), 00106 "stdWrap" => array( 00107 "prop" => array ( 00108 "field" => "string", 00109 "current" => "boolean" 00110 ) 00111 ), 00112 ); 00113 $TSobjDataTypes = array( 00114 "COBJ" => "TEXT,CONTENT", 00115 "PAGE" => "PAGE", 00116 "stdWrap" => "" 00117 ); 00118 00119 if ($parentType) { 00120 if (isset($TSobjDataTypes[$parentType]) && (!$TSobjDataTypes[$parentType] || t3lib_div::inlist($TSobjDataTypes[$parentType],$parentValue))) { 00121 $ObjectKind = $parentValue; 00122 } else { 00123 $ObjectKind = ""; // Object kind is "" if it should be known. 00124 } 00125 } else { 00126 $ObjectKind = $parentValue; // If parentType is not given, then it can be anything. Free. 00127 } 00128 00129 if ($ObjectKind && is_array($TSobjTable[$ObjectKind])) { 00130 $result=array(); 00131 if (is_array($propertyArray)) { 00132 reset($propertyArray); 00133 while(list($key,$val)=each($propertyArray)) { 00134 if (t3lib_div::testInt($key)) { // If num-arrays 00135 $result[$key]=$TSobjTable[$ObjectKind]["prop"]["1,2,3"]; 00136 } else { // standard 00137 $result[$key]=$TSobjTable[$ObjectKind]["prop"][$key]; 00138 } 00139 } 00140 } 00141 return $result; 00142 } 00143 } 00144 00152 function initialize_editor($pageId,$template_uid=0) { 00153 // Initializes the module. Done in this function because we may need to re-initialize if data is submitted! 00154 global $tmpl,$tplRow,$theConstants; 00155 00156 $tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext"); // Defined global here! 00157 $tmpl->tt_track = 0; // Do not log time-performance information 00158 $tmpl->init(); 00159 00160 // Gets the rootLine 00161 $sys_page = t3lib_div::makeInstance("t3lib_pageSelect"); 00162 $rootLine = $sys_page->getRootLine($pageId); 00163 $tmpl->runThroughTemplates($rootLine,$template_uid); // This generates the constants/config + hierarchy info for the template. 00164 00165 $tplRow = $tmpl->ext_getFirstTemplate($pageId,$template_uid); // Get the row of the first VISIBLE template of the page. whereclause like the frontend. 00166 if (is_array($tplRow)) { // IF there was a template... 00167 return 1; 00168 } 00169 } 00170 00176 function main() { 00177 global $SOBE,$BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS; 00178 global $tmpl,$tplRow,$theConstants; 00179 00180 $POST = t3lib_div::_POST(); 00181 00182 // ************************** 00183 // Checking for more than one template an if, set a menu... 00184 // ************************** 00185 $manyTemplatesMenu = $this->pObj->templateMenu(); 00186 $template_uid = 0; 00187 if ($manyTemplatesMenu) { 00188 $template_uid = $this->pObj->MOD_SETTINGS["templatesOnPage"]; 00189 } 00190 00191 00192 00193 00194 00195 // ************************** 00196 // Main 00197 // ************************** 00198 00199 // BUGBUG: Should we check if the uset may at all read and write template-records??? 00200 $bType= $this->pObj->MOD_SETTINGS["ts_browser_type"]; 00201 $existTemplate = $this->initialize_editor($this->pObj->id,$template_uid); // initialize 00202 if ($existTemplate) { 00203 $theOutput.=$this->pObj->doc->divider(5); 00204 $theOutput.=$this->pObj->doc->section("Current template:",'<img src="'.$BACK_PATH.t3lib_iconWorks::getIcon("sys_template",$tplRow).'" width=18 height=16 align=top><b>'.$this->pObj->linkWrapTemplateTitle($tplRow["title"], ($bType=="setup"?"config":"constants")).'</b>'.htmlspecialchars(trim($tplRow["sitetitle"])?' - ('.$tplRow["sitetitle"].')':''),0,0); 00205 if ($manyTemplatesMenu) { 00206 $theOutput.=$this->pObj->doc->section("",$manyTemplatesMenu); 00207 $theOutput.=$this->pObj->doc->divider(5); 00208 } 00209 00210 if ($POST["add_property"] || $POST["update_value"] || $POST["clear_object"]) { 00211 // add property 00212 $line=""; 00213 // debug($POST); 00214 if (is_array($POST["data"])) { 00215 if ($POST["add_property"]) { 00216 reset($POST["data"]); 00217 $name = key($POST["data"]); 00218 $property = trim($POST["data"][$name]["name"]); 00219 if (ereg_replace("[^a-zA-Z0-9_\.]*","",$property)!=$property) { 00220 $theOutput.=$this->pObj->doc->spacer(10); 00221 $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("BAD PROPERTY!"),'You must enter a property with characters a-z, A-Z and 0-9, no spaces!<BR>Nothing was updated!',0,0,0,1); 00222 } else { 00223 $pline= $name.".".$property." = ".trim($POST["data"][$name]["propertyValue"]); 00224 $theOutput.=$this->pObj->doc->spacer(10); 00225 $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("PROPERTY ADDED"),htmlspecialchars($pline),0,0,0,1); 00226 $line.=chr(10).$pline; 00227 } 00228 } 00229 if ($POST["update_value"]) { 00230 reset($POST["data"]); 00231 $name = key($POST["data"]); 00232 $pline= $name." = ".trim($POST["data"][$name]["value"]); 00233 $theOutput.=$this->pObj->doc->spacer(10); 00234 $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("VALUE UPDATED"),htmlspecialchars($pline),0,0,0,1); 00235 $line.=chr(10).$pline; 00236 } 00237 if ($POST["clear_object"]) { 00238 reset($POST["data"]); 00239 $name = key($POST["data"]); 00240 if ($POST["data"][$name]["clearValue"]) { 00241 $pline= $name." >"; 00242 $theOutput.=$this->pObj->doc->spacer(10); 00243 $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("Object cleared"),htmlspecialchars($pline),0,0,0,1); 00244 $line.=chr(10).$pline; 00245 } 00246 } 00247 } 00248 if ($line) { 00249 require_once (PATH_t3lib."class.t3lib_tcemain.php"); 00250 $saveId = $tplRow['_ORIG_uid'] ? $tplRow['_ORIG_uid'] : $tplRow['uid']; 00251 // Set the data to be saved 00252 $recData=array(); 00253 $field =$bType=="setup"?"config":"constants"; 00254 $recData["sys_template"][$saveId][$field] = $tplRow[$field].$line; 00255 // Create new tce-object 00256 $tce = t3lib_div::makeInstance("t3lib_TCEmain"); 00257 $tce->stripslashes_values=0; 00258 // Initialize 00259 $tce->start($recData,Array()); 00260 // Saved the stuff 00261 $tce->process_datamap(); 00262 // Clear the cache (note: currently only admin-users can clear the cache in tce_main.php) 00263 $tce->clear_cacheCmd("all"); 00264 00265 // re-read the template ... 00266 $this->initialize_editor($this->pObj->id,$template_uid); 00267 } 00268 } 00269 } 00270 00271 $tsbr = t3lib_div::_GET('tsbr'); 00272 $update=0; 00273 if (is_array($tsbr)) { // If any plus-signs were clicked, it's registred. 00274 $this->pObj->MOD_SETTINGS["tsbrowser_depthKeys_".$bType] = $tmpl->ext_depthKeys($tsbr, $this->pObj->MOD_SETTINGS["tsbrowser_depthKeys_".$bType]); 00275 $update=1; 00276 } 00277 00278 if ($POST["Submit"]) { // If any POST-vars are send, update the condition array 00279 $this->pObj->MOD_SETTINGS["tsbrowser_conditions"] = $POST["conditions"]; 00280 $update=1; 00281 } 00282 if ($update) { $GLOBALS["BE_USER"]->pushModuleData($this->pObj->MCONF["name"],$this->pObj->MOD_SETTINGS); } 00283 00284 00285 $tmpl->matchAlternative = $this->pObj->MOD_SETTINGS['tsbrowser_conditions']; 00286 $tmpl->matchAlternative[] = 'dummydummydummydummydummydummydummydummydummydummydummy'; // This is just here to make sure that at least one element is in the array so that the tsparser actually uses this array to match. 00287 00288 $tmpl->constantMode = $this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"] ? "" : $this->pObj->MOD_SETTINGS["ts_browser_const"]; 00289 if ($this->pObj->sObj && $tmpl->constantMode) {$tmpl->constantMode = "untouched";} 00290 00291 $tmpl->regexMode = $this->pObj->MOD_SETTINGS["ts_browser_regexsearch"]; 00292 $tmpl->fixedLgd=$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"]; 00293 # $tmpl->linkObjects=$this->pObj->MOD_SETTINGS["ts_browser_linkObjects"]; 00294 $tmpl->linkObjects = TRUE; 00295 $tmpl->ext_regLinenumbers = TRUE; 00296 $tmpl->bType=$bType; 00297 $tmpl->resourceCheck=1; 00298 $tmpl->uplPath = PATH_site.$tmpl->uplPath; 00299 $tmpl->removeFromGetFilePath = PATH_site; 00300 //debug($tmpl->uplPath); 00301 00302 if ($this->pObj->MOD_SETTINGS["ts_browser_type"]=="const") { 00303 $tmpl->ext_constants_BRP=intval(t3lib_div::_GP("breakPointLN")); 00304 } else { 00305 $tmpl->ext_config_BRP=intval(t3lib_div::_GP("breakPointLN")); 00306 } 00307 $tmpl->generateConfig(); 00308 00309 if ($bType=="setup") { 00310 $theSetup = $tmpl->setup; 00311 } else { 00312 $theSetup = $tmpl->setup_constants; 00313 } 00314 00315 // EDIT A VALUE: 00316 if ($this->pObj->sObj) { 00317 list($theSetup,$theSetupValue) = $tmpl->ext_getSetup($theSetup, ($this->pObj->sObj?$this->pObj->sObj:"")); 00318 $theOutput.=$this->pObj->doc->divider(5); 00319 if ($existTemplate) { 00320 // Value 00321 $out=""; 00322 $out=$this->pObj->sObj." =<BR>"; 00323 $out.='<input type="Text" name="data['.$this->pObj->sObj.'][value]" value="'.htmlspecialchars($theSetupValue).'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(40).'>'; 00324 $out.='<input type="Submit" name="update_value" value="Update">'; 00325 $theOutput.=$this->pObj->doc->section("Edit object/property value:",$out,0,0); 00326 00327 // Property 00328 if (t3lib_extMgm::isLoaded("tsconfig_help")) { 00329 $url=$BACK_PATH."wizard_tsconfig.php?mode=tsref&onlyProperty=1"; 00330 $params=array(); 00331 $params["formName"]="editForm"; 00332 $params["itemName"]="data[".$this->pObj->sObj."][name]"; 00333 $params["itemValue"]="data[".$this->pObj->sObj."][propertyValue]"; 00334 $TSicon='<a href="#" onClick="vHWin=window.open(\''.$url.t3lib_div::implodeArrayForUrl("",array("P"=>$params)).'\',\'popUp'.$md5ID.'\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;"><img src="'.$BACK_PATH.'gfx/wizard_tsconfig_s.gif" width="22" height="16" border="0" class="absmiddle" hspace=2 title="TSref reference"></a>'; 00335 } else $TSicon=""; 00336 $out=""; 00337 $out="<nobr>".$this->pObj->sObj."."; 00338 $out.='<input type="Text" name="data['.$this->pObj->sObj.'][name]"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(20).'>'.$TSicon.' = </nobr><BR>'; 00339 $out.='<input type="Text" name="data['.$this->pObj->sObj.'][propertyValue]"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(40).'>'; 00340 $out.='<input type="Submit" name="add_property" value="Add">'; 00341 00342 00343 00344 $theOutput.=$this->pObj->doc->spacer(20); 00345 $theOutput.=$this->pObj->doc->section("Add object property:",$out,0,0); 00346 00347 // clear 00348 $out=""; 00349 $out=$this->pObj->sObj." <b>CLEAR?</b> "; 00350 $out.='<input type="Checkbox" name="data['.$this->pObj->sObj.'][clearValue]" value="1">'; 00351 $out.='<input type="Submit" name="clear_object" value="Clear">'; 00352 $theOutput.=$this->pObj->doc->spacer(20); 00353 $theOutput.=$this->pObj->doc->section("Clear object:",$out,0,0); 00354 00355 $theOutput.=$this->pObj->doc->spacer(10); 00356 } else { 00357 $theOutput.=$this->pObj->doc->section("EDIT:",$GLOBALS["TBE_TEMPLATE"]->rfw("You cannot edit properties and values, if there's no current template."),0,0,0,1); 00358 } 00359 // Links: 00360 $out=''; 00361 if (!$this->pObj->MOD_SETTINGS['ts_browser_TLKeys_'.$bType][$this->pObj->sObj]) { 00362 if (count($theSetup)) { 00363 $out = '<a href="index.php?id='.$this->pObj->id.'&addKey['.$this->pObj->sObj.']=1&SET[ts_browser_toplevel_'.$bType.']='.rawurlencode($this->pObj->sObj).'"><b>Add key</b></a> "'.$this->pObj->sObj.'" to Object List (OL)'; 00364 } 00365 } else { 00366 $out = '<a href="index.php?id='.$this->pObj->id.'&addKey['.$this->pObj->sObj.']=0&SET[ts_browser_toplevel_'.$bType.']=0"><b>Remove key</b></a> "'.$this->pObj->sObj.'" from Object List (OL)'; 00367 } 00368 if ($out) { 00369 $theOutput.=$this->pObj->doc->divider(5); 00370 $theOutput.=$this->pObj->doc->section("",$out); 00371 } 00372 00373 // back 00374 $out = "< Back"; 00375 $out = '<a href="index.php?id='.$this->pObj->id.'"><b>'.$out.'</b></a>'; 00376 $theOutput.=$this->pObj->doc->divider(5); 00377 $theOutput.=$this->pObj->doc->section("",$out); 00378 00379 } else { 00380 $tmpl->tsbrowser_depthKeys=$this->pObj->MOD_SETTINGS["tsbrowser_depthKeys_".$bType]; 00381 // debug($tmpl->tsbrowser_depthKeys); 00382 00383 if (t3lib_div::_POST('search') && t3lib_div::_POST('search_field')) { // If any POST-vars are send, update the condition array 00384 $tmpl->tsbrowser_depthKeys = $tmpl->ext_getSearchKeys($theSetup, '', t3lib_div::_POST('search_field'), array()); 00385 // debug($tmpl->tsbrowser_depthKeys); 00386 // debug($tmpl->tsbrowser_searchKeys); 00387 } 00388 00389 00390 00391 // Expanding menu 00392 /* if (is_array($theSetup)) { 00393 reset($theSetup); 00394 while(list($tkey,$tval)=each($theSetup)) { 00395 if (substr($tkey,-1)==".") { 00396 $tkey=substr($tkey,0,-1); 00397 } 00398 if ($theSetup[$tkey."."] && $tkey!="types" && $tkey!="TSConstantEditor") { 00399 $this->pObj->MOD_MENU["ts_browser_toplevel_".$bType][$tkey]=$tkey; 00400 } 00401 } 00402 }*/ 00403 00404 $theOutput.=$this->pObj->doc->spacer(5); 00405 $theOutput.=$this->pObj->doc->section('Object tree:','',0,1); 00406 00407 $menu = 'Browse: '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_type]',$bType,$this->pObj->MOD_MENU['ts_browser_type']); 00408 $menu.= ' OL: '.t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[ts_browser_toplevel_'.$bType.']',$this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType],$this->pObj->MOD_MENU['ts_browser_toplevel_'.$bType]); 00409 $theOutput.=$this->pObj->doc->section('','<NOBR>'.$menu.'</NOBR>'); 00410 00411 00412 $theKey=$this->pObj->MOD_SETTINGS["ts_browser_toplevel_".$bType]; 00413 if (!$theKey || !str_replace("-","",$theKey)) {$theKey="";} 00414 list($theSetup,$theSetupValue) = $tmpl->ext_getSetup($theSetup, ($this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType]?$this->pObj->MOD_SETTINGS['ts_browser_toplevel_'.$bType]:'')); 00415 $tree = $tmpl->ext_getObjTree($theSetup, $theKey, "", "", $theSetupValue); 00416 $tree = $tmpl->substituteCMarkers($tree); 00417 00418 00419 00420 // Parser Errors: 00421 $pEkey = ($bType=="setup"?"config":"constants"); 00422 if (count($tmpl->parserErrors[$pEkey])) { 00423 reset($tmpl->parserErrors[$pEkey]); 00424 $errMsg=array(); 00425 while(list(,$inf)=each($tmpl->parserErrors[$pEkey])) { 00426 $errMsg[]=($inf[1]).": ".$inf[0]; 00427 } 00428 $theOutput.=$this->pObj->doc->spacer(10); 00429 $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("Errors and warnings"),implode($errMsg,"<br>"),0,1,0,1); 00430 } 00431 00432 00433 00434 if (isset($this->pObj->MOD_SETTINGS["ts_browser_TLKeys_".$bType][$theKey])) { 00435 $remove='<td width="1%" nowrap><a href="index.php?id='.$this->pObj->id.'&addKey['.$theKey.']=0&SET[ts_browser_toplevel_'.$bType.']=0"><b>Remove key from OL</b></a></td>'; 00436 } else { 00437 $remove=''; 00438 } 00439 $label = $theKey ? $theKey : ($bType=="setup"?"SETUP ROOT":"CONSTANTS ROOT"); 00440 $theOutput.=$this->pObj->doc->spacer(15); 00441 $theOutput.=$this->pObj->doc->sectionEnd(); 00442 $theOutput.='<table border=0 cellpadding=1 cellspacing=0 id="typo3-objectBrowser"> 00443 <tr> 00444 <td><img src=clear.gif width=4 height=1></td> 00445 <td class="bgColor2"> 00446 <table border=0 cellpadding=0 cellspacing=0 class="bgColor5" width="100%"><tr><td nowrap width="99%"><b>'.$label.'</b></td>'.$remove.'</tr></table> 00447 </td> 00448 </tr> 00449 <tr> 00450 <td><img src=clear.gif width=4 height=1></td> 00451 <td class="bgColor2"> 00452 <table border=0 cellpadding=0 cellspacing=0 class="bgColor4" width="100%"><tr><td nowrap>'.$tree.'</td></tr></table><img src=clear.gif width=465 height=1></td> 00453 </tr> 00454 </table> 00455 '; 00456 00457 00458 // Conditions: 00459 if (is_array($tmpl->sections)) { 00460 $theOutput.=$this->pObj->doc->divider(15); 00461 00462 $out=""; 00463 reset($tmpl->sections); 00464 while(list($key,$val)=each($tmpl->sections)) { 00465 $out.='<tr><td><input type="Checkbox" name="conditions['.$key.']" value="'.htmlspecialchars($val).'"'.($this->pObj->MOD_SETTINGS["tsbrowser_conditions"][$key]?" checked":"").'></td><td nowrap>'.$tmpl->substituteCMarkers(htmlspecialchars($val)).' </td></tr>'; 00466 } 00467 $theOutput.=' 00468 <table border=0 cellpadding=1 cellspacing=0> 00469 <tr> 00470 <td><img src=clear.gif width=4 height=1></td> 00471 <td class="bgColor2"> 00472 <table border=0 cellpadding=0 cellspacing=0 class="bgColor4">'.$out.' 00473 <tr> 00474 <td> </td> 00475 <td><img src=clear.gif height=10 width=240><BR><input type="Submit" name="Submit" value="Set conditions"><BR></td> 00476 </tr> 00477 </table> 00478 </td> 00479 </tr> 00480 </table> 00481 00482 '; 00483 } 00484 00485 // Search: 00486 $theOutput.='<br> 00487 00488 <table border=0 cellpadding=1 cellspacing=0> 00489 <tr> 00490 <td><img src=clear.gif width=4 height=1></td> 00491 <td class="bgColor2"> 00492 <table border=0 cellpadding=0 cellspacing=0 class="bgColor4"> 00493 <tr> 00494 <td> Enter search phrase: <input type="Text" name="search_field" value="'.htmlspecialchars($POST["search_field"]).'"'.$GLOBALS["TBE_TEMPLATE"]->formWidth(20).'></td> 00495 <td><input type="Submit" name="search" value="Search"></td> 00496 </tr> 00497 <tr> 00498 <td> Use ereg(), not stristr(): '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_regexsearch]",$this->pObj->MOD_SETTINGS["ts_browser_regexsearch"]).'</td> 00499 <td> </td> 00500 </tr> 00501 </table> 00502 </td> 00503 </tr> 00504 </table> 00505 <br> 00506 '; 00507 00508 // Menu in the bottom: 00509 $menu= "Crop lines".t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_fixedLgd]",$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"]); 00510 #$menu.= " Enable object links".t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_linkObjects]",$this->pObj->MOD_SETTINGS["ts_browser_linkObjects"]); 00511 if ($bType=="setup" && !$this->pObj->MOD_SETTINGS["ts_browser_fixedLgd"]) { 00512 $menu.= "<BR>Constants display: ".t3lib_BEfunc::getFuncMenu($this->pObj->id,"SET[ts_browser_const]",$this->pObj->MOD_SETTINGS["ts_browser_const"],$this->pObj->MOD_MENU["ts_browser_const"]); 00513 } 00514 $theOutput.=$this->pObj->doc->section("",'<NOBR>'.$menu.'</NOBR>'); 00515 00516 $theOutput.=$this->pObj->doc->spacer(10); 00517 $theOutput.=$this->pObj->doc->section("Cache",'Click here to <a href="index.php?id='.$this->pObj->id.'&clear_all_cache=1"><strong>clear all cache</strong></a>',0,1); 00518 00519 // Ending section: 00520 $theOutput.=$this->pObj->doc->sectionEnd(); 00521 } 00522 return $theOutput; 00523 } 00524 } 00525 00526 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php"]) { 00527 include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php"]); 00528 } 00529 00530 ?>