Ejemplo n.º 1
0
 /**
  * Displays the HTML for this page
  * 
  */
 function echoHTML()
 {
     $nohtml = JoomlapackAbstraction::getParam('no_html', 0);
     if ($nohtml == 1) {
         JoomlapackLogger::VisualizeLogDirect();
     } else {
         $configuration =& JoomlapackConfiguration::getInstance();
         $option = JoomlapackAbstraction::getParam('option', 'com_joomlapack');
         // Show top header
         echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('LOG_LOGBANNER'));
         echo "<p><a href=\"index2.php?option={$option}&act=dllog&no_html=1\">" . JoomlapackLangManager::_('LOG_DOWNLOADTEXT') . "</a></p>";
         echo '<iframe src="index2.php?option=' . $option . '&act=log&no_html=1" width="90%" height="400px">';
         echo '</iframe>';
     }
 }
Ejemplo n.º 2
0
    function echoHTML()
    {
        jpimport('helpers.lang');
        $errorStack = array();
        // Initialize an errors stack
        // Cleanup locks
        jpimport('classes.core.cube');
        JoomlapackCUBE::cleanup();
        // Test for the existence of a default temporary folder
        if (!is_dir(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup')) {
            // Temp dir doesn't exist; try to create one
            if (!@mkdir(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup')) {
                $errorStack[] = JoomlapackLangManager::_('UNLOCK_CANTCREATEDIR');
            } else {
                // Try creating a deafult .htaccess
                $htaccess = <<<END
Deny from all
END;
                $fp = @fopen(JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup' . DS . '.htaccess');
                if ($fp === false) {
                    $errorStack[] = JoomlapackLangManager::_('UNLOCK_CANTCREATEHTACCESS');
                } else {
                    @fputs($fp, $htaccess);
                    @fclose($fp);
                }
            }
        }
        // Get some more HTML fragments
        echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_UNLOCK'));
        ?>
		<p>
		<?php 
        if (count($errorStack) == 0) {
            echo JoomlapackLangManager::_('UNLOCK_DONE');
        } else {
            foreach ($errorStack as $error) {
                echo "<p class=\"error\">{$error}</p>";
            }
        }
        ?>
		</p>
		<?php 
    }
Ejemplo n.º 3
0
    function _getItemHTML($item)
    {
        if (!is_null($item['onclick'])) {
            $anchorTags = 'onclick="' . $item['onclick'] . '"';
        } else {
            $anchorTags = 'href="' . $item['link'] . '"';
        }
        $imageHTML = JoomlapackCommonHTML::getImageURI($item['image']);
        $imageHTML = '<img src="' . $imageHTML . '" border="0" width="32" height="32" />';
        $text = $item['text'];
        $out = <<<ENDOFHTML
\t\t\t<div style="float:left;">
\t\t\t\t<div class="icon">
\t\t\t\t\t<a {$anchorTags} >{$imageHTML}<br/>
\t\t\t\t\t<span>{$text}</span>
\t\t\t\t\t</a>
\t\t\t\t</div>
\t\t\t</div>
ENDOFHTML;
        return $out;
    }
Ejemplo n.º 4
0
    function echoHTML()
    {
        jpimport('helpers.lang');
        // Get URL for JavaScript
        $jsURI_pb = JoomlapackAbstraction::SiteURI() . '/administrator/components/' . JoomlapackAbstraction::getParam('option', 'com_joomlapack') . '/assets/js/xp_progress.js';
        // Get some more HTML fragments
        $headingHTML = JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_DBEF'));
        $this->commonSAJAX();
        echo <<<ENDFRAGMENT
\t\t\t<script language="javascript" src="{$jsURI_pb}">
\t\t\t\t// WinXP Progress Bar- By Brian Gosselin- http://www.scriptasylum.com/
\t\t\t</script>
\t\t\t<script language="JavaScript" type="text/javascript">
\t\t\t\t/*
\t\t\t\t * (S)AJAX Library code
\t\t\t\t */
ENDFRAGMENT;
        sajax_show_javascript();
        echo <<<ENDFRAGMENT
\t\t \t\tsajax_fail_handle = SAJAXTrap;
\t\t
\t\t\t\tfunction SAJAXTrap( myData ) {
\t\t\t\t\talert('Invalid AJAX reponse: ' + myData);
\t\t\t\t}
\t\t\t\t\t
\t\t\t\tfunction ToggleFilter( myTable, myID ) {
\t\t\t\t\tvar sCheckStatus = (document.getElementById(myID).checked == true) ? "on" : "off";
\t\t\t
\t\t\t\t\tdocument.getElementById("DBEFScreen").style.display = "none";
\t\t\t\t\tdocument.getElementById("DBEFProgressBar").style.display = "block";
\t\t\t
\t\t\t\t\tx_toggleDBFilter( myTable, sCheckStatus, ToggleFilter_cb );
\t\t\t\t}
\t\t\t
\t\t\t\tfunction ToggleFilter_cb( myRet ) {
\t\t\t\t\tTablesHTML();
\t\t\t\t\tdocument.getElementById("DBEFScreen").style.display = "block";
\t\t\t\t\tdocument.getElementById("DBEFProgressBar").style.display = "none";
\t\t\t\t}
\t\t\t
\t\t\t\tfunction TablesHTML() {
\t\t\t\t\tx_DBSelectionHTML( cb_TablesHTML );
\t\t\t\t}
\t\t\t
\t\t\t\tfunction cb_TablesHTML( myRet ) {
\t\t\t\t\tdocument.getElementById("DBEFScreen").style.display = "block";
\t\t\t\t\tdocument.getElementById("DBEFProgressBar").style.display = "none";
\t\t\t\t\tdocument.getElementById("DBEFOperationList").innerHTML = myRet;
\t\t\t\t}
\t\t\t\t
\t\t\t\tfunction Reset() {
\t\t\t\t\tdocument.getElementById("DBEFScreen").style.display = "none";
\t\t\t\t\tdocument.getElementById("DBEFProgressBar").style.display = "block";
\t\t\t\t\tx_ResetDBEF( ToggleFilter_cb );
\t\t\t\t}
\t\t\t\t
\t\t\t\tfunction FilterNonJ()
\t\t\t\t{
\t\t\t\t\tdocument.getElementById("DBEFScreen").style.display = "none";
\t\t\t\t\tdocument.getElementById("DBEFProgressBar").style.display = "block";
\t\t\t\t\tx_FilterNonJoomlaTables( ToggleFilter_cb );
\t\t\t\t}
\t\t\t</script>
\t\t\t
\t\t\t<div id="DBEFProgressBar" style="display:none;" class="sitePack">
\t\t\t\t<h4>Please wait...</h4>
\t\t\t\t<script type="text/javascript">
\t\t\t\t\tvar bar0 = createBar(320,15,'white',1,'black','blue',85,7,3,"");
\t\t\t\t</script>
\t\t\t</div>
\t\t\t
\t\t\t<div id="DBEFScreen">
\t\t\t\t{$headingHTML}
\t\t\t\t<div id="DBEFOperationList">
\t\t\t\t\t<script type="text/javascript">
\t\t\t\t\t\tTablesHTML();
\t\t\t\t\t</script>
\t\t\t\t</div>
\t\t\t</div>\t\t
ENDFRAGMENT;
    }
Ejemplo n.º 5
0
    /**
     * Displays the page
     *
     */
    function echoHTML()
    {
        jpimport('helpers.lang');
        // Default to site's root folder
        $myRoot = JPATH_SITE;
        $rootArray = explode('\\', $myRoot);
        $myRoot = implode('//', $rootArray);
        // Get URL for JavaScript
        $jsURI_pb = JoomlapackAbstraction::SiteURI() . '/administrator/components/' . JoomlapackAbstraction::getParam('option', 'com_joomlapack') . '/assets/js/xp_progress.js';
        // Get some more HTML fragments
        $headingHTML = JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_SFF'));
        $this->commonSAJAX();
        ?>
			<script language="javascript" src="<?php 
        echo $jsURI_pb;
        ?>
">
				// WinXP Progress Bar- By Brian Gosselin- http://www.scriptasylum.com/
			</script>
			<script language="JavaScript" type="text/javascript">
				/*
				 * (S)AJAX Library code
				 */
				 <?php 
        sajax_show_javascript();
        ?>
		 		sajax_fail_handle = SAJAXTrap;
		
				function SAJAXTrap( myData ) {
					alert('Invalid AJAX reponse: ' + myData);
				}

				 
				 var globRoot;
				 
				function ToggleFilter( myRoot, myFile, myID ) {
					var sCheckStatus = (document.getElementById(myID).checked == true) ? "on" : "off";
			
					globRoot = myRoot;
			
					document.getElementById("DEFScreen").style.display = "none";
					document.getElementById("DEFProgressBar").style.display = "block";
			
					x_toggleFileFilter( myRoot, myFile, sCheckStatus, ToggleFilter_cb );
				}
			
				function ToggleFilter_cb( myRet ) {
					dirSelectionHTML( globRoot );
					document.getElementById("DEFScreen").style.display = "block";
					document.getElementById("DEFProgressBar").style.display = "none";
				}
			
				function dirSelectionHTML( myRoot ) {
					globRoot = myRoot;
					x_sffSelectionHTML( myRoot, cb_dirSelectionHTML );
				}
			
				function cb_dirSelectionHTML( myRet ) {
					document.getElementById("DEFScreen").style.display = "block";
					document.getElementById("DEFProgressBar").style.display = "none";
					document.getElementById("DEFOperationList").innerHTML = myRet;
				}
			</script>
			
			<div id="DEFProgressBar" style="display:none;" class="sitePack">
				<h4>Please wait...</h4>
				<script type="text/javascript">
					var bar0 = createBar(320,15,'white',1,'black','blue',85,7,3,"");
				</script>
			</div>
			
			<div id="DEFScreen">
				<?php 
        echo $headingHTML;
        ?>
				<div id="DEFOperationList">
					<script type="text/javascript">
						dirSelectionHTML('<?php 
        echo $myRoot;
        ?>
');
					</script>
				</div>
			</div>	
		<?php 
    }
Ejemplo n.º 6
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 
    }
Ejemplo n.º 7
0
    /**
     * Displays the edit form of an existing or newly created record 
     *
     */
    function _echoEditHTML()
    {
        // Get the task and find the item's id
        $task = JoomlapackAbstraction::getParam('task');
        $id = JoomlapackAbstraction::getParam('id', null);
        $id = $task == 'new' ? null : (is_numeric($id) ? $id : null);
        // If it is not a new record, try to fetch it. If fetch is imposible, resort to new record
        if (!is_null($id)) {
            $row = JoomlapackHelperFiltertable::getInclusionEntry($this->_filterClass, $id);
            $id = $row['id'];
        } else {
            $row = array();
        }
        // Start outputting the page
        $this->_echoJavaScript();
        // Get JavaScript for AJAX calls
        echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_MULTIDB'));
        ?>
		<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="multidb" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="id" value="<?php 
        echo is_null($id) ? '' : $id;
        ?>
" />
			<table cellpadding="4" cellspacing="0" border="0" width="95%" class="adminform">
				<tr>
					<td><?php 
        echo JoomlapackLangManager::_('MULTIDB_HOST');
        ?>
</td>
					<td><input type="text" name="host" id="host" value="<?php 
        echo $row['host'];
        ?>
" /></td>					
				</tr>
				<tr>
					<td><?php 
        echo JoomlapackLangManager::_('MULTIDB_PORT');
        ?>
</td>
					<td><input type="text" name="port" id="port" value="<?php 
        echo $row['port'];
        ?>
" /></td>					
				</tr>
				<tr>
					<td><?php 
        echo JoomlapackLangManager::_('MULTIDB_USERNAME');
        ?>
</td>
					<td><input type="text" name="username" id="username" value="<?php 
        echo $row['username'];
        ?>
" /></td>					
				</tr>
				<tr>
					<td><?php 
        echo JoomlapackLangManager::_('MULTIDB_PASSWORD');
        ?>
</td>
					<td><input type="text" name="password" id="password" value="<?php 
        echo $row['password'];
        ?>
" /></td>					
				</tr>
				<tr>
					<td><?php 
        echo JoomlapackLangManager::_('MULTIDB_DATABASE');
        ?>
</td>
					<td><input type="text" name="database" id="database" value="<?php 
        echo $row['database'];
        ?>
" /></td>					
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>
					<input type="button" value="<?php 
        echo JoomlapackLangManager::_('MULTIDB_TESTDB');
        ?>
" onclick="testdb();" />
					</td>
				</tr>
			</table>
		<?php 
    }
Ejemplo n.º 8
0
    /**
     * Outputs an error condition. Used by the JavaScript Redirects backup method.
     * It displays all errors found in the class' _errorStack array.
     * 
     * @access private
     * @since 1.2.b1
     */
    function _echoHTML_Redirects_Error()
    {
        ?>
<div id="Main">
	<div id="Timeout" style="display:none; margin-top: 10px;" class="sitePack">
		<table border="0" width="100%">
			<tr>
				<td valign="top">
					<img src="<?php 
        echo JoomlapackCommonHTML::getImageURI('error_big');
        ?>
" border="0" />
				</td>
			</tr>
<?php 
        foreach ($this->_errorStack as $errorString) {
            ?>
			<tr>
				<td>
					<p><?php 
            echo $errorString;
            ?>
</p>
				</td>
			</tr>
<?php 
        }
        ?>
			<tr>
				<td>&nbsp;</td>
				<td>
					<a href="<?php 
        echo JoomlapackAbstraction::JPLink('log');
        ?>
">
						<div class="jpbutton">
							<img src="<?php 
        echo JoomlapackCommonHTML::getImageURI('log');
        ?>
" border="0" />
							<p><?php 
        echo JoomlapackLangManager::_('CPANEL_LOG');
        ?>
</p>
						</div>
					</a>					
				</td>
			</tr>
		</table>
	</div>
</div>
<?php 
    }
Ejemplo n.º 9
0
 function _echoFix()
 {
     $jpconfiguration =& JoomlapackConfiguration::getInstance();
     $db = JoomlapackAbstraction::getDatabase();
     echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_CONFIGMIGRATE'));
     // Catch the "nothing to do" case
     if ($jpconfiguration->get('siteRoot') == JPATH_SITE) {
         echo JoomlapackLangManager::_('CONFIGMIGRATE_NOFIXREQUIRED');
         return;
     }
     // Sometimes, it is possible that the siteRoot configuration value is not set
     // (e.g. manually upgrading from an older version, keeping the config xml file).
     // This will fix it
     if (is_null($jpconfiguration->get('siteRoot'))) {
         echo JoomlapackLangManager::_('CONFIGMIGRATE_NOROOTSTORED');
         $jpconfiguration->set('siteRoot', JPATH_SITE);
         $jpconfiguration->SaveConfiguration();
         return;
     }
     // A genuine case of site location mismatch. Let's take a look at it.
     $oldPath = JoomlapackAbstraction::TranslateWinPath($jpconfiguration->get('siteRoot'));
     $newPath = JoomlapackAbstraction::TranslateWinPath(JPATH_SITE);
     $sql = 'SELECT * FROM ' . $db->nameQuote('#__jp_exclusion');
     $db->setQuery($sql);
     $temparray = $db->loadAssocList();
     foreach ($temparray as $row) {
         $value = $row['value'];
         if (strstr($value, $oldPath)) {
             $value = str_replace($oldPath, $newPath, $value);
             $sql = 'UPDATE ' . $db->nameQuote('#__jp_exclusion') . ' SET ' . $db->nameQuote('value') . ' = ' . $db->Quote($value) . ' WHERE ' . $db->nameQuote('id') . ' = ' . $db->Quote($row['id']);
             $db->setQuery($sql);
             $db->query();
         }
     }
     echo JoomlapackLangManager::_('CONFIGMIGRATE_FIXED');
 }
Ejemplo n.º 10
0
    /**
     * Sends the page's HTML to the standard output
     *
     */
    function echoHTML()
    {
        $act = JoomlapackAbstraction::getParam('act');
        $task = JoomlapackAbstraction::getParam('task', 'default');
        // Handle downloads
        if ($task == 'downloadfile') {
            $this->downloadFile();
            return;
        }
        $this->_getBackupFileList();
        // Populate backup file list
        $this->_echoJavaScript();
        // Get JavaScript for AJAX calls
        // Show top header
        echo JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_BUADMIN'));
        echo JoomlapackLangManager::_('BUADMIN_FILECOUNT') . ': ' . count($this->backupFiles);
        ?>
		<table class="adminlist">
			<tr>
				<th width="5">
					#
				</th>
				<th class="title">
					<?php 
        echo JoomlapackLangManager::_('BUADMIN_FILENAME');
        ?>
				</th>
				<th align="left" width="100">
					<?php 
        echo JoomlapackLangManager::_('BUADMIN_SIZE');
        ?>
				</th>
				<th width="80" align="right">
				</th>
				<th width="80" align="right">
				</th>
				<th align="center" width="120">
					<?php 
        echo JoomlapackLangManager::_('BUADMIN_DATE');
        ?>
				</th>
			</tr>
		<?php 
        $count = 0;
        foreach ($this->backupFiles as $fileName) {
            $fileName = realpath($fileName);
            $count++;
            $createdTime = date("Y-m-d H:i:s", filemtime($fileName));
            $fileSizeKb = round(filesize($fileName) / 1024, 2);
            $onlyName = basename($fileName);
            $linkDownload = JoomlapackAbstraction::JPLink($act, 'downloadfile', true, 'filename=' . addslashes($onlyName));
            $linkDelete = "javascript:if (confirm('" . JoomlapackLangManager::_('BUADMIN_CONFIRMTITLE') . "')){ do_deletebackup('" . addslashes($onlyName) . "'); }";
            ?>
			<tr class="<?php 
            echo "row{$count}";
            ?>
">
				<td><?php 
            echo $count;
            ?>
</td>
				<td align="left"><?php 
            echo $onlyName;
            ?>
</td>
				<td align="left"><?php 
            echo $fileSizeKb;
            ?>
 Kb</td>
				<td align="center">
					<a href="<?php 
            echo $linkDownload;
            ?>
">
					<img src="images/downarrow.png" border=0>
					<?php 
            echo JoomlapackLangManager::_('BUADMIN_DOWNLOAD');
            ?>
					</a>
				</td>
				<td align="center">
					<a href="<?php 
            echo $linkDelete;
            ?>
">
					<img src="images/publish_x.png" border=0>
					<?php 
            echo JoomlapackLangManager::_('BUADMIN_DELETE');
            ?>
					</a>
				</td>
				<td><?php 
            echo $createdTime;
            ?>
</td>
			</tr>
			<?php 
        }
        ?>
		</table>
<?php 
    }
Ejemplo n.º 11
0
    /**
     * Displays the HTML for this page, directly outputting it to the browser
     */
    function echoHTML()
    {
        jpimport('helpers.lang');
        // 1.1.1b2 - Oops! This page wouldn't work on at least 1 windows system
        $myRoot = JPATH_SITE;
        $rootArray = explode('\\', $myRoot);
        $myRoot = implode('//', $rootArray);
        // Get URL for JavaScript
        $jsURI_pb = JoomlapackAbstraction::SiteURI() . '/administrator/components/' . JoomlapackAbstraction::getParam('option', 'com_joomlapack') . '/assets/js/xp_progress.js';
        // Get some more HTML fragments
        $headingHTML = JoomlapackCommonHTML::getAdminHeadingHTML(JoomlapackLangManager::_('CPANEL_DEF'));
        $this->commonSAJAX();
        echo <<<ENDFRAGMENT
\t\t\t<script language="javascript" src="{$jsURI_pb}">
\t\t\t\t// WinXP Progress Bar- By Brian Gosselin- http://www.scriptasylum.com/
\t\t\t</script>
\t\t\t<script language="JavaScript" type="text/javascript">
\t\t\t\t/*
\t\t\t\t * (S)AJAX Library code
\t\t\t\t */
ENDFRAGMENT;
        sajax_show_javascript();
        echo <<<ENDFRAGMENT
\t\t \t\tsajax_fail_handle = SAJAXTrap;
\t\t
\t\t\t\tfunction SAJAXTrap( myData ) {
\t\t\t\t\talert('Invalid AJAX reponse: ' + myData);
\t\t\t\t}
\t\t\t\t\t\t
\t\t\t\tvar globRoot;
\t\t\t
\t\t\t\tfunction ToggleFilter( myRoot, myDir, myID ) {
\t\t\t\t\tvar sCheckStatus = (document.getElementById(myID).checked == true) ? "on" : "off";
\t\t\t
\t\t\t\t\tglobRoot = myRoot;
\t\t\t
\t\t\t\t\tdocument.getElementById("DEFScreen").style.display = "none";
\t\t\t\t\tdocument.getElementById("DEFProgressBar").style.display = "block";
\t\t\t
\t\t\t\t\tx_toggleDirFilter( myRoot, myDir, sCheckStatus, ToggleFilter_cb );
\t\t\t\t}
\t\t\t
\t\t\t\tfunction ToggleFilter_cb( myRet ) {
\t\t\t\t\tdirSelectionHTML( globRoot );
\t\t\t\t\tdocument.getElementById("DEFScreen").style.display = "block";
\t\t\t\t\tdocument.getElementById("DEFProgressBar").style.display = "none";
\t\t\t\t}
\t\t\t
\t\t\t\tfunction dirSelectionHTML( myRoot ) {
\t\t\t\t\tglobRoot = myRoot;
\t\t\t\t\tx_dirSelectionHTML( myRoot, cb_dirSelectionHTML );
\t\t\t\t}
\t\t\t
\t\t\t\tfunction cb_dirSelectionHTML( myRet ) {
\t\t\t\t\tdocument.getElementById("DEFScreen").style.display = "block";
\t\t\t\t\tdocument.getElementById("DEFProgressBar").style.display = "none";
\t\t\t\t\tdocument.getElementById("DEFOperationList").innerHTML = myRet;
\t\t\t\t}
\t\t\t</script>
\t\t\t
\t\t\t<div id="DEFProgressBar" style="display:none;" class="sitePack">
\t\t\t\t<h4>Please wait...</h4>
\t\t\t\t<script type="text/javascript">
\t\t\t\t\tvar bar0 = createBar(320,15,'white',1,'black','blue',85,7,3,"");
\t\t\t\t</script>
\t\t\t</div>
\t\t\t
\t\t\t<div id="DEFScreen">
\t\t\t\t{$headingHTML}
\t\t\t\t<div id="DEFOperationList">
\t\t\t\t\t<script type="text/javascript">
\t\t\t\t\t\tdirSelectionHTML('{$myRoot}');
\t\t\t\t\t</script>
\t\t\t\t</div>
\t\t\t</div>\t\t
ENDFRAGMENT;
    }
Ejemplo n.º 12
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();
        }
    }