添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@344 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,48 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.admin.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
require_once( JApplicationHelper::getPath( 'admin_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'sysinfo':
|
||||
HTML_admin_misc::system_info( );
|
||||
break;
|
||||
|
||||
case 'changelog':
|
||||
HTML_admin_misc::changelog();
|
||||
break;
|
||||
|
||||
case 'help':
|
||||
HTML_admin_misc::help();
|
||||
break;
|
||||
|
||||
case 'version':
|
||||
HTML_admin_misc::version();
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
HTML_admin_misc::preview();
|
||||
break;
|
||||
|
||||
case 'preview2':
|
||||
HTML_admin_misc::preview( 1 );
|
||||
break;
|
||||
|
||||
case 'keepalive':
|
||||
return;
|
||||
break;
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.admin.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
require_once( JApplicationHelper::getPath( 'admin_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'sysinfo':
|
||||
HTML_admin_misc::system_info( );
|
||||
break;
|
||||
|
||||
case 'changelog':
|
||||
HTML_admin_misc::changelog();
|
||||
break;
|
||||
|
||||
case 'help':
|
||||
HTML_admin_misc::help();
|
||||
break;
|
||||
|
||||
case 'version':
|
||||
HTML_admin_misc::version();
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
HTML_admin_misc::preview();
|
||||
break;
|
||||
|
||||
case 'preview2':
|
||||
HTML_admin_misc::preview( 1 );
|
||||
break;
|
||||
|
||||
case 'keepalive':
|
||||
return;
|
||||
break;
|
||||
}
|
||||
@@ -1,73 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_config.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
*/
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo JText::_( 'Configuration File' ); ?></legend>
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="300">
|
||||
<?php echo JText::_( 'Setting' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo JText::_( 'Value' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
$cf = file( JPATH_CONFIGURATION . '/configuration.php' );
|
||||
$config_output = array();
|
||||
foreach ($cf as $k => $v) {
|
||||
if (eregi( 'var \$host', $v)) {
|
||||
$cf[$k] = 'var $host = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$user', $v)) {
|
||||
$cf[$k] = 'var $user = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$password', $v)) {
|
||||
$cf[$k] = 'var $password = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$db ', $v)) {
|
||||
$cf[$k] = 'var $db = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$ftp_user ', $v)) {
|
||||
$cf[$k] = 'var $ftp_user = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$ftp_pass ', $v)) {
|
||||
$cf[$k] = 'var $ftp_pass = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$smtpuser ', $v)) {
|
||||
$cf[$k] = 'var $smtpuser = \'xxxxxx\'';
|
||||
} else if (eregi( 'var \$smtppass ', $v)) {
|
||||
$cf[$k] = 'var $smtppass = \'xxxxxx\'';
|
||||
} else if (eregi( '<?php', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (eregi( '\?>', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (eregi( '}', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (eregi( 'class JConfig {', $v)) {
|
||||
$cf[$k] = '';
|
||||
}
|
||||
$cf[$k] = str_replace('var ','',$cf[$k]);
|
||||
$cf[$k] = str_replace(';','',$cf[$k]);
|
||||
$cf[$k] = str_replace(' = ','</td><td>',$cf[$k]);
|
||||
$cf[$k] = '<td>'. $cf[$k] .'</td>';
|
||||
if ($cf[$k] != '<td></td>') {
|
||||
$config_output[] = $cf[$k];
|
||||
}
|
||||
}
|
||||
echo implode( '</tr><tr>', $config_output );
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_config.php 12694 2009-09-11 21:03:02Z ian $
|
||||
*/
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo JText::_( 'Configuration File' ); ?></legend>
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="300">
|
||||
<?php echo JText::_( 'Setting' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo JText::_( 'Value' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
$cf = file( JPATH_CONFIGURATION . '/configuration.php' );
|
||||
$config_output = array();
|
||||
foreach ($cf as $k => $v) {
|
||||
if (preg_match( '#var \$host#i', $v)) {
|
||||
$cf[$k] = 'var $host = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$user#i', $v)) {
|
||||
$cf[$k] = 'var $user = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$password#i', $v)) {
|
||||
$cf[$k] = 'var $password = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$db#i', $v)) {
|
||||
$cf[$k] = 'var $db = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$ftp_user#i', $v)) {
|
||||
$cf[$k] = 'var $ftp_user = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$ftp_pass#i', $v)) {
|
||||
$cf[$k] = 'var $ftp_pass = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$smtpuser#i', $v)) {
|
||||
$cf[$k] = 'var $smtpuser = \'xxxxxx\'';
|
||||
} else if (preg_match( '#var \$smtppass#i', $v)) {
|
||||
$cf[$k] = 'var $smtppass = \'xxxxxx\'';
|
||||
} else if (preg_match( '#<\?php#i', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (preg_match( '#\?>#i', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (preg_match( '#\}#i', $v)) {
|
||||
$cf[$k] = '';
|
||||
} else if (preg_match( '#class JConfig \{#i', $v)) {
|
||||
$cf[$k] = '';
|
||||
}
|
||||
$cf[$k] = str_replace('var ','',$cf[$k]);
|
||||
$cf[$k] = str_replace(';','',$cf[$k]);
|
||||
$cf[$k] = str_replace(' = ','</td><td>',$cf[$k]);
|
||||
$cf[$k] = '<td>'. $cf[$k] .'</td>';
|
||||
if ($cf[$k] != '<td></td>') {
|
||||
$config_output[] = $cf[$k];
|
||||
}
|
||||
}
|
||||
echo implode( '</tr><tr>', $config_output );
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.admin.html.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
*/
|
||||
class TOOLBAR_admin
|
||||
{
|
||||
function _SYSINFO() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Information' ), 'systeminfo.png' );
|
||||
JToolBarHelper::help( 'screen.system.info' );
|
||||
}
|
||||
|
||||
function _CPANEL() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Control Panel' ), 'cpanel.png' );
|
||||
JToolBarHelper::help( 'screen.cpanel' );
|
||||
}
|
||||
|
||||
function _HELP() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Help' ), 'help_header.png' );
|
||||
}
|
||||
|
||||
function _PREVIEW() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Preview' ) );
|
||||
}
|
||||
|
||||
function _DEFAULT() {
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.admin.html.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
*/
|
||||
class TOOLBAR_admin
|
||||
{
|
||||
function _SYSINFO() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Information' ), 'systeminfo.png' );
|
||||
JToolBarHelper::help( 'screen.system.info' );
|
||||
}
|
||||
|
||||
function _CPANEL() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Control Panel' ), 'cpanel.png' );
|
||||
JToolBarHelper::help( 'screen.cpanel' );
|
||||
}
|
||||
|
||||
function _HELP() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Help' ), 'help_header.png' );
|
||||
}
|
||||
|
||||
function _PREVIEW() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Preview' ) );
|
||||
}
|
||||
|
||||
function _DEFAULT() {
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.admin.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'sysinfo':
|
||||
TOOLBAR_admin::_SYSINFO();
|
||||
break;
|
||||
|
||||
case 'help':
|
||||
TOOLBAR_admin::_HELP();
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
case 'preview2':
|
||||
TOOLBAR_admin::_PREVIEW();
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($task) {
|
||||
TOOLBAR_admin::_DEFAULT();
|
||||
} else {
|
||||
TOOLBAR_admin::_CPANEL();
|
||||
}
|
||||
break;
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.admin.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Admin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'sysinfo':
|
||||
TOOLBAR_admin::_SYSINFO();
|
||||
break;
|
||||
|
||||
case 'help':
|
||||
TOOLBAR_admin::_HELP();
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
case 'preview2':
|
||||
TOOLBAR_admin::_PREVIEW();
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($task) {
|
||||
TOOLBAR_admin::_DEFAULT();
|
||||
} else {
|
||||
TOOLBAR_admin::_CPANEL();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1,65 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.banners.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_banners', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
|
||||
// Set the table directory
|
||||
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_banners'.DS.'tables');
|
||||
|
||||
$controllerName = JRequest::getCmd( 'c', 'banner' );
|
||||
|
||||
if($controllerName == 'client') {
|
||||
JSubMenuHelper::addEntry(JText::_('Banners'), 'index.php?option=com_banners');
|
||||
JSubMenuHelper::addEntry(JText::_('Clients'), 'index.php?option=com_banners&c=client', true );
|
||||
JSubMenuHelper::addEntry(JText::_('Categories'), 'index.php?option=com_categories§ion=com_banner');
|
||||
} else {
|
||||
JSubMenuHelper::addEntry(JText::_('Banners'), 'index.php?option=com_banners', true );
|
||||
JSubMenuHelper::addEntry(JText::_('Clients'), 'index.php?option=com_banners&c=client');
|
||||
JSubMenuHelper::addEntry(JText::_('Categories'), 'index.php?option=com_categories§ion=com_banner');
|
||||
}
|
||||
|
||||
switch ($controllerName)
|
||||
{
|
||||
default:
|
||||
$controllerName = 'banner';
|
||||
// allow fall through
|
||||
|
||||
case 'banner' :
|
||||
case 'client':
|
||||
// Temporary interceptor
|
||||
$task = JRequest::getCmd('task');
|
||||
if ($task == 'listclients') {
|
||||
$controllerName = 'client';
|
||||
}
|
||||
|
||||
require_once( JPATH_COMPONENT.DS.'controllers'.DS.$controllerName.'.php' );
|
||||
$controllerName = 'BannerController'.$controllerName;
|
||||
|
||||
// Create the controller
|
||||
$controller = new $controllerName();
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute( JRequest::getCmd('task') );
|
||||
|
||||
// Redirect if set by the controller
|
||||
$controller->redirect();
|
||||
break;
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.banners.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_banners', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
|
||||
// Set the table directory
|
||||
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_banners'.DS.'tables');
|
||||
|
||||
$controllerName = JRequest::getCmd( 'c', 'banner' );
|
||||
|
||||
if($controllerName == 'client') {
|
||||
JSubMenuHelper::addEntry(JText::_('Banners'), 'index.php?option=com_banners');
|
||||
JSubMenuHelper::addEntry(JText::_('Clients'), 'index.php?option=com_banners&c=client', true );
|
||||
JSubMenuHelper::addEntry(JText::_('Categories'), 'index.php?option=com_categories§ion=com_banner');
|
||||
} else {
|
||||
JSubMenuHelper::addEntry(JText::_('Banners'), 'index.php?option=com_banners', true );
|
||||
JSubMenuHelper::addEntry(JText::_('Clients'), 'index.php?option=com_banners&c=client');
|
||||
JSubMenuHelper::addEntry(JText::_('Categories'), 'index.php?option=com_categories§ion=com_banner');
|
||||
}
|
||||
|
||||
switch ($controllerName)
|
||||
{
|
||||
default:
|
||||
$controllerName = 'banner';
|
||||
// allow fall through
|
||||
|
||||
case 'banner' :
|
||||
case 'client':
|
||||
// Temporary interceptor
|
||||
$task = JRequest::getCmd('task');
|
||||
if ($task == 'listclients') {
|
||||
$controllerName = 'client';
|
||||
}
|
||||
|
||||
require_once( JPATH_COMPONENT.DS.'controllers'.DS.$controllerName.'.php' );
|
||||
$controllerName = 'BannerController'.$controllerName;
|
||||
|
||||
// Create the controller
|
||||
$controller = new $controllerName();
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute( JRequest::getCmd('task') );
|
||||
|
||||
// Redirect if set by the controller
|
||||
$controller->redirect();
|
||||
break;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<install type="component" version="1.5.0">
|
||||
<name>Banners</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>April 2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>1.5.0</version>
|
||||
<description>This component manages banners and banner clients</description>
|
||||
</install>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<install type="component" version="1.5.0">
|
||||
<name>Banners</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>April 2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>1.5.0</version>
|
||||
<description>This component manages banners and banner clients</description>
|
||||
</install>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,49 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: bannerclient.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// Check to ensure this file is included in Joomla!
|
||||
defined('_JEXEC') or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* Renders a category element
|
||||
*
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @since 1.5
|
||||
*/
|
||||
class JElementBannerclient extends JElement
|
||||
{
|
||||
/**
|
||||
* Element name
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
var $_name = 'Bannerclient';
|
||||
|
||||
function fetchElement($name, $value, &$node, $control_name)
|
||||
{
|
||||
$db = &JFactory::getDBO();
|
||||
|
||||
// This might get a conflict with the dynamic translation - TODO: search for better solution
|
||||
$query = 'SELECT cid, name' .
|
||||
' FROM #__bannerclient' .
|
||||
' ORDER BY name';
|
||||
$db->setQuery($query);
|
||||
$options = $db->loadObjectList();
|
||||
array_unshift($options, JHTML::_('select.option', '0', '- '.JText::_('Select Client').' -', 'cid', 'name'));
|
||||
|
||||
return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'cid', 'name', $value, $control_name.$name );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: bannerclient.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// Check to ensure this file is included in Joomla!
|
||||
defined('_JEXEC') or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* Renders a category element
|
||||
*
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @since 1.5
|
||||
*/
|
||||
class JElementBannerclient extends JElement
|
||||
{
|
||||
/**
|
||||
* Element name
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
var $_name = 'Bannerclient';
|
||||
|
||||
function fetchElement($name, $value, &$node, $control_name)
|
||||
{
|
||||
$db = &JFactory::getDBO();
|
||||
|
||||
// This might get a conflict with the dynamic translation - TODO: search for better solution
|
||||
$query = 'SELECT cid, name' .
|
||||
' FROM #__bannerclient' .
|
||||
' ORDER BY name';
|
||||
$db->setQuery($query);
|
||||
$options = $db->loadObjectList();
|
||||
array_unshift($options, JHTML::_('select.option', '0', '- '.JText::_('Select Client').' -', 'cid', 'name'));
|
||||
|
||||
return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'cid', 'name', $value, $control_name.$name );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: banner.php 11646 2009-03-01 19:34:56Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class BannerHelper
|
||||
{
|
||||
/**
|
||||
* Returns a list of valid keywords based on the prefix in banner
|
||||
* configuration
|
||||
* @param mixed An array of keywords, or comma delimited string
|
||||
* @return array
|
||||
* @static
|
||||
*/
|
||||
function &getKeywords( $keywords )
|
||||
{
|
||||
static $instance;
|
||||
|
||||
if (!$instance)
|
||||
{
|
||||
$config =& JComponentHelper::getParams( 'com_banners' );
|
||||
$prefix = $config->get( 'tag_prefix' );
|
||||
|
||||
$instance = array();
|
||||
|
||||
if (!is_array( $keywords ))
|
||||
{
|
||||
$keywords = explode( ',', $keywords );
|
||||
}
|
||||
|
||||
foreach ($keywords as $keyword)
|
||||
{
|
||||
$keyword = trim( $keyword );
|
||||
$regex = '#^' . $prefix . '#';
|
||||
if (preg_match( $regex, $keyword ))
|
||||
{
|
||||
$instance[] = $keyword;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a URL is an image
|
||||
*
|
||||
* @param string
|
||||
* @return URL
|
||||
*/
|
||||
function isImage( $url )
|
||||
{
|
||||
$result = preg_match( '#(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$#i', $url );
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a URL is a Flash file
|
||||
*
|
||||
* @param string
|
||||
* @return URL
|
||||
*/
|
||||
function isFlash( $url )
|
||||
{
|
||||
$result = preg_match( '#\.swf$#i', $url );
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: banner.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class BannerHelper
|
||||
{
|
||||
/**
|
||||
* Returns a list of valid keywords based on the prefix in banner
|
||||
* configuration
|
||||
* @param mixed An array of keywords, or comma delimited string
|
||||
* @return array
|
||||
* @static
|
||||
*/
|
||||
function &getKeywords( $keywords )
|
||||
{
|
||||
static $instance;
|
||||
|
||||
if (!$instance)
|
||||
{
|
||||
$config =& JComponentHelper::getParams( 'com_banners' );
|
||||
$prefix = $config->get( 'tag_prefix' );
|
||||
|
||||
$instance = array();
|
||||
|
||||
if (!is_array( $keywords ))
|
||||
{
|
||||
$keywords = explode( ',', $keywords );
|
||||
}
|
||||
|
||||
foreach ($keywords as $keyword)
|
||||
{
|
||||
$keyword = trim( $keyword );
|
||||
$regex = '#^' . $prefix . '#';
|
||||
if (preg_match( $regex, $keyword ))
|
||||
{
|
||||
$instance[] = $keyword;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a URL is an image
|
||||
*
|
||||
* @param string
|
||||
* @return URL
|
||||
*/
|
||||
function isImage( $url )
|
||||
{
|
||||
$result = preg_match( '#(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$#i', $url );
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a URL is a Flash file
|
||||
*
|
||||
* @param string
|
||||
* @return URL
|
||||
*/
|
||||
function isFlash( $url )
|
||||
{
|
||||
$result = preg_match( '#\.swf$#i', $url );
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,131 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: banner.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class TableBanner extends JTable
|
||||
{
|
||||
/** @var int */
|
||||
var $bid = null;
|
||||
/** @var int */
|
||||
var $cid = null;
|
||||
/** @var string */
|
||||
var $type = '';
|
||||
/** @var string */
|
||||
var $name = '';
|
||||
/** @var string */
|
||||
var $alias = '';
|
||||
/** @var int */
|
||||
var $imptotal = 0;
|
||||
/** @var int */
|
||||
var $impmade = 0;
|
||||
/** @var int */
|
||||
var $clicks = 0;
|
||||
/** @var string */
|
||||
var $imageurl = '';
|
||||
/** @var string */
|
||||
var $clickurl = '';
|
||||
/** @var date */
|
||||
var $date = null;
|
||||
/** @var int */
|
||||
var $showBanner = 0;
|
||||
/** @var int */
|
||||
var $checked_out = 0;
|
||||
/** @var date */
|
||||
var $checked_out_time = 0;
|
||||
/** @var string */
|
||||
var $editor = '';
|
||||
/** @var string */
|
||||
var $custombannercode = '';
|
||||
/** @var int */
|
||||
var $catid = null;
|
||||
/** @var string */
|
||||
var $description = null;
|
||||
/** @var int */
|
||||
var $sticky = null;
|
||||
/** @var int */
|
||||
var $ordering = null;
|
||||
/** @var date */
|
||||
var $publish_up = null;
|
||||
/** @var date */
|
||||
var $publish_down = null;
|
||||
/** @var string */
|
||||
var $tags = null;
|
||||
/** @var string */
|
||||
var $params = null;
|
||||
|
||||
function __construct( &$_db )
|
||||
{
|
||||
parent::__construct( '#__banner', 'bid', $_db );
|
||||
|
||||
|
||||
$now =& JFactory::getDate();
|
||||
$this->set( 'date', $now->toMySQL() );
|
||||
}
|
||||
|
||||
function clicks()
|
||||
{
|
||||
$query = 'UPDATE #__banner'
|
||||
. ' SET clicks = ( clicks + 1 )'
|
||||
. ' WHERE bid = ' . (int) $this->bid
|
||||
;
|
||||
$this->_db->setQuery( $query );
|
||||
$this->_db->query();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overloaded check function
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
* @see JTable::check
|
||||
* @since 1.5
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
// check for valid client id
|
||||
if (is_null($this->cid) || $this->cid == 0) {
|
||||
$this->setError(JText::_( 'BNR_CLIENT' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid name
|
||||
if(trim($this->name) == '') {
|
||||
$this->setError(JText::_( 'BNR_NAME' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($this->alias)) {
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
$this->alias = JFilterOutput::stringURLSafe($this->alias);
|
||||
|
||||
/*if(trim($this->imageurl) == '') {
|
||||
$this->setError(JText::_( 'BNR_IMAGE' ));
|
||||
return false;
|
||||
}
|
||||
if(trim($this->clickurl) == '' && trim($this->custombannercode) == '') {
|
||||
$this->setError(JText::_( 'BNR_URL' ));
|
||||
return false;
|
||||
}*/
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: banner.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class TableBanner extends JTable
|
||||
{
|
||||
/** @var int */
|
||||
var $bid = null;
|
||||
/** @var int */
|
||||
var $cid = null;
|
||||
/** @var string */
|
||||
var $type = '';
|
||||
/** @var string */
|
||||
var $name = '';
|
||||
/** @var string */
|
||||
var $alias = '';
|
||||
/** @var int */
|
||||
var $imptotal = 0;
|
||||
/** @var int */
|
||||
var $impmade = 0;
|
||||
/** @var int */
|
||||
var $clicks = 0;
|
||||
/** @var string */
|
||||
var $imageurl = '';
|
||||
/** @var string */
|
||||
var $clickurl = '';
|
||||
/** @var date */
|
||||
var $date = null;
|
||||
/** @var int */
|
||||
var $showBanner = 0;
|
||||
/** @var int */
|
||||
var $checked_out = 0;
|
||||
/** @var date */
|
||||
var $checked_out_time = 0;
|
||||
/** @var string */
|
||||
var $editor = '';
|
||||
/** @var string */
|
||||
var $custombannercode = '';
|
||||
/** @var int */
|
||||
var $catid = null;
|
||||
/** @var string */
|
||||
var $description = null;
|
||||
/** @var int */
|
||||
var $sticky = null;
|
||||
/** @var int */
|
||||
var $ordering = null;
|
||||
/** @var date */
|
||||
var $publish_up = null;
|
||||
/** @var date */
|
||||
var $publish_down = null;
|
||||
/** @var string */
|
||||
var $tags = null;
|
||||
/** @var string */
|
||||
var $params = null;
|
||||
|
||||
function __construct( &$_db )
|
||||
{
|
||||
parent::__construct( '#__banner', 'bid', $_db );
|
||||
|
||||
|
||||
$now =& JFactory::getDate();
|
||||
$this->set( 'date', $now->toMySQL() );
|
||||
}
|
||||
|
||||
function clicks()
|
||||
{
|
||||
$query = 'UPDATE #__banner'
|
||||
. ' SET clicks = ( clicks + 1 )'
|
||||
. ' WHERE bid = ' . (int) $this->bid
|
||||
;
|
||||
$this->_db->setQuery( $query );
|
||||
$this->_db->query();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overloaded check function
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
* @see JTable::check
|
||||
* @since 1.5
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
// check for valid client id
|
||||
if (is_null($this->cid) || $this->cid == 0) {
|
||||
$this->setError(JText::_( 'BNR_CLIENT' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid name
|
||||
if(trim($this->name) == '') {
|
||||
$this->setError(JText::_( 'BNR_NAME' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(empty($this->alias)) {
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
$this->alias = JFilterOutput::stringURLSafe($this->alias);
|
||||
|
||||
/*if(trim($this->imageurl) == '') {
|
||||
$this->setError(JText::_( 'BNR_IMAGE' ));
|
||||
return false;
|
||||
}
|
||||
if(trim($this->clickurl) == '' && trim($this->custombannercode) == '') {
|
||||
$this->setError(JText::_( 'BNR_URL' ));
|
||||
return false;
|
||||
}*/
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: bannerclient.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class TableBannerClient extends JTable
|
||||
{
|
||||
var $cid = null;
|
||||
var $name = '';
|
||||
var $contact = '';
|
||||
var $email = '';
|
||||
var $extrainfo = '';
|
||||
var $checked_out = 0;
|
||||
var $checked_out_time = 0;
|
||||
var $editor = '';
|
||||
|
||||
function __construct( &$_db ) {
|
||||
parent::__construct( '#__bannerclient', 'cid', $_db );
|
||||
}
|
||||
|
||||
/**
|
||||
* Overloaded check function
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
* @see JTable::check
|
||||
* @since 1.5
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
// check for valid client name
|
||||
if (trim($this->name == '')) {
|
||||
$this->setError(JText::_( 'BNR_CLIENT_NAME' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid client contact
|
||||
if (trim($this->contact == '')) {
|
||||
$this->setError(JText::_( 'BNR_CONTACT' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid client email
|
||||
jimport( 'joomla.mail.helper' );
|
||||
if (!JMailHelper::isEmailAddress( $this->email )) {
|
||||
$this->setError(JText::_( 'BNR_VALID_EMAIL' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: bannerclient.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Banners
|
||||
*/
|
||||
class TableBannerClient extends JTable
|
||||
{
|
||||
var $cid = null;
|
||||
var $name = '';
|
||||
var $contact = '';
|
||||
var $email = '';
|
||||
var $extrainfo = '';
|
||||
var $checked_out = 0;
|
||||
var $checked_out_time = 0;
|
||||
var $editor = '';
|
||||
|
||||
function __construct( &$_db ) {
|
||||
parent::__construct( '#__bannerclient', 'cid', $_db );
|
||||
}
|
||||
|
||||
/**
|
||||
* Overloaded check function
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
* @see JTable::check
|
||||
* @since 1.5
|
||||
*/
|
||||
function check()
|
||||
{
|
||||
// check for valid client name
|
||||
if (trim($this->name == '')) {
|
||||
$this->setError(JText::_( 'BNR_CLIENT_NAME' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid client contact
|
||||
if (trim($this->contact == '')) {
|
||||
$this->setError(JText::_( 'BNR_CONTACT' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for valid client email
|
||||
jimport( 'joomla.mail.helper' );
|
||||
if (!JMailHelper::isEmailAddress( $this->email )) {
|
||||
$this->setError(JText::_( 'BNR_VALID_EMAIL' ));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,116 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.cache.php 11403 2009-01-06 06:19:31Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/*
|
||||
* Make sure the user is authorized to view this page
|
||||
*/
|
||||
$user =& JFactory::getUser();
|
||||
if (!$user->authorize( 'com_cache', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
|
||||
// Load the html output class and the model class
|
||||
require_once (JApplicationHelper::getPath('admin_html'));
|
||||
require_once (JApplicationHelper::getPath('class'));
|
||||
|
||||
$cid = JRequest::getVar( 'cid', array(0), 'post', 'array' );
|
||||
|
||||
/*
|
||||
* This is our main control structure for the component
|
||||
*
|
||||
* Each view is determined by the $task variable
|
||||
*/
|
||||
switch ( JRequest::getVar( 'task' ) )
|
||||
{
|
||||
case 'delete':
|
||||
CacheController::deleteCache($cid);
|
||||
CacheController::showCache();
|
||||
break;
|
||||
case 'purgeadmin':
|
||||
CacheController::showPurgeCache();
|
||||
break;
|
||||
case 'purge':
|
||||
CacheController::purgeCache();
|
||||
break;
|
||||
default :
|
||||
CacheController::showCache();
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static class to hold controller functions for the Cache component
|
||||
*
|
||||
* @static
|
||||
* @package Joomla
|
||||
* @subpackage Weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class CacheController
|
||||
{
|
||||
/**
|
||||
* Show the cache
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
function showCache()
|
||||
{
|
||||
global $mainframe, $option;
|
||||
$submenu = JRequest::getVar('client', '0', '', 'int');
|
||||
$client =& JApplicationHelper::getClientInfo($submenu);
|
||||
if ($submenu == 1) {
|
||||
JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0');
|
||||
JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1', true);
|
||||
} else {
|
||||
JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0', true);
|
||||
JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1');
|
||||
}
|
||||
|
||||
$limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'));
|
||||
$limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0 );
|
||||
|
||||
$cmData = new CacheData($client->path.DS.'cache');
|
||||
|
||||
jimport('joomla.html.pagination');
|
||||
$pageNav = new JPagination( $cmData->getGroupCount(), $limitstart, $limit );
|
||||
|
||||
CacheView::displayCache( $cmData->getRows( $limitstart, $limit ), $client, $pageNav );
|
||||
}
|
||||
|
||||
function deleteCache($cid)
|
||||
{
|
||||
// Check for request forgeries
|
||||
JRequest::checkToken() or jexit( 'Invalid Token' );
|
||||
|
||||
$client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
|
||||
|
||||
$cmData = new CacheData($client->path.DS.'cache');
|
||||
$cmData->cleanCacheList( $cid );
|
||||
}
|
||||
function showPurgeCache()
|
||||
{
|
||||
// Check for request forgeries
|
||||
CacheView::showPurgeExecute();
|
||||
}
|
||||
function purgeCache()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JRequest::checkToken() or jexit( 'Invalid Token' );
|
||||
$cache =& JFactory::getCache('');
|
||||
$cache->gc();
|
||||
CacheView::purgeSuccess();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.cache.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/*
|
||||
* Make sure the user is authorized to view this page
|
||||
*/
|
||||
$user =& JFactory::getUser();
|
||||
if (!$user->authorize( 'com_cache', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
|
||||
// Load the html output class and the model class
|
||||
require_once (JApplicationHelper::getPath('admin_html'));
|
||||
require_once (JApplicationHelper::getPath('class'));
|
||||
|
||||
$cid = JRequest::getVar( 'cid', array(0), 'post', 'array' );
|
||||
|
||||
/*
|
||||
* This is our main control structure for the component
|
||||
*
|
||||
* Each view is determined by the $task variable
|
||||
*/
|
||||
switch ( JRequest::getVar( 'task' ) )
|
||||
{
|
||||
case 'delete':
|
||||
CacheController::deleteCache($cid);
|
||||
CacheController::showCache();
|
||||
break;
|
||||
case 'purgeadmin':
|
||||
CacheController::showPurgeCache();
|
||||
break;
|
||||
case 'purge':
|
||||
CacheController::purgeCache();
|
||||
break;
|
||||
default :
|
||||
CacheController::showCache();
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static class to hold controller functions for the Cache component
|
||||
*
|
||||
* @static
|
||||
* @package Joomla
|
||||
* @subpackage Weblinks
|
||||
* @since 1.5
|
||||
*/
|
||||
class CacheController
|
||||
{
|
||||
/**
|
||||
* Show the cache
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
function showCache()
|
||||
{
|
||||
global $mainframe, $option;
|
||||
$submenu = JRequest::getVar('client', '0', '', 'int');
|
||||
$client =& JApplicationHelper::getClientInfo($submenu);
|
||||
if ($submenu == 1) {
|
||||
JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0');
|
||||
JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1', true);
|
||||
} else {
|
||||
JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_cache&client=0', true);
|
||||
JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_cache&client=1');
|
||||
}
|
||||
|
||||
$limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'));
|
||||
$limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0 );
|
||||
|
||||
$cmData = new CacheData($client->path.DS.'cache');
|
||||
|
||||
jimport('joomla.html.pagination');
|
||||
$pageNav = new JPagination( $cmData->getGroupCount(), $limitstart, $limit );
|
||||
|
||||
CacheView::displayCache( $cmData->getRows( $limitstart, $limit ), $client, $pageNav );
|
||||
}
|
||||
|
||||
function deleteCache($cid)
|
||||
{
|
||||
// Check for request forgeries
|
||||
JRequest::checkToken() or jexit( 'Invalid Token' );
|
||||
|
||||
$client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int'));
|
||||
|
||||
$cmData = new CacheData($client->path.DS.'cache');
|
||||
$cmData->cleanCacheList( $cid );
|
||||
}
|
||||
function showPurgeCache()
|
||||
{
|
||||
// Check for request forgeries
|
||||
CacheView::showPurgeExecute();
|
||||
}
|
||||
function purgeCache()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JRequest::checkToken() or jexit( 'Invalid Token' );
|
||||
$cache =& JFactory::getCache('');
|
||||
$cache->gc();
|
||||
CacheView::purgeSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<install type="component" version="1.0.0">
|
||||
<name>Cache Manager</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>1.5.0</version>
|
||||
<description>Cache Manager</description>
|
||||
</install>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<install type="component" version="1.0.0">
|
||||
<name>Cache Manager</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>2006</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>1.5.0</version>
|
||||
<description>Cache Manager</description>
|
||||
</install>
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.cache.html.php 11393 2009-01-05 02:11:06Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
*/
|
||||
class TOOLBAR_cache
|
||||
{
|
||||
/**
|
||||
* Draws the menu for a New category
|
||||
*/
|
||||
function _DEFAULT() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Cache Manager - Clean Cache Admin' ), 'checkin.png' );
|
||||
JToolBarHelper::custom( 'delete', 'delete.png', 'delete_f2.png', 'Delete', true );
|
||||
JToolBarHelper::help( 'screen.cache' );
|
||||
}
|
||||
|
||||
function _PURGEADMIN() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Cache Manager - Purge Cache Admin' ), 'checkin.png' );
|
||||
JToolBarHelper::custom( 'purge', 'delete.png', 'delete_f2.png', 'Purge expired', false );
|
||||
JToolBarHelper::help( 'screen.cache' );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.cache.html.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
*/
|
||||
class TOOLBAR_cache
|
||||
{
|
||||
/**
|
||||
* Draws the menu for a New category
|
||||
*/
|
||||
function _DEFAULT() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Cache Manager - Clean Cache Admin' ), 'checkin.png' );
|
||||
JToolBarHelper::custom( 'delete', 'delete.png', 'delete_f2.png', 'Delete', true );
|
||||
JToolBarHelper::help( 'screen.cache' );
|
||||
}
|
||||
|
||||
function _PURGEADMIN() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Cache Manager - Purge Cache Admin' ), 'checkin.png' );
|
||||
JToolBarHelper::custom( 'purge', 'delete.png', 'delete_f2.png', 'Purge expired', false );
|
||||
JToolBarHelper::help( 'screen.cache' );
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.cache.php 11393 2009-01-05 02:11:06Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'purgeadmin':
|
||||
TOOLBAR_cache::_PURGEADMIN();
|
||||
break;
|
||||
case 'purge':
|
||||
TOOLBAR_cache::_PURGEADMIN();
|
||||
break;
|
||||
default:
|
||||
TOOLBAR_cache::_DEFAULT();
|
||||
break;
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.cache.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Cache
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'purgeadmin':
|
||||
TOOLBAR_cache::_PURGEADMIN();
|
||||
break;
|
||||
case 'purge':
|
||||
TOOLBAR_cache::_PURGEADMIN();
|
||||
break;
|
||||
default:
|
||||
TOOLBAR_cache::_DEFAULT();
|
||||
break;
|
||||
|
||||
}
|
||||
+580
-580
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+84
-84
@@ -1,85 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.categories.html.php 10465 2008-06-28 13:20:22Z willebil $
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
*/
|
||||
class TOOLBAR_categories {
|
||||
/**
|
||||
* Draws the menu for Editing an existing category
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _EDIT($edit)
|
||||
{
|
||||
$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
|
||||
$section = JRequest::getCmd( 'section' );
|
||||
|
||||
$text = ( $edit ? JText::_( 'Edit' ) : JText::_( 'New' ) );
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. $text.' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::save();
|
||||
JToolBarHelper::apply();
|
||||
if ($edit) {
|
||||
// for existing articles the button is renamed `close`
|
||||
JToolBarHelper::cancel( 'cancel', 'Close' );
|
||||
} else {
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
JToolBarHelper::help( 'screen.' . substr( $section, 4 ) . '.categories.edit' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Moving existing categories
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _MOVE() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. JText::_( 'Move' ).' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::save( 'movesave' );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Copying existing categories
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _COPY() {
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. JText::_( 'Copy' ).' ]</small></small>', 'categories.png' );
|
||||
|
||||
JToolBarHelper::save( 'copysave' );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Editing an existing category
|
||||
*/
|
||||
function _DEFAULT()
|
||||
{
|
||||
$section = JRequest::getCmd( 'section' );
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category Manager' ) .': <small><small>[ '. JText::_(JString::substr($section, 4)).' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::publishList();
|
||||
JToolBarHelper::unpublishList();
|
||||
|
||||
if ( $section == 'com_content' || ( $section > 0 ) ) {
|
||||
JToolBarHelper::customX( 'moveselect', 'move.png', 'move_f2.png', 'Move', true );
|
||||
JToolBarHelper::customX( 'copyselect', 'copy.png', 'copy_f2.png', 'Copy', true );
|
||||
}
|
||||
JToolBarHelper::deleteList();
|
||||
JToolBarHelper::editListX();
|
||||
JToolBarHelper::addNewX();
|
||||
JToolBarHelper::help( 'screen.' . substr( $section, 4 ) . '.categories' );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.categories.html.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
*/
|
||||
class TOOLBAR_categories {
|
||||
/**
|
||||
* Draws the menu for Editing an existing category
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _EDIT($edit)
|
||||
{
|
||||
$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
|
||||
$section = JRequest::getCmd( 'section' );
|
||||
|
||||
$text = ( $edit ? JText::_( 'Edit' ) : JText::_( 'New' ) );
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. $text.' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::save();
|
||||
JToolBarHelper::apply();
|
||||
if ($edit) {
|
||||
// for existing articles the button is renamed `close`
|
||||
JToolBarHelper::cancel( 'cancel', 'Close' );
|
||||
} else {
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
JToolBarHelper::help( 'screen.' . substr( $section, 4 ) . '.categories.edit' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Moving existing categories
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _MOVE() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. JText::_( 'Move' ).' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::save( 'movesave' );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Copying existing categories
|
||||
* @param int The published state (to display the inverse button)
|
||||
*/
|
||||
function _COPY() {
|
||||
JToolBarHelper::title( JText::_( 'Category' ) .': <small><small>[ '. JText::_( 'Copy' ).' ]</small></small>', 'categories.png' );
|
||||
|
||||
JToolBarHelper::save( 'copysave' );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the menu for Editing an existing category
|
||||
*/
|
||||
function _DEFAULT()
|
||||
{
|
||||
$section = JRequest::getCmd( 'section' );
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Category Manager' ) .': <small><small>[ '. JText::_(JString::substr($section, 4)).' ]</small></small>', 'categories.png' );
|
||||
JToolBarHelper::publishList();
|
||||
JToolBarHelper::unpublishList();
|
||||
|
||||
if ( $section == 'com_content' || ( $section > 0 ) ) {
|
||||
JToolBarHelper::customX( 'moveselect', 'move.png', 'move_f2.png', 'Move', true );
|
||||
JToolBarHelper::customX( 'copyselect', 'copy.png', 'copy_f2.png', 'Copy', true );
|
||||
}
|
||||
JToolBarHelper::deleteList();
|
||||
JToolBarHelper::editListX();
|
||||
JToolBarHelper::addNewX();
|
||||
JToolBarHelper::help( 'screen.' . substr( $section, 4 ) . '.categories' );
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.categories.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'add' :
|
||||
TOOLBAR_categories::_EDIT(false);
|
||||
break;
|
||||
|
||||
case 'edit' :
|
||||
case 'editA':
|
||||
TOOLBAR_categories::_EDIT(true);
|
||||
break;
|
||||
|
||||
case 'moveselect':
|
||||
case 'movesave':
|
||||
TOOLBAR_categories::_MOVE();
|
||||
break;
|
||||
|
||||
case 'copyselect':
|
||||
case 'copysave':
|
||||
TOOLBAR_categories::_COPY();
|
||||
break;
|
||||
|
||||
default:
|
||||
TOOLBAR_categories::_DEFAULT();
|
||||
break;
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.categories.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Categories
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'add' :
|
||||
TOOLBAR_categories::_EDIT(false);
|
||||
break;
|
||||
|
||||
case 'edit' :
|
||||
case 'editA':
|
||||
TOOLBAR_categories::_EDIT(true);
|
||||
break;
|
||||
|
||||
case 'moveselect':
|
||||
case 'movesave':
|
||||
TOOLBAR_categories::_MOVE();
|
||||
break;
|
||||
|
||||
case 'copyselect':
|
||||
case 'copysave':
|
||||
TOOLBAR_categories::_COPY();
|
||||
break;
|
||||
|
||||
default:
|
||||
TOOLBAR_categories::_DEFAULT();
|
||||
break;
|
||||
}
|
||||
@@ -1,107 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.checkin.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_checkin', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
$db =& JFactory::getDBO();
|
||||
$nullDate = $db->getNullDate();
|
||||
?>
|
||||
<div id="tablecell">
|
||||
<table class="adminform">
|
||||
<tr>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Database Table' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Num of Items' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Checked-In' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
</th>
|
||||
</tr>
|
||||
<?php
|
||||
$tables = $db->getTableList();
|
||||
$k = 0;
|
||||
foreach ($tables as $tn) {
|
||||
// make sure we get the right tables based on prefix
|
||||
if (!preg_match( "/^".$mainframe->getCfg('dbprefix')."/i", $tn )) {
|
||||
continue;
|
||||
}
|
||||
$fields = $db->getTableFields( array( $tn ) );
|
||||
|
||||
$foundCO = false;
|
||||
$foundCOT = false;
|
||||
$foundE = false;
|
||||
|
||||
$foundCO = isset( $fields[$tn]['checked_out'] );
|
||||
$foundCOT = isset( $fields[$tn]['checked_out_time'] );
|
||||
$foundE = isset( $fields[$tn]['editor'] );
|
||||
|
||||
if ($foundCO && $foundCOT) {
|
||||
if ($foundE) {
|
||||
$query = 'SELECT checked_out, editor FROM '.$tn.' WHERE checked_out > 0';
|
||||
} else {
|
||||
$query = 'SELECT checked_out FROM '.$tn.' WHERE checked_out > 0';
|
||||
}
|
||||
$db->setQuery( $query );
|
||||
$res = $db->query();
|
||||
$num = $db->getNumRows( $res );
|
||||
|
||||
if ($foundE) {
|
||||
$query = 'UPDATE '.$tn.' SET checked_out = 0, checked_out_time = '.$db->Quote($nullDate).', editor = NULL WHERE checked_out > 0';
|
||||
} else {
|
||||
$query = 'UPDATE '.$tn.' SET checked_out = 0, checked_out_time = '.$db->Quote($nullDate).' WHERE checked_out > 0';
|
||||
}
|
||||
$db->setQuery( $query );
|
||||
$res = $db->query();
|
||||
|
||||
if ($res == 1) {
|
||||
if ($num > 0) {
|
||||
echo "<tr class=\"row$k\">";
|
||||
echo "\n <td width=\"350\">". JText::_( 'Checking table' ) ." - ". $tn ."</td>";
|
||||
echo "\n <td width=\"150\">". JText::_( 'Checked-In' ) ." <b>". $num ."</b> ". JText::_( 'items' ) ."</td>";
|
||||
echo "\n <td width=\"100\" align=\"center\"><img src=\"images/tick.png\" border=\"0\" alt=\"". JText::_( 'tick' ) ."\" /></td>";
|
||||
echo "\n <td> </td>";
|
||||
echo "\n</tr>";
|
||||
} else {
|
||||
echo "<tr class=\"row$k\">";
|
||||
echo "\n <td width=\"350\">". JText::_( 'Checking table' ) ." - ". $tn ."</td>";
|
||||
echo "\n <td width=\"150\">". JText::_( 'Checked-In' ) ." <b>". $num ."</b> ". JText::_( 'items' ) ."</td>";
|
||||
echo "\n <td width=\"100\"> </td>";
|
||||
echo "\n <td> </td>";
|
||||
echo "\n</tr>";
|
||||
}
|
||||
$k = 1 - $k;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<strong>
|
||||
<?php echo JText::_( 'Checked out items have now been all checked in' ); ?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.checkin.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_checkin', 'manage' )) {
|
||||
$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') );
|
||||
}
|
||||
$db =& JFactory::getDBO();
|
||||
$nullDate = $db->getNullDate();
|
||||
?>
|
||||
<div id="tablecell">
|
||||
<table class="adminform">
|
||||
<tr>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Database Table' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Num of Items' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JText::_( 'Checked-In' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
</th>
|
||||
</tr>
|
||||
<?php
|
||||
$tables = $db->getTableList();
|
||||
$k = 0;
|
||||
foreach ($tables as $tn) {
|
||||
// make sure we get the right tables based on prefix
|
||||
if (!preg_match( "/^".$mainframe->getCfg('dbprefix')."/i", $tn )) {
|
||||
continue;
|
||||
}
|
||||
$fields = $db->getTableFields( array( $tn ) );
|
||||
|
||||
$foundCO = false;
|
||||
$foundCOT = false;
|
||||
$foundE = false;
|
||||
|
||||
$foundCO = isset( $fields[$tn]['checked_out'] );
|
||||
$foundCOT = isset( $fields[$tn]['checked_out_time'] );
|
||||
$foundE = isset( $fields[$tn]['editor'] );
|
||||
|
||||
if ($foundCO && $foundCOT) {
|
||||
if ($foundE) {
|
||||
$query = 'SELECT checked_out, editor FROM '.$tn.' WHERE checked_out > 0';
|
||||
} else {
|
||||
$query = 'SELECT checked_out FROM '.$tn.' WHERE checked_out > 0';
|
||||
}
|
||||
$db->setQuery( $query );
|
||||
$res = $db->query();
|
||||
$num = $db->getNumRows( $res );
|
||||
|
||||
if ($foundE) {
|
||||
$query = 'UPDATE '.$tn.' SET checked_out = 0, checked_out_time = '.$db->Quote($nullDate).', editor = NULL WHERE checked_out > 0';
|
||||
} else {
|
||||
$query = 'UPDATE '.$tn.' SET checked_out = 0, checked_out_time = '.$db->Quote($nullDate).' WHERE checked_out > 0';
|
||||
}
|
||||
$db->setQuery( $query );
|
||||
$res = $db->query();
|
||||
|
||||
if ($res == 1) {
|
||||
if ($num > 0) {
|
||||
echo "<tr class=\"row$k\">";
|
||||
echo "\n <td width=\"350\">". JText::_( 'Checking table' ) ." - ". $tn ."</td>";
|
||||
echo "\n <td width=\"150\">". JText::_( 'Checked-In' ) ." <b>". $num ."</b> ". JText::_( 'items' ) ."</td>";
|
||||
echo "\n <td width=\"100\" align=\"center\"><img src=\"images/tick.png\" border=\"0\" alt=\"". JText::_( 'tick' ) ."\" /></td>";
|
||||
echo "\n <td> </td>";
|
||||
echo "\n</tr>";
|
||||
} else {
|
||||
echo "<tr class=\"row$k\">";
|
||||
echo "\n <td width=\"350\">". JText::_( 'Checking table' ) ." - ". $tn ."</td>";
|
||||
echo "\n <td width=\"150\">". JText::_( 'Checked-In' ) ." <b>". $num ."</b> ". JText::_( 'items' ) ."</td>";
|
||||
echo "\n <td width=\"100\"> </td>";
|
||||
echo "\n <td> </td>";
|
||||
echo "\n</tr>";
|
||||
}
|
||||
$k = 1 - $k;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<strong>
|
||||
<?php echo JText::_( 'Checked out items have now been all checked in' ); ?>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.checkin.html.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
*/
|
||||
class TOOLBAR_checkin {
|
||||
/**
|
||||
* Draws the menu for a New category
|
||||
*/
|
||||
function _DEFAULT() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Global Check-in' ), 'checkin.png' );
|
||||
JToolBarHelper::help( 'screen.checkin' );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.checkin.html.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
*/
|
||||
class TOOLBAR_checkin {
|
||||
/**
|
||||
* Draws the menu for a New category
|
||||
*/
|
||||
function _DEFAULT() {
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Global Check-in' ), 'checkin.png' );
|
||||
JToolBarHelper::help( 'screen.checkin' );
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.checkin.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task){
|
||||
default:
|
||||
TOOLBAR_checkin::_DEFAULT();
|
||||
break;
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.checkin.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Checkin
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task){
|
||||
default:
|
||||
TOOLBAR_checkin::_DEFAULT();
|
||||
break;
|
||||
}
|
||||
@@ -1,45 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.config.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Config
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_config', 'manage' )) {
|
||||
$mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
|
||||
}
|
||||
|
||||
// Require the base controller
|
||||
require_once (JPATH_COMPONENT.DS.'controller.php');
|
||||
|
||||
// Require specific controller if requested
|
||||
if($controller = JRequest::getWord('controller', 'application')) {
|
||||
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
|
||||
if (file_exists($path)) {
|
||||
require_once $path;
|
||||
} else {
|
||||
$controller = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Create the controller
|
||||
$classname = 'ConfigController'.ucfirst($controller);
|
||||
$controller = new $classname( );
|
||||
|
||||
JResponse::setHeader( 'Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true );
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute( JRequest::getCmd( 'task' ) );
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: admin.config.php 14401 2010-01-26 14:10:00Z louis $
|
||||
* @package Joomla
|
||||
* @subpackage Config
|
||||
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! 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.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// Make sure the user is authorized to view this page
|
||||
$user = & JFactory::getUser();
|
||||
if (!$user->authorize( 'com_config', 'manage' )) {
|
||||
$mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
|
||||
}
|
||||
|
||||
// Require the base controller
|
||||
require_once (JPATH_COMPONENT.DS.'controller.php');
|
||||
|
||||
// Require specific controller if requested
|
||||
if($controller = JRequest::getWord('controller', 'application')) {
|
||||
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
|
||||
if (file_exists($path)) {
|
||||
require_once $path;
|
||||
} else {
|
||||
$controller = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Create the controller
|
||||
$classname = 'ConfigController'.ucfirst($controller);
|
||||
$controller = new $classname( );
|
||||
|
||||
JResponse::setHeader( 'Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true );
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute( JRequest::getCmd( 'task' ) );
|
||||
$controller->redirect();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user