Esempio n. 1
0
    /**
     * Displays the HTML for this page, directly outputting it to the browser
     */
    function echoHTML()
    {
        $configuration =& JoomlapackConfiguration::getInstance();
        // Show top header
        echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_CONFIG'));
        echo "<p align=\"center\">" . JoomlapackLangManager::_('CONFIG_FILESTATUS') . ' ' . JoomlapackCommonHTML::colorizeWriteStatus($configuration->isConfigurationWriteable(), true) . "</p>";
        $this->echoAJAXJS();
        ?>
		<form action="index2.php" method="post" name="adminForm">
			<input type="hidden" name="option" value="<?php 
        echo JoomlapackAbstraction::getParam('option', 'com_joomlapack');
        ?>
" />
			<input type="hidden" name="act" value="config" />
			<input type="hidden" name="task" value="" />
			
			<table border="0" cellpadding="0" cellspacing="0" width="95%" class="adminform">
			<tr><td>
		<?php 
        if (!defined('_JEXEC')) {
            $tabs = new mosTabs(1);
            $tabs->startPane(1);
            $tabs->startTab(JoomlapackLangManager::_('CONFIG_BASIC_OPTIONS'), 'jpconfigbasic');
        } else {
            jimport('joomla.html.pane');
            $tabs =& JPane::getInstance('sliders');
            echo $tabs->startPane('jpconfig');
            echo $tabs->startPanel(JoomlapackLangManager::_('CONFIG_BASIC_OPTIONS'), 'jpconfigbasic');
        }
        ?>
			<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">
				<tr align="center" valign="middle">
					<th width="20%">&nbsp;</th>
					<th width="20%"><?php 
        echo JoomlapackLangManager::_('CONFIG_OPTION');
        ?>
</th>
					<th width="60%"><?php 
        echo JoomlapackLangManager::_('CONFIG_CURSETTINGS');
        ?>
</th>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('COMMON_OUTDIR');
        ?>
</td>
					<td><input type="text" name="outdir" id="outdir" size="40" value="<?php 
        echo $configuration->OutputDirectory;
        ?>
" />
					<input type="button" value="<?php 
        echo JoomlapackLangManager::_('CONFIG_DEFAULTDIR');
        ?>
" onclick="getDefaultOutputDirectory();" />
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('COMMON_TEMPDIR');
        ?>
</td>
					<td><input type="text" name="tempdir" id="tempdir" size="40" value="<?php 
        echo $configuration->get('TempDirectory');
        ?>
" />
					<input type="button" value="<?php 
        echo JoomlapackLangManager::_('CONFIG_DEFAULTDIR');
        ?>
" onclick="getDefaultTempDirectory();" />
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_TARNAME');
        ?>
</td>
					<td><input type="text" name="tarname" size="40" value="<?php 
        echo $configuration->TarNameTemplate;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_LOGLEVEL');
        ?>
</td>
					<td><?php 
        $this->outputLogLevel($configuration->logLevel);
        // @todo Use common function
        ?>
</td>
				</tr>
			</table>
		<?php 
        if (!defined('_JEXEC')) {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('CONFIG_ADVANCED'), 'jpconfigadvanced');
        } else {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('CONFIG_ADVANCED'), 'jpconfigadvanced');
        }
        ?>
			<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">	
				<tr align="center" valign="middle">
					<th width="20%">&nbsp;</th>
					<th width="20%"><?php 
        echo JoomlapackLangManager::_('CONFIG_OPTION');
        ?>
</th>
					<th width="60%"><?php 
        echo JoomlapackLangManager::_('CONFIG_CURSETTINGS');
        ?>
</th>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_SQLCOMPAT');
        ?>
</td>
					<td><?php 
        $this->outputSQLCompat($configuration->MySQLCompat);
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_DBA_LABEL');
        ?>
</td>
					<td><?php 
        $this->AlgorithmChooser($configuration->dbAlgorithm, "dbAlgorithm");
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_PA_LABEL');
        ?>
</td>
					<td><?php 
        $this->AlgorithmChooser($configuration->packAlgorithm, "packAlgorithm");
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_LISTERENGINE');
        ?>
</td>
					<td><?php 
        $this->outputEngineSelector('listerengine', 'lister', $configuration->get('listerengine'));
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_DBDUMPENGINE');
        ?>
</td>
					<td><?php 
        $this->outputEngineSelector('dbdumpengine', 'dumper', $configuration->get('dbdumpengine'));
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_PACKERENGINE');
        ?>
</td>
					<td><?php 
        $this->outputEngineSelector('packerengine', 'packer', $configuration->get('packerengine'));
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_ALTINSTALLER');
        ?>
</td>
					<td><?php 
        $this->AltInstallerChooser($configuration->InstallerPackage);
        ?>
</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_BACKUPMETHOD');
        ?>
</td>
					<td><?php 
        $this->backupMethodChooser($configuration->backupMethod);
        ?>
				</tr>
			</table>	
		<?php 
        if (!defined('_JEXEC')) {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('CONFIG_FRONTEND'), 'jpconfigfrontend');
        } else {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('CONFIG_FRONTEND'), 'jpconfigfrontend');
        }
        ?>
			<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">	
				<tr align="center" valign="middle">
					<th width="20%">&nbsp;</th>
					<th width="20%"><?php 
        echo JoomlapackLangManager::_('CONFIG_OPTION');
        ?>
</th>
					<th width="60%"><?php 
        echo JoomlapackLangManager::_('CONFIG_CURSETTINGS');
        ?>
</th>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_ENABLEFEB');
        ?>
</td>
					<td><input name="enableFrontend" type="checkbox" <?php 
        echo $configuration->enableFrontend ? 'checked' : '';
        ?>
 /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_SECRETPROMPT');
        ?>
</td>
					<td><input name="secretWord" type="text" size="30" maxlength="30" value="<?php 
        echo $configuration->secretWord;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_SECRETINFO1');
        ?>
<br />
					<?php 
        echo $this->makeFEBURL();
        ?>
					</td>
				</tr>
			</table>
		<?php 
        if (!defined('_JEXEC')) {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('CONFIG_MAGIC'), 'jpconfigmagic');
        } else {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('CONFIG_MAGIC'), 'jpconfigmagic');
        }
        ?>
			<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">	
				<tr align="center" valign="middle">
					<th width="20%">&nbsp;</th>
					<th width="20%"><?php 
        echo JoomlapackLangManager::_('CONFIG_OPTION');
        ?>
</th>
					<th width="60%"><?php 
        echo JoomlapackLangManager::_('CONFIG_CURSETTINGS');
        ?>
</th>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNROWSPERSTEP');
        ?>
</td>
					<td><input name="mnRowsPerStep" type="text" value="<?php 
        echo $configuration->mnRowsPerStep;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNMAXFRAGMENTSIZE');
        ?>
</td>
					<td><input name="mnMaxFragmentSize" type="text" value="<?php 
        echo $configuration->mnMaxFragmentSize;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNMAXFRAGMENTFILES');
        ?>
</td>
					<td><input name="mnMaxFragmentFiles" type="text" value="<?php 
        echo $configuration->mnMaxFragmentFiles;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNZIPFORCEOPEN');
        ?>
</td>
					<td><input name="mnZIPForceOpen" type="checkbox" <?php 
        echo $configuration->mnZIPForceOpen ? 'checked' : '';
        ?>
 /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNZIPCOMPRESSIONTHRESHOLD');
        ?>
</td>
					<td><input name="mnZIPCompressionThreshold" type="text" value="<?php 
        echo $configuration->mnZIPCompressionThreshold;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNZIPDIRREADCHUNK');
        ?>
</td>
					<td><input name="mnZIPDirReadChunk" type="text" value="<?php 
        echo $configuration->mnZIPDirReadChunk;
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNMAXEXECTIMEALLOWED');
        ?>
</td>
					<td><input name="mnMaxExecTimeAllowed" type="text" value="<?php 
        echo $configuration->get('mnMaxExecTimeAllowed');
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNMINIMUMEXECTIME');
        ?>
</td>
					<td><input name="mnMinimumExectime" type="text" value="<?php 
        echo $configuration->get('mnMinimumExectime');
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MNEXECTIMEBIASPERCENT');
        ?>
</td>
					<td><input name="mnExectimeBiasPercent" type="text" value="<?php 
        echo $configuration->get('mnExectimeBiasPercent');
        ?>
" /></td>
				</tr>				
			</table>
		<?php 
        if (!defined('_JEXEC')) {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('CONFIG_MYSQLDUMP'), 'jpconfigmysqldump');
        } else {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('CONFIG_MYSQLDUMP'), 'jpconfigmysqldump');
        }
        ?>
				<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">	
				<tr align="center" valign="middle">
					<th width="20%">&nbsp;</th>
					<th width="20%"><?php 
        echo JoomlapackLangManager::_('CONFIG_OPTION');
        ?>
</th>
					<th width="60%"><?php 
        echo JoomlapackLangManager::_('CONFIG_CURSETTINGS');
        ?>
</th>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MYSQLDUMP_PATH');
        ?>
</td>
					<td><input name="mysqldumpPath" type="text" value="<?php 
        echo $configuration->get('mysqldumpPath');
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MYSQLDUMP_DATACHUNK');
        ?>
</td>
					<td><input name="mnMSDDataChunk" type="text" value="<?php 
        echo $configuration->get('mnMSDDataChunk');
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MYSQLDUMP_MAXQUERYLINES');
        ?>
</td>
					<td><input name="mnMSDMaxQueryLines" type="text" value="<?php 
        echo $configuration->get('mnMSDMaxQueryLines');
        ?>
" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><?php 
        echo JoomlapackLangManager::_('CONFIG_MYSQLDUMP_LINESPERSESSION');
        ?>
</td>
					<td><input name="mnMSDLinesPerSession" type="text" value="<?php 
        echo $configuration->get('mnMSDLinesPerSession');
        ?>
" /></td>
				</tr>
				</table>
		<?php 
        if (!defined('_JEXEC')) {
            $tabs->endTab();
            $tabs->endPane();
        } else {
            echo $tabs->endPanel();
            echo $tabs->endPane();
        }
        ?>
			</td></tr></table>
			</form>
		<?php 
    }
Esempio n. 2
0
    /**
     * Renders the JoomlaPack's overview tabbed pane
     */
    function _getTabsHTML()
    {
        // Get some status information
        $config =& JoomlapackConfiguration::getInstance();
        $this->_isOutWritable = $config->isOutputWriteable();
        $this->_isTempWritable = $config->isTempWriteable();
        $this->_isStatusGood = $this->_isOutWritable && $this->_isTempWritable;
        $this->_defaultDirs = realpath($config->OutputDirectory) == realpath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup') || realpath($config->TempDirectory) == realpath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup');
        if (defined('_JEXEC')) {
            jimport('joomla.html.pane');
            $tabs =& JPane::getInstance('sliders');
            echo $tabs->startPane('jpstatuspane');
        } else {
            $tabs = new mosTabs(1);
            $tabs->startPane('jpstatuspane');
        }
        if (defined('_JEXEC')) {
            echo $tabs->startPanel(JoomlapackLangManager::_('MAIN_OVERVIEW'), 'jpstatusov');
        } else {
            $tabs->startTab(JoomlapackLangManager::_('MAIN_OVERVIEW'), 'jpstatusov');
        }
        echo '<p class="sanityCheck">' . JoomlapackLangManager::_('MAIN_STATUS') . ': ';
        echo JoomlapackCommonHTML::colorizeWriteStatus($this->_isStatusGood, true, 'appgood', 'appnotgood', 'main') . '</p>';
        // --- START --- Detect use of default temp directory
        if ($this->_defaultDirs) {
            echo '<p class="sanityCheck">' . JoomlapackLangManager::_('MAIN_WARNING') . '<br/>';
            echo '<a href="http://www.joomlapack.net/index.php?option=com_content&id=75">' . JoomlapackLangManager::_('MAIN_WARNING_INFO') . '</a></p>';
        }
        // --- END ---
        if (defined('_JEXEC')) {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('MAIN_DETAILS'), 'jpstatusdet');
        } else {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('MAIN_DETAILS'), 'jpstatusdet');
        }
        // Populate side panel
        $item = JoomlapackLangManager::_('MAIN_ITEM');
        $status = JoomlapackLangManager::_('MAIN_STATUS');
        $tempDir = JoomlapackLangManager::_('COMMON_TEMPDIR');
        $tempStatus = JoomlapackCommonHTML::colorizeWriteStatus($this->_isTempWritable, true);
        $outDir = JoomlapackLangManager::_('COMMON_OUTDIR');
        $outStatus = JoomlapackCommonHTML::colorizeWriteStatus($this->_isOutWritable, true);
        $verCheckTitle = JoomlapackLangManager::_('COMMON_VERSION_CHECK');
        $verHTML = $this->checkAppStatusV(strstr(_JP_VERSION, 'SVN') ? 0 : 1);
        echo <<<ENDSNIPPET
\t\t\t<table align="center" border="1" cellspacing="0" cellpadding="5" class="adminlist">
\t\t\t\t<thead>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<th class="title">{$item}</th>
\t\t\t\t\t\t<th>{$status}</th>
\t\t\t\t\t</tr>
\t\t\t\t</thead>
\t\t\t\t<tbody>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$tempDir}</td>
\t\t\t\t\t\t<td>{$tempStatus}</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$outDir}</td>
\t\t\t\t\t\t<td>{$outStatus}</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$verCheckTitle}</td>
\t\t\t\t\t\t<td>{$verHTML}</td>
\t\t\t\t\t</tr>
\t\t\t\t</tbody>
\t\t\t</table>
ENDSNIPPET;
        if (defined('_JEXEC')) {
            echo $tabs->endPanel();
            echo $tabs->startPanel(JoomlapackLangManager::_('MAIN_TRANSLATIONCREDITS'), 'jptranscredits');
        } else {
            $tabs->endTab();
            $tabs->startTab(JoomlapackLangManager::_('MAIN_TRANSLATIONCREDITS'), 'jptranscredits');
        }
        $translationlanglabel = JoomlapackLangManager::_('MAIN_TRANSLATIONLANG');
        $translationlang = JoomlapackLangManager::_('INFO_LANGUAGE');
        $translationverlabel = JoomlapackLangManager::_('MAIN_TRANSLATIONVER');
        $translationver = JoomlapackLangManager::_('INFO_JPVER');
        $translationauthorlabel = JoomlapackLangManager::_('MAIN_TRANSLATIONAUTHOR');
        $translationauthor = JoomlapackLangManager::_('INFO_AUTHOR');
        $trasnlationurllabel = JoomlapackLangManager::_('MAIN_TRANSLATIONURL');
        $trasnlationurl = JoomlapackLangManager::_('INFO_AUTHORURL');
        echo <<<ENDSNIPPET
\t\t\t<table align="center" border="1" cellspacing="0" cellpadding="5" class="adminlist">
\t\t\t\t<thead>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<th class="title">{$item}</th>
\t\t\t\t\t\t<th>{$status}</th>
\t\t\t\t\t</tr>
\t\t\t\t</thead>
\t\t\t\t<tbody>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$translationlanglabel}</td>
\t\t\t\t\t\t<td>{$translationlang}</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$translationverlabel}</td>
\t\t\t\t\t\t<td>{$translationver}</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$translationauthorlabel}</td>
\t\t\t\t\t\t<td>{$translationauthor}</td>
\t\t\t\t\t</tr>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<td>{$trasnlationurllabel}</td>
\t\t\t\t\t\t<td>{$trasnlationurl}</td>
\t\t\t\t\t</tr>
\t\t\t\t</tbody>
\t\t\t</table>
ENDSNIPPET;
        if (defined('_JEXEC')) {
            echo $tabs->endPanel();
            echo $tabs->endPane();
        } else {
            $tabs->endTab();
            $tabs->endPane();
        }
    }