| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/administrator/components/com_sectionex/ |
Upload File : |
<?php
/**
* @package SectionEx
* @copyright Copyright (C) 2008 Robert Kuster. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* @link http://www.stackideas.com
*
* SectionEx is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Restricted access'); // no direct access
function com_install()
{
// -> load language file for SectionEx
$lang = & JFactory :: getLanguage();
if ($lang != null) $lang->load( 'com_sectionex' );
updateGlobalParams();
//prior to version 1.6.3, we need to remove all the old files.
// /administrator/components/com_sectionex/admin.sectionex.php
if( JFile::exists( JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_sectionex'.DS.'admin.sectionex.php' ) )
{
JFile::delete(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_sectionex'.DS.'admin.sectionex.php');
}
?>
<img src="<?php echo rtrim(JURI::root(),'/'); ?>/administrator/components/com_sectionex/assets/images/SectionEx_logo.png" alt="" style="margin-bottom: 0px;" />
<fieldset class="adminform">
<legend><?php echo JText::_( 'DESCRIPTION'); ?></legend>
<?php echo JText::_( 'INST_DESC'); ?>
</fieldset>
<fieldset class="adminform">
<legend><?php echo JText::_( 'INST_ADDITIONAL_INFO'); ?></legend>
<table class="admintable" width="100%">
<tr>
<td><?php echo JText::_( 'INST_SUPPORT_FORUM_INFO'); ?> <a href="http://stackideas.com/forum/">http://stackideas.com/forum/</a></td>
</tr>
<tr>
<td width="40%"><?php echo JText::_( 'INST_DOCUMENTATION_INFO'); ?> <a href="http://stackideas.com/faq.html">http://stackideas.com/faq.html</a></td>
</tr>
<tr>
<td width="40%"><?php echo JText::_( 'INST_PROFESSIONAL_SUPPORT_INFO'); ?> <a href="http://stackideas.com/products.html">http://stackideas.com/products.html</a></td>
</tr>
</table>
<br /><?php echo JText::_( 'INST_ENABLE_TRANSLATION'); ?>
</fieldset>
<?php
return true;
}
function updateGlobalParams()
{
$default = JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_sectionex' . DS . 'default.ini';
$registry =& JRegistry::getInstance( 'sectionex' );
$registry->loadFile( $default , 'INI');
$db =& JFactory::getDBO();
$sql = 'SELECT ' . $db->nameQuote('id') . ' FROM ' . $db->nameQuote('#__components') . ' WHERE ' . $db->nameQuote('option') . ' = ' . $db->quote('com_sectionex') . ' LIMIT 1';
$db->setQuery($sql);
$id = $db->loadResult();
$sectionex =& JTable::getInstance( 'Component' , 'JTable' );
$sectionex->load( $id );
$oldparams = new JParameter($sectionex->params);
foreach($registry->_registry['default']['data'] as $key=>$value)
{
if($oldparams->get($key) == '')
{
$oldparams->def($key, $value);
}
}
$sectionex->params = $oldparams->toString();
return $sectionex->store();
}
?>