Source for file admin.admin.html.php

Documentation is available at admin.admin.html.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Admin
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */
  9.  
  10. /** ensure this file is being included by a parent file */
  11. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  12.  
  13. class HTML_admin_misc {
  14.  
  15.     /**
  16.     * Check Version, Patches, and Messages
  17.     */
  18.     function version_info{
  19.         global $mosConfig_absolute_path;
  20.         ?>
  21.         <table class="adminform" border="1">
  22.         <tr>
  23.             <th colspan="2" class="title">
  24.             <?php echo T_('Mambo Updates')?>
  25.             </th>
  26.         </tr>
  27.         <tr>
  28.             <td colspan="2">
  29.                 <table width="100%">
  30.                 <tr>
  31.                     <td>
  32.                     <?php //Load local install version file
  33.                     if (file_exists($mosConfig_absolute_path '/administrator/components/com_admin/version.xml')) {
  34.                            $local simplexml_load_file($mosConfig_absolute_path '/administrator/components/com_admin/version.xml');
  35.                     else {
  36.                            exit("Failed to open $mosConfig_absolute_path . '/administrator/components/com_admin/version.xml'.");
  37.                     }
  38.  
  39.                     //Load server version file
  40.                     if (@fopen("http://source.mambo-foundation.org/external/config/main_version.xml""r")) {
  41.                         $server simplexml_load_file('http://source.mambo-foundation.org/external/config/main_version.xml');
  42.                     else {
  43.                            exit('Failed to open main_version.xml on The Source (source.mambo-foundation.org).');
  44.                     }
  45.  
  46.                     //Build output & check version
  47.                     echo '<strong>' T_('Mambo Version Information'':</strong><BR />';
  48.                     if ($local->version == $server->version{
  49.                         echo T_('Your Mambo version is up to date''<BR />';
  50.                         echo T_('The current stable version is'" <strong>$server->version</strong><BR />";
  51.                     }
  52.                     else {
  53.                         echo T_('Your Mambo version is out of date.  We recommend you'"<a href='http://source.mambo-foundation.org/component/option,com_remository/Itemid,2/func,select/id,8/'>" ' ' T_('upgrade''</a>.<BR />';
  54.                         echo T_('The current stable version is'" <strong>$server->version</strong><BR />";
  55.                         echo T_('Your version is'" <strong>$local->version</strong><BR />";
  56.                     }
  57.                     //Check patch
  58.                     echo  '<BR /><strong>' T_('Mambo Security Patch Information'':</strong><BR />';
  59.                     if ($server->patch == ''{
  60.                         echo T_('No patches have been released''<BR />';
  61.                     }
  62.                     elseif ($local->patch == $server->patch{
  63.                         echo T_('Your Mambo install has the latest recommended patch''<BR />';
  64.                         echo T_('The recommended patch level is'": <strong>$local->patch</strong><BR />";
  65.                     
  66.                     else {
  67.                         echo T_('Your Mambo install does not have the latest recommended security patch.  We recommend you apply the latest'"<a href='http://source.mambo-foundation.org/component/option,com_remository/Itemid,2/func,select/id,8/'>" ' ' T_('patch''</a>.<BR />';
  68.                         echo T_('The recommended patch level is'": <strong>$server->patch</strong><BR />";
  69.                         if ($local->patch == ''{
  70.                           echo T_('Your patch level is'': <strong>' T_('No patches applied''</strong><BR />';
  71.                         
  72.                         else {
  73.                           echo T_('Your patch level is'": <strong>$local->patch</strong><BR />";
  74.                         }
  75.                     }
  76.                     //Check messages
  77.                     echo '<BR /><strong>' T_('Additional Messages'':</strong><BR />';
  78.                     if ($server->message == ''){
  79.                         echo T_('There are no messages at this time');
  80.                     }
  81.                     else {
  82.                         print $server->message;
  83.                     ?>
  84.                     </td>
  85.                 </tr>
  86.                     <tr>
  87.             <th colspan="2" class="title">
  88.             </th>
  89.         </tr>
  90.         </table>
  91.     <?php 
  92.     
  93.     /**
  94.     * Control panel
  95.     */
  96.     function controlPanel({
  97.         global $mosConfig_absolute_path$mainframe;
  98.         ?>
  99.         <table class="adminheading" border="0">
  100.         <tr>
  101.             <th class="cpanel">
  102.             <?php echo T_('Home'?>
  103.             </th>
  104.         </tr>
  105.         </table>
  106.         <table width="100%" class="adminheading">
  107.         <tr>
  108.         <?php if($_SESSION['simple_editing'== 'on' )
  109.         {
  110.             $_SESSION['simple_editing''on';
  111.         ?>
  112.         <td align="left" width="20%">&nbsp;</td><td align="left" ><a class="selected" href="index2.php?option=simple_mode" title="<?php echo T_('Simple Mode'?> (<?php echo T_('selected'?>)"><?php echo T_('Simple Mode'?></a> / <a class="unselected" href="index2.php?option=advanced_mode" title="<?php echo T_('Advanced Mode'?> (<?php echo T_('unselected'?>)"><?php echo T_('Advanced Mode'?></a></td>
  113.         <?php }else{
  114.             $_SESSION['simple_editing''off';
  115.         ?>
  116.         <td align="left" width="20%">&nbsp;</td><td align="left" ><a class="unselected"href="index2.php?option=simple_mode" title="<?php echo T_('Simple Mode'?> (<?php echo T_('unselected'?>)" ><?php echo T_('Simple Mode'?></a> / <a class="selected" href="index2.php?option=advanced_mode" title="<?php echo T_('Advanced Mode'?> (<?php echo T_('selected'?>)"><?php echo T_('Advanced Mode'?></a></td>
  117.         <?php }?>
  118.         </tr>
  119.         </table>
  120.         <?php
  121.         $path $mosConfig_absolute_path '/administrator/templates/' $mainframe->getTemplate('/cpanel.php';
  122.         if (file_exists$path )) {
  123.             require $path;
  124.         else {
  125.             echo '<br />';
  126.             mosLoadAdminModules'cpanel');
  127.         }
  128.     }
  129.  
  130.     function get_php_setting($val{
  131.         $r =  (ini_get($val== '1' 0);
  132.         return $r 'ON' 'OFF';
  133.     }
  134.  
  135.     function get_server_software({
  136.         if (isset($_SERVER['SERVER_SOFTWARE'])) {
  137.             return $_SERVER['SERVER_SOFTWARE'];
  138.         else if (($sf getenv('SERVER_SOFTWARE'))) {
  139.             return $sf;
  140.         else {
  141.             return 'n/a';
  142.         }
  143.     }
  144.  
  145.     function system_info$version {
  146.         global $mosConfig_absolute_path$database;
  147.         //$tab = mosGetParam( $_REQUEST, 'tab', 'tab1' );
  148.         $width 400;    // width of 100%
  149.         $tabs new mosTabs(0);
  150.         ?>
  151.  
  152.         <table class="adminheading">
  153.         <tr>
  154.             <th class="info">
  155.             <?php echo T_('Information'?>
  156.             </th>
  157.         </tr>
  158.         </table>
  159.         <?php
  160.         $tabs->startPane("sysinfo");
  161.         $tabs->startTab(T_("System Info"),"system-page");
  162.         ?>
  163.         <table class="adminform">
  164.         <tr>
  165.             <th colspan="2">
  166.             <?php echo T_('System Information'?>
  167.             </th>
  168.         </tr>
  169.         <tr>
  170.             <td valign="top" width="250">
  171.             <b>
  172.             <?php echo T_('PHP built On:'?>
  173.             </b>
  174.             </td>
  175.             <td>
  176.             <?php echo php_uname()?>
  177.             </td>
  178.         </tr>
  179.         <tr>
  180.             <td>
  181.             <b>
  182.             <?php echo T_('Database Version:'?>
  183.             </b>
  184.             </td>
  185.             <td>
  186.             <?php echo mysql_get_server_info()?>
  187.             </td>
  188.         </tr>
  189.         <tr>
  190.             <td>
  191.             <b>
  192.             <?php echo T_('PHP Version:'?>
  193.             </b>
  194.             </td>
  195.             <td>
  196.             <?php echo phpversion()?>
  197.             </td>
  198.         </tr>
  199.         <tr>
  200.             <td>
  201.             <b>
  202.             <?php echo T_('Web Server:'?>
  203.             </b>
  204.             </td>
  205.             <td>
  206.             <?php echo HTML_admin_misc::get_server_software()?>
  207.             </td>
  208.         </tr>
  209.         <tr>
  210.             <td>
  211.             <b>
  212.             <?php echo T_('WebServer to PHP interface:'?>
  213.             </b>
  214.             </td>
  215.             <td>
  216.             <?php echo php_sapi_name()?>
  217.             </td>
  218.         </tr>
  219.         <tr>
  220.             <td>
  221.             <b>
  222.             <?php echo T_('Mambo Version:'?>
  223.             </b>
  224.             </td>
  225.             <td>
  226.             <?php echo $version?>
  227.             </td>
  228.         </tr>
  229.         <tr>
  230.             <td>
  231.             <b>
  232.             <?php echo T_('User Agent:'?>
  233.             </b>
  234.             </td>
  235.             <td>
  236.             <?php echo phpversion(<= "4.2.1" getenv"HTTP_USER_AGENT" $_SERVER['HTTP_USER_AGENT'];?>
  237.             </td>
  238.         </tr>
  239.         <tr>
  240.             <td valign="top">
  241.             <b>
  242.             <?php echo T_('Relevant PHP Settings:'?>
  243.             </b>
  244.             </td>
  245.             <td>
  246.                 <table cellspacing="1" cellpadding="1" border="0">
  247.                 <tr>
  248.                     <td>
  249.                     <?php echo T_('Safe Mode:'?>
  250.                     </td>
  251.                     <td>
  252.                     <?php echo HTML_admin_misc::get_php_setting('safe_mode')?>
  253.                     </td>
  254.                 </tr>
  255.                 <tr>
  256.                     <td>
  257.                     <?php echo T_('Open basedir:'?>
  258.                     </td>
  259.                     <td>
  260.                     <?php echo (($ob ini_get('open_basedir')) $ob 'none')?>
  261.                     </td>
  262.                 </tr>
  263.                 <tr>
  264.                     <td>
  265.                     <?php echo T_('Display Errors:'?>
  266.                     </td>
  267.                     <td>
  268.                     <?php echo HTML_admin_misc::get_php_setting('display_errors')?>
  269.                     </td>
  270.                 </tr>
  271.                 <tr>
  272.                     <td>
  273.                     <?php echo T_('Short Open Tags:'?>
  274.                     </td>
  275.                     <td>
  276.                     <?php echo HTML_admin_misc::get_php_setting('short_open_tag')?>
  277.                     </td>
  278.                 </tr>
  279.                 <tr>
  280.                     <td>
  281.                     <?php echo T_('File Uploads:'?>
  282.                     </td>
  283.                     <td>
  284.                     <?php echo HTML_admin_misc::get_php_setting('file_uploads')?>
  285.                     </td>
  286.                 </tr>
  287.                 <tr>
  288.                     <td>
  289.                     <?php echo T_('Magic Quotes'?>:
  290.                     </td>
  291.                     <td>
  292.                     <?php echo HTML_admin_misc::get_php_setting('magic_quotes_gpc')?>
  293.                     </td>
  294.                 </tr>
  295.                 <tr>
  296.                     <td>
  297.                     <?php echo T_('Register Globals:'?>
  298.                     </td>
  299.                     <td>
  300.                     <?php echo HTML_admin_misc::get_php_setting('register_globals')?>
  301.                     </td>
  302.                 </tr>
  303.                 <tr>
  304.                     <td>
  305.                     <?php echo T_('Output Buffering:'?>
  306.                     </td>
  307.                     <td>
  308.                     <?php echo HTML_admin_misc::get_php_setting('output_buffering')?>
  309.                     </td>
  310.                 </tr>
  311.                 <tr>
  312.                     <td>
  313.                     <?php echo T_('Session save path:'?>
  314.                     </td>
  315.                     <td>
  316.                     <?php echo (($sp=ini_get('session.save_path'))?$sp:'none')?>
  317.                     </td>
  318.                 </tr>
  319.                 <tr>
  320.                     <td>
  321.                     <?php echo T_('Session auto start:'?>
  322.                     </td>
  323.                     <td>
  324.                     <?php echo intvalini_get'session.auto_start' ) )?>
  325.                     </td>
  326.                 </tr>
  327.                 <tr>
  328.                     <td>
  329.                     <?php echo T_('XML enabled:'?>
  330.                     </td>
  331.                     <td>
  332.                     <?php echo extension_loaded('xml')?'Yes':'No'?>
  333.                     </td>
  334.                 </tr>
  335.                 <tr>
  336.                     <td>
  337.                     <?php echo T_('Zlib enabled:'?>
  338.                     </td>
  339.                     <td>
  340.                     <?php echo extension_loaded('zlib')?'Yes':'No'?>
  341.                     </td>
  342.                 </tr>
  343.                 <tr>
  344.                     <td>
  345.                     <?php echo T_('Disabled Functions:'?>
  346.                     </td>
  347.                     <td>
  348.                     <?php echo (($df=ini_get('disable_functions'))?$df:'none')?>
  349.                     </td>
  350.                 </tr>
  351.                 <?php
  352.                 $query "SELECT name FROM #__mambots"
  353.                 . "\nWHERE folder='editors' AND published='1'"
  354.                 . "\nLIMIT 1";
  355.                 $database->setQuery$query );
  356.                 $editor $database->loadResult();
  357.                 ?>
  358.                 <tr>
  359.                     <td>
  360.                     <?php echo T_('WYSIWYG Editor:'?>
  361.                     </td>
  362.                     <td>
  363.                     <?php echo $editor?>
  364.                     </td>
  365.                 </tr>
  366.                 </table>
  367.             </td>
  368.         </tr>
  369.         <tr>
  370.             <td valign="top">
  371.             <b>
  372.             <?php echo T_('Configuration File:'?>
  373.             </b>
  374.             </td>
  375.             <td>
  376.             <?php
  377.             $cf file$mosConfig_absolute_path '/configuration.php' );
  378.             foreach ($cf as $k=>$v{
  379.                 if (eregi'mosConfig_host'$v)) {
  380.                     $cf[$k'$mosConfig_host = \'xxxxxx\'';
  381.                 else if (eregi'mosConfig_user'$v)) {
  382.                     $cf[$k'$mosConfig_user = \'xxxxxx\'';
  383.                 else if (eregi'mosConfig_password'$v)) {
  384.                     $cf[$k'$mosConfig_password = \'xxxxxx\'';
  385.                 else if (eregi'mosConfig_db '$v)) {
  386.                     $cf[$k'$mosConfig_db = \'xxxxxx\'';
  387.                 else if (eregi'<?php'$v)) {
  388.                     $cf[$k'&lt;?php';
  389.                 }
  390.             }
  391.             echo implode"<br />"$cf );
  392.             ?>
  393.             </td>
  394.         </tr>
  395.         </table>
  396.         <?php
  397.         $tabs->endTab();
  398.         $tabs->startTab(T_("PHP Info"),"php-page");
  399.         ?>
  400.         <table class="adminform">
  401.         <tr>
  402.             <th colspan="2">
  403.             <?php echo T_('PHP Information'?>
  404.             </th>
  405.         </tr>
  406.         <tr>
  407.             <td>
  408.             <?php
  409.             ob_start();
  410.             phpinfo(INFO_GENERAL INFO_CONFIGURATION INFO_MODULES);
  411.             $phpinfo ob_get_contents();
  412.             ob_end_clean();
  413.             preg_match_all('#<body[^>]*>(.*)</body>#siU'$phpinfo$output);
  414.             $output preg_replace('#<table#''<table class="adminlist" align="center"'$output[1][0]);
  415.             $output preg_replace('#(\w),(\w)#''\1, \2'$output);
  416.             $output preg_replace('#border="0" cellpadding="3" width="600"#''border="0" cellspacing="1" cellpadding="4" width="95%"'$output);
  417.             $output preg_replace('#<hr />#'''$output);
  418.             echo $output;
  419.             ?>
  420.             </td>
  421.         </tr>
  422.         </table>
  423.         <?php
  424.         $tabs->endTab();
  425.         $tabs->startTab(T_('Permissions'),'perms');
  426.         ?>
  427.         <table class="adminform">
  428.           <tr>
  429.             <th colspan="2"> <?php echo T_('Directory Permissions'?></th>
  430.           </tr>
  431.           <tr>
  432.             <td>
  433.         <strong><?php echo T_('For all Mambo functions and features to work ALL of the following directories should be writeable:'?></strong>
  434.             <?php
  435. mosHTML::writableCell'administrator/backups' );
  436. mosHTML::writableCell'administrator/components' );
  437. mosHTML::writableCell'administrator/modules' );
  438. mosHTML::writableCell'administrator/templates' );
  439. mosHTML::writableCell'cache' );
  440. mosHTML::writableCell'components' );
  441. mosHTML::writableCell'images' );
  442. mosHTML::writableCell'images/banners' );
  443. mosHTML::writableCell'images/stories' );
  444. mosHTML::writableCell'language' );
  445. mosHTML::writableCell'mambots' );
  446. mosHTML::writableCell'mambots/content' );
  447. mosHTML::writableCell'mambots/editors' );
  448. mosHTML::writableCell'mambots/editors-xtd' );
  449. mosHTML::writableCell'mambots/search' );
  450. mosHTML::writableCell'media' );
  451. mosHTML::writableCell'modules' );
  452. mosHTML::writableCell'templates' );
  453.  
  454. ?>
  455.  
  456.             </td>
  457.           </tr>
  458.         </table>
  459.         <?php
  460.         $tabs->endTab();
  461.         $tabs->endPane();
  462.         ?>
  463.         <?php
  464.     }
  465.  
  466.     function ListComponents({
  467.             mosLoadAdminModule'components' );
  468.         }
  469.  
  470.     /**
  471.     * Display Help Page
  472.     */
  473.     function help({
  474.         global $mosConfig_live_site;
  475.         $helpurl mosGetParam$GLOBALS'mosConfig_helpurl''' );
  476.         $helpurl false;
  477.         $fullhelpurl $helpurl '/index2.php?option=com_content&amp;task=findkey&pop=1&keyref=';
  478.         $fullhelpurl $mosConfig_live_site.'/help/';
  479.  
  480.         $helpsearch mosGetParam$_REQUEST'helpsearch''' );
  481.         $page         mosGetParam$_REQUEST'page''mambo.whatsnew.html' );
  482.         $toc         getHelpToc$helpsearch );
  483.         if (!eregi'\.html$'$page )) {
  484.             $page .= '.xml';
  485.         }
  486.         ?>
  487.         <style type="text/css">
  488.         .helpIndex {
  489.             border: 0px;
  490.             width: 95%;
  491.             height: 100%;
  492.             padding: 0px 5px 0px 10px;
  493.             overflow: auto;
  494.         }
  495.         .helpFrame {
  496.             border-left: 0px solid #222;
  497.             border-right: none;
  498.             border-top: none;
  499.             border-bottom: none;
  500.             width: 100%;
  501.             height: 700px;
  502.             padding: 0px 5px 0px 10px;
  503.         }
  504.         </style>
  505.         <form name="adminForm" action="">
  506.         <table class="adminform" border="1">
  507.         <tr>
  508.             <th colspan="2" class="title">
  509.             <?php echo T_('Help'?>
  510.             </th>
  511.         </tr>
  512.         <tr>
  513.             <td colspan="2">
  514.                 <table width="100%">
  515.                 <tr>
  516.                     <td>
  517.                     <strong><?php echo T_('Search:'?></strong>
  518.                     <input class="text_area" type="hidden" name="option" value="com_admin" />
  519.                     <input type="text" name="helpsearch" value="<?php echo $helpsearch;?>" class="inputbox" />
  520.                     <input type="submit" value="<?php echo T_('Go'?>" class="button" />
  521.                     <input type="button" value="<?php echo T_('Clear Results'?>" class="button" onclick="f=document.adminForm;f.helpsearch.value='';f.submit()" />
  522.                     </td>
  523.                     <td style="text-align:right">
  524.                     <?php
  525.                     if ($helpurl{
  526.                     ?>
  527.                     <a href="<?php echo $fullhelpurl;?>mambo.glossary" target="helpFrame">
  528.                         <?php echo T_('Glossary'?></a>
  529.                     |
  530.                     <a href="<?php echo $fullhelpurl;?>mambo.credits" target="helpFrame">
  531.                         <?php echo T_('Credits'?></a>
  532.                     |
  533.                     <a href="<?php echo $fullhelpurl;?>mambo.support" target="helpFrame">
  534.                         <?php echo T_('Support'?></a>
  535.                     <?php
  536.                     else {
  537.                     ?>
  538.                     <a href="<?php echo $mosConfig_live_site;?>/help/mambo.glossary.html" target="helpFrame">
  539.                         <?php echo T_('Glossary'?></a>
  540.                     |
  541.                     <a href="<?php echo $mosConfig_live_site;?>/help/mambo.credits.html" target="helpFrame">
  542.                         <?php echo T_('Credits'?></a>
  543.                     |
  544.                     <a href="<?php echo $mosConfig_live_site;?>/help/mambo.support.html" target="helpFrame">
  545.                         <?php echo T_('Support'?></a>
  546.                     <?php
  547.                     }
  548.                     ?>
  549.                     |
  550.                     <a href="http://www.gnu.org/copyleft/gpl.html" target="helpFrame">
  551.                         <?php echo T_('License'?></a>
  552.                     |
  553.                     <a href="http://docs.mambo-foundation.org" target="_blank">
  554.                         docs.mambo-foundation.org</a>
  555.                     |
  556.                     <a href="<?php echo $mosConfig_live_site;?>/administrator/index2.php?option=com_admin&task=sysinfo&no_html=1" target="helpFrame">
  557.                         <?php echo T_('System Info'?></a>
  558.                     </td>
  559.                 </tr>
  560.                 </table>
  561.             </td>
  562.         </tr>
  563.         <tr valign="top">
  564.             <td width="20%" valign="top">
  565.             <?php if ($helpsearch):?>
  566.                 <strong><?php echo T_('Search Results'?></strong>
  567.             <?php else :?>
  568.                 <strong><?php echo T_('Index'?></strong>
  569.             <?php endif;?>
  570.                 <div class="helpIndex">
  571.                 <?php
  572.                 foreach ($toc as $k=>$v{
  573.                     if ($helpurl{
  574.                         echo '<br /><a href="' $fullhelpurl urlencode$k '" target="helpFrame">' $v '</a>';
  575.                     else {
  576.                         echo '<br /><a href="' $mosConfig_live_site '/help/' $k '" target="helpFrame">' $v '</a>';
  577.                     }
  578.                 }
  579.                 ?>
  580.                 </div>
  581.             </td>
  582.             <td valign="top">
  583.                 <iframe name="helpFrame" src="<?php echo $mosConfig_live_site '/help/' $page;?>" class="helpFrame" frameborder="0" /></iframe>
  584.             </td>
  585.         </tr>
  586.         </table>
  587.  
  588.         <input type="hidden" name="task" value="help" />
  589.         </form>
  590.         <?php
  591.     }
  592.  
  593.     /**
  594.     * Preview site
  595.     */
  596.     function preview$tp={
  597.         global $mosConfig_live_site;
  598.         $tp intval$tp );
  599.         ?>
  600.         <style type="text/css">
  601.         .previewFrame {
  602.             border: none;
  603.             width: 95%;
  604.             height: 600px;
  605.             padding: 0px 5px 0px 10px;
  606.         }
  607.         </style>
  608.         <table class="adminform">
  609.         <tr>
  610.             <th width="50%" class="title">
  611.             <?php echo T_('Site Preview'?>
  612.             </th>
  613.             <th width="50%" style="text-align:right">
  614.             <a href="<?php echo $mosConfig_live_site '/index.php?tp=' $tp;?>" target="_blank">
  615.             <?php echo T_('Open in new window'?>
  616.             </a>
  617.             </th>
  618.         </tr>
  619.         <tr>
  620.             <td width="100%" valign="top" colspan="2">
  621.             <iframe name="previewFrame" src="<?php echo $mosConfig_live_site '/index.php?tp=' $tp;?>" class="previewFrame" /></iframe>
  622.             </td>
  623.         </tr>
  624.         </table>
  625.         <?php
  626.     }
  627. }
  628.  
  629. /**
  630.  * Compiles the help table of contents
  631.  * @param string A specific keyword on which to filter the resulting list
  632.  */
  633. function getHelpTOC$helpsearch {
  634.     global $mosConfig_absolute_path;
  635.     $helpurl mosGetParam$GLOBALS'mosConfig_helpurl''' );
  636.     $helpurl mamboCore::get('mosConfig_live_site');
  637.  
  638.     $files mosReadDirectory$mosConfig_absolute_path '/help/''\.xml$|\.html$' );
  639.  
  640.     $toc array();
  641.     foreach ($files as $file{
  642.         $buffer file_get_contents$mosConfig_absolute_path '/help/' $file );
  643.         if (preg_match'#<title>(.*?)</title>#'$buffer$m )) {
  644.             $title trim$m[1);
  645.             if ($title{
  646.                 if ($helpurl{
  647.                     // strip the extension
  648.                     #$file = preg_replace( '#\.xml$|\.html$#', '', $file );
  649.                 }
  650.                 if ($helpsearch{
  651.                     if (striposstrip_tags$buffer )$helpsearch !== false{
  652.                         $toc[$file$title;
  653.                     }
  654.                 else {
  655.                     $toc[$file$title;
  656.                 }
  657.             }
  658.         }
  659.     }
  660.     asort$toc );
  661.     return $toc;
  662. }
  663. ?>

Documentation generated on Mon, 05 May 2008 16:12:32 +0400 by phpDocumentor 1.4.0