添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@329 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +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;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: navigation.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
*/
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div class="submenu-box">
|
||||
<div class="submenu-pad">
|
||||
<ul id="submenu" class="information">
|
||||
<li>
|
||||
<a id="site" class="active">
|
||||
<?php echo JText::_( 'System Info' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="phpsettings">
|
||||
<?php echo JText::_( 'PHP Settings' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="config">
|
||||
<?php echo JText::_( 'Configuration File' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="directory">
|
||||
<?php echo JText::_( 'Directory Permissions' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a id="phpinfo">
|
||||
<?php echo JText::_( 'PHP Information' ); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
@@ -0,0 +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>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_directory.php 11613 2009-02-07 13:41:23Z kdevine $
|
||||
*/
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
jimport('joomla.filesystem.folder');
|
||||
$cparams = JComponentHelper::getParams ('com_media');
|
||||
$config =& JFactory::getConfig();
|
||||
?>
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo JText::_( 'Directory Permissions' ); ?></legend>
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="650">
|
||||
<?php echo JText::_( 'Directory' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo JText::_( 'Status' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
writableCell( 'administrator/backups' );
|
||||
writableCell( 'administrator/components' );
|
||||
writableCell( 'administrator/language' );
|
||||
|
||||
// List all admin languages
|
||||
$admin_langs = JFolder::folders(JPATH_ADMINISTRATOR.DS.'language');
|
||||
foreach ($admin_langs as $alang)
|
||||
{
|
||||
writableCell( 'administrator/language/'.$alang );
|
||||
}
|
||||
|
||||
writableCell( 'administrator/modules' );
|
||||
writableCell( 'administrator/templates' );
|
||||
writableCell( 'components' );
|
||||
writableCell( 'images' );
|
||||
writableCell( 'images/banners' );
|
||||
writableCell( $cparams->get('image_path'));
|
||||
writableCell( 'language' );
|
||||
|
||||
// List all site languages
|
||||
$site_langs = JFolder::folders(JPATH_SITE.DS.'language');
|
||||
foreach ($site_langs as $slang)
|
||||
{
|
||||
writableCell( 'language/'.$slang );
|
||||
}
|
||||
|
||||
writableCell( 'media' );
|
||||
writableCell( 'modules' );
|
||||
writableCell( 'plugins' );
|
||||
writableCell( 'plugins/content' );
|
||||
writableCell( 'plugins/editors' );
|
||||
writableCell( 'plugins/editors-xtd' );
|
||||
writableCell( 'plugins/search' );
|
||||
writableCell( 'plugins/system' );
|
||||
writableCell( 'plugins/user' );
|
||||
writableCell( 'plugins/xmlrpc' );
|
||||
writableCell( 'templates' );
|
||||
writableCell( JPATH_SITE.DS.'cache', 0, '<strong>'. JText::_( 'Cache Directory' ) .'</strong> ' );
|
||||
writableCell( JPATH_ADMINISTRATOR.DS.'cache', 0, '<strong>'. JText::_( 'Cache Directory' ) .'</strong> ' );
|
||||
writableCell( $config->getValue('config.log_path', JPATH_ROOT.DS.'log'),0, '<strong>'. JText::_( 'Log Directory' ) .
|
||||
' ($log_path)</strong> ');
|
||||
writableCell( $config->getValue('config.tmp_path', JPATH_ROOT.DS.'tmp'),0, '<strong>'. JText::_( 'Temp Directory' ) .
|
||||
' ($tmp_path)</strong> ');
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_phpinfo.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::_( 'PHP Information' ); ?></legend>
|
||||
<table class="adminform">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
ob_start();
|
||||
phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
|
||||
$phpinfo = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
|
||||
$output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
|
||||
$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
|
||||
$output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
|
||||
$output = preg_replace('#<hr />#', '', $output);
|
||||
$output = str_replace('<div class="center">', '', $output);
|
||||
$output = str_replace('</div>', '', $output);
|
||||
|
||||
echo $output;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_phpsettings.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::_( 'Relevant PHP Settings' ); ?></legend>
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250">
|
||||
<?php echo JText::_( 'Setting' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo JText::_( 'Value' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Safe Mode' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('safe_mode'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Open basedir' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo (($ob = ini_get('open_basedir')) ? $ob : JText::_( 'none' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Display Errors' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('display_errors'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Short Open Tags' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('short_open_tag'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'File Uploads' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('file_uploads'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Magic Quotes' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('magic_quotes_gpc'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Register Globals' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('register_globals'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Output Buffering' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_php_setting('output_buffering'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Session Save Path' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo (($sp=ini_get('session.save_path')) ? $sp : JText::_( 'none' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Session Auto Start' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo intval( ini_get( 'session.auto_start' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'XML Enabled' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo extension_loaded('xml') ? JText::_( 'Yes' ) : JText::_( 'No' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Zlib Enabled' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo extension_loaded('zlib') ? JText::_( 'Yes' ) : JText::_( 'No' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Disabled Functions' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo (($df=ini_get('disable_functions')) ? $df : JText::_( 'none' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Mbstring Enabled' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo extension_loaded('mbstring') ? JText::_( 'Yes' ) : JText::_( 'No' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'Iconv Available' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo function_exists('iconv') ? JText::_( 'Yes' ) : JText::_( 'No' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$query = 'SELECT name FROM #__plugins'
|
||||
. ' WHERE folder="editors" AND published="1"';
|
||||
$db->setQuery( $query, 0, 1 );
|
||||
$editor = $db->loadResult();
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo JText::_( 'WYSIWYG Editor' ); ?>:
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $editor; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: sysinfo_system.php 11713 2009-03-27 09:18:26Z willebil $
|
||||
*/
|
||||
// No direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo JText::_( 'System Information' ); ?></legend>
|
||||
<table class="adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="250">
|
||||
<?php echo JText::_( 'Setting' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo JText::_( 'Value' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<strong><?php echo JText::_( 'PHP Built On' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo php_uname(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'Database Version' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $db->getVersion(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'Database Collation' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $db->getCollation(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'PHP Version' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo phpversion(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'Web Server' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTML_admin_misc::get_server_software(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'WebServer to PHP Interface' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo php_sapi_name(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'Joomla! Version' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$version = new JVersion();
|
||||
echo $version->getLongVersion();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?php echo JText::_( 'User Agent' ); ?>:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo htmlspecialchars(phpversion() <= "4.2.1" ? getenv( "HTTP_USER_AGENT" ) : $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES);?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -0,0 +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() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +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;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
/**
|
||||
* Attachments component
|
||||
* @package Attachments
|
||||
* @Copyright (C) 2007, 2008 Jonathan M. Cameron, All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
* @link http://joomlacode.org/gf/project/attachments/frs/
|
||||
* @author Jonathan M. Cameron
|
||||
**/
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'admin_html' ) );
|
||||
|
||||
require_once( JPATH_COMPONENT.DS.'controller.php' );
|
||||
|
||||
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
|
||||
|
||||
$document = &JFactory::getDocument();
|
||||
$document->addStyleSheet( $mainframe->getSiteURL() . 'administrator/components/com_attachments/attachments.css',
|
||||
'text/css', null, array() );
|
||||
|
||||
// Check for requests for named controller
|
||||
$controller = JRequest::getWord('controller', False);
|
||||
if ( $controller ) {
|
||||
// Invoke the named controller, if it exists
|
||||
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
|
||||
jimport('joomla.filesystem.file');
|
||||
if ( JFile::exists($path) ) {
|
||||
require_once( $path );
|
||||
$classname = 'AttachmentsController'.ucfirst($controller);
|
||||
$controller = new $classname( );
|
||||
$controller->execute( JRequest::getCmd( 'task' ) );
|
||||
$controller->redirect();
|
||||
}
|
||||
else {
|
||||
echo "<h1>Error! Unable to find controller '$controller'!</h1><br>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
// Use default controller
|
||||
$controller = new AttachmentsController( array('default_task' => 'showAttachments') );
|
||||
$controller->execute( JRequest::getVar( 'task' ) );
|
||||
$controller->redirect();
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,164 @@
|
||||
/* Styles for the main list of attachments in the administrative back end */
|
||||
|
||||
table.adminlist th {
|
||||
text-align: left;
|
||||
border-bottom: 0;
|
||||
}
|
||||
table.adminlist th.at_published { text-align: center; }
|
||||
table.adminlist th.at_filename { text-align: left; }
|
||||
table.adminlist th.at_description { text-align: left; }
|
||||
table.adminlist th.at_user_field { text-align: left; }
|
||||
table.adminlist th.at_file_type { text-align: center; }
|
||||
table.adminlist th.at_file_size { text-align: center; }
|
||||
table.adminlist th.at_create_date { text-align: center; }
|
||||
table.adminlist th.at_mod_date { text-align: center; }
|
||||
table.adminlist th.at_downloads { text-align: center; }
|
||||
|
||||
table.adminlist td {
|
||||
text-align: left;
|
||||
border-bottom: 0;
|
||||
}
|
||||
table.adminlist td.at_published { text-align: center; }
|
||||
|
||||
table.adminlist td.at_filename {
|
||||
text-align: left;
|
||||
font-size: 125%;
|
||||
}
|
||||
table.adminlist td.at_filename a img {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
table.adminlist td.at_description { text-align: left; }
|
||||
table.adminlist td.at_user_field { text-align: left; }
|
||||
table.adminlist td.at_file_type { text-align: center; }
|
||||
table.adminlist td.at_file_size { text-align: center; }
|
||||
table.adminlist td.at_create_date { text-align: center; }
|
||||
table.adminlist td.at_mod_date { text-align: center; }
|
||||
table.adminlist td.at_downloads { text-align: center; }
|
||||
|
||||
|
||||
table.adminlist td.at_articlesep {
|
||||
height: 0.8em;
|
||||
background-color: #DDD;
|
||||
border-top: 1px solid #999;
|
||||
border-bottom: 1px solid #BBB;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* For the link to download a file */
|
||||
|
||||
a.downloadAttach {
|
||||
margin-left: 0px;
|
||||
font-size: 80%;
|
||||
color : red;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.downloadAttach:link { color : red; text-decoration: none; }
|
||||
a.downloadAttach:visited { color : red; text-decoration: none; }
|
||||
a.downloadAttach:hover { color : red; text-decoration: underline; }
|
||||
a.downloadAttach:active { color : red; text-decoration: none; }
|
||||
|
||||
|
||||
|
||||
/* For the link to add another attachment to an article */
|
||||
|
||||
a.addAttach {
|
||||
font-weight: normal;
|
||||
color: red;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.addAttach:link { color : red; text-decoration: none; }
|
||||
a.addAttach:visited { color : red; text-decoration: none; }
|
||||
a.addAttach:hover { color : red; text-decoration: underline; }
|
||||
a.addAttach:active { color : red; text-decoration: none; }
|
||||
|
||||
a.addAttach img {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
|
||||
/* For the link to change the article */
|
||||
|
||||
a.changeButton {
|
||||
padding-top: 1px;
|
||||
padding-top: 1px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
margin-left: 20px;
|
||||
font-size: 90%;
|
||||
color : #333333;
|
||||
text-decoration: none;
|
||||
background-color: #CCCCCC;
|
||||
border: 1px solid #888888;
|
||||
}
|
||||
a.changeButton:link { color : #333333; text-decoration: none; }
|
||||
a.changeButton:visited { color : #333333; text-decoration: none; }
|
||||
a.changeButton:hover { color : #333333; text-decoration: none; background-color: #DDDDDD; }
|
||||
a.changeButton:active { color : #333333; text-decoration: none; }
|
||||
|
||||
a.modal-button {
|
||||
padding-top: 1px;
|
||||
padding-top: 1px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
color: #333333;
|
||||
background-color: #CCCCCC;
|
||||
border: 1px solid #888888;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.modal-button:link { color: #333333; text-decoration: none; }
|
||||
a.modal-button:hover { color: #333333; text-decoration: none; background-color: #DDDDDD; }
|
||||
a.modal-button:visited { color: #333333; text-decoration: none; }
|
||||
a.modal-button:active { color: #333333; text-decoration: none; }
|
||||
|
||||
|
||||
/* For the upload attachment form */
|
||||
|
||||
form.attachmentsBackend {
|
||||
margin-top: 10px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
form.attachmentsBackend legend {
|
||||
font-size: 140%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* Styles for attachments admin */
|
||||
div.attachmentsAdmin {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div.attachmentsAdmin h1 {
|
||||
line-height: normal;
|
||||
font-size: 200%;
|
||||
font-weight: bold;
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
div.attachmentsAdmin h2 {
|
||||
line-height: normal;
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.attachmentsAdmin li a { padding: 2px; }
|
||||
div.attachmentsAdmin li a:link { color: #0000FF; text-decoration: none; }
|
||||
div.attachmentsAdmin li a:hover {
|
||||
color: #0000FF; text-decoration: none;
|
||||
background-color: #DDDDDD;
|
||||
}
|
||||
div.attachmentsAdmin li a:visited { color: #0000FF; text-decoration: none; }
|
||||
div.attachmentsAdmin li a:active { color: #0000FF; text-decoration: none; }
|
||||
|
||||
/* For icons */
|
||||
|
||||
.icon-48-attachments { background-image: url(../../components/com_attachments/attachments_logo48.png); }
|
||||
|
||||
.icon-16-attachments { background-image: url(../../components/com_attachments/icon-16-attachments.png); }
|
||||
|
||||
.icon-32-admin { background-image: url(../../components/com_attachments/attachments_admin32.png); }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
|
||||
<install type="component" version="1.5">
|
||||
<name>Attachments</name>
|
||||
<author>Jonathan M. Cameron</author>
|
||||
<creationDate>August 17, 2008</creationDate>
|
||||
<copyright>(C) 2007, 2008 Jonathan M. Cameron. All rights reserved.</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>http://joomlacode.org/gf/project/attachments/</authorUrl>
|
||||
<version>1.3.4</version>
|
||||
<description>Attachments for Articles installed: This component allows files to be uploaded and attached to articles.</description>
|
||||
<installfile>install.attachments.php</installfile>
|
||||
<uninstallfile>uninstall.attachments.php</uninstallfile>
|
||||
<install>
|
||||
<sql>
|
||||
<file driver="mysql" charset="utf8">install.mysql.sql</file>
|
||||
<file driver="mysql" charset="">install.noutf8.sql</file>
|
||||
</sql>
|
||||
</install>
|
||||
<uninstall>
|
||||
<sql>
|
||||
<file driver="mysql" charset="utf8">uninstall.mysql.sql</file>
|
||||
</sql>
|
||||
</uninstall>
|
||||
<languages folder="site">
|
||||
<language tag="en-GB">en-GB.com_attachments.ini</language>
|
||||
</languages>
|
||||
<files folder="site">
|
||||
<filename>attachments.php</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>helper.php</filename>
|
||||
<filename>permissions.php</filename>
|
||||
<filename>file_types.php</filename>
|
||||
<filename>router.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>models/index.html</filename>
|
||||
<filename>models/update.php</filename>
|
||||
<filename>views/index.html</filename>
|
||||
<filename>views/update/index.html</filename>
|
||||
<filename>views/update/view.php</filename>
|
||||
<filename>views/update/metadata.xml</filename>
|
||||
<filename>views/upload/index.html</filename>
|
||||
<filename>views/upload/metadata.xml</filename>
|
||||
<filename>views/upload/view.php</filename>
|
||||
<filename>media/index.html</filename>
|
||||
<filename>media/add_attachment.gif</filename>
|
||||
<filename>media/attachment.gif</filename>
|
||||
<filename>media/delete.gif</filename>
|
||||
<filename>media/pencil.gif</filename>
|
||||
<filename>media/update.gif</filename>
|
||||
<filename>media/icons/index.html</filename>
|
||||
<filename>media/icons/3d.gif</filename>
|
||||
<filename>media/icons/archive.gif</filename>
|
||||
<filename>media/icons/audio.gif</filename>
|
||||
<filename>media/icons/c.gif</filename>
|
||||
<filename>media/icons/cpp.gif</filename>
|
||||
<filename>media/icons/css.gif</filename>
|
||||
<filename>media/icons/csv.gif</filename>
|
||||
<filename>media/icons/download.gif</filename>
|
||||
<filename>media/icons/eps.gif</filename>
|
||||
<filename>media/icons/excel.gif</filename>
|
||||
<filename>media/icons/flash.gif</filename>
|
||||
<filename>media/icons/generic.gif</filename>
|
||||
<filename>media/icons/h.gif</filename>
|
||||
<filename>media/icons/image.gif</filename>
|
||||
<filename>media/icons/js.gif</filename>
|
||||
<filename>media/icons/midi.gif</filename>
|
||||
<filename>media/icons/mov.gif</filename>
|
||||
<filename>media/icons/music.gif</filename>
|
||||
<filename>media/icons/odg.gif</filename>
|
||||
<filename>media/icons/odp.gif</filename>
|
||||
<filename>media/icons/ods.gif</filename>
|
||||
<filename>media/icons/odt.gif</filename>
|
||||
<filename>media/icons/pdf.gif</filename>
|
||||
<filename>media/icons/php.gif</filename>
|
||||
<filename>media/icons/ppt.gif</filename>
|
||||
<filename>media/icons/ps.gif</filename>
|
||||
<filename>media/icons/rtf.gif</filename>
|
||||
<filename>media/icons/sql.gif</filename>
|
||||
<filename>media/icons/text.gif</filename>
|
||||
<filename>media/icons/video.gif</filename>
|
||||
<filename>media/icons/word.gif</filename>
|
||||
<filename>media/icons/xml.gif</filename>
|
||||
<filename>media/icons/zip.gif</filename>
|
||||
</files>
|
||||
<administration>
|
||||
<menu img="components/com_attachments/attachments.png">Attachments</menu>
|
||||
<languages folder="admin">
|
||||
<language tag="en-GB">en-GB.com_attachments.ini</language>
|
||||
<language tag="en-GB">en-GB.com_attachments.menu.ini</language>
|
||||
</languages>
|
||||
<files folder="admin">
|
||||
<filename>install.mysql.sql</filename>
|
||||
<filename>install.noutf8.sql</filename>
|
||||
<filename>uninstall.mysql.sql</filename>
|
||||
<filename>config.xml</filename>
|
||||
<filename>admin.attachments.html.php</filename>
|
||||
<filename>admin.attachments.php</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>controllers/index.html</filename>
|
||||
<filename>controllers/special.php</filename>
|
||||
<filename>models/index.html</filename>
|
||||
<filename>models/special.php</filename>
|
||||
<filename>tables/attachments.php</filename>
|
||||
<filename>tables/index.html</filename>
|
||||
<filename>views/index.html</filename>
|
||||
<filename>views/special/index.html</filename>
|
||||
<filename>views/special/view.php</filename>
|
||||
<filename>update.php</filename>
|
||||
<filename>help/index.html</filename>
|
||||
<filename>help/en-GB/help.html</filename>
|
||||
<filename>help/en-GB/help.css</filename>
|
||||
<filename>help/en-GB/index.html</filename>
|
||||
<filename>toolbar.attachments.html.php</filename>
|
||||
<filename>toolbar.attachments.php</filename>
|
||||
<filename>attachments.css</filename>
|
||||
<filename>attachments.png</filename>
|
||||
<filename>attachments_admin32.png</filename>
|
||||
<filename>attachments_logo48.png</filename>
|
||||
<filename>index.html</filename>
|
||||
</files>
|
||||
</administration>
|
||||
</install>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<params>
|
||||
<param name="who_can_see" type="list" default="logged_in"
|
||||
label="WHO CAN SEE ATTACHMENTS"
|
||||
description="WHO CAN SEE ATTACHMENTS DESCRIPTION">
|
||||
<option value="logged_in">ANY LOGGED IN USER</option>
|
||||
<option value="anyone">ANYONE</option>
|
||||
</param>
|
||||
<param name="who_can_add" type="list" default="author"
|
||||
label="WHO CAN ADD ATTACHMENTS"
|
||||
description="WHO CAN ADD ATTACHMENTS DESCRIPTION">
|
||||
<option value="author">ARTICLE AUTHOR ONLY</option>
|
||||
<option value="logged_in">ANY LOGGED IN USER</option>
|
||||
</param>
|
||||
<param name="publish_default" type="radio" default="0"
|
||||
label="ATTACHMENTS PUBLISHED BY DEFAULT"
|
||||
description="ATTACHMENTS PUBLISHED BY DEFAULT DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="auto_publish_warning" type="textarea" default=""
|
||||
label="AUTO PUBLISH WARNING" rows="2" cols="40"
|
||||
description="AUTO PUBLISH WARNING DESCRIPTION">
|
||||
</param>
|
||||
<param name="show_column_titles" type="radio" default="0"
|
||||
label="SHOW COLUMN TITLES"
|
||||
description="SHOW COLUMN TITLES DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="show_description" type="radio" default="1"
|
||||
label="SHOW ATTACHMENT DESCRIPTION"
|
||||
description="SHOW ATTACHMENT DESCRIPTION DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="show_file_size" type="radio" default="1"
|
||||
label="SHOW ATTACHMENT FILE SIZE"
|
||||
description="SHOW ATTACHMENT FILE SIZE DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="show_downloads" type="radio" default="0"
|
||||
label="SHOW NUMBER OF DOWNLOADS"
|
||||
description="SHOW NUMBER OF DOWNLOADS DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="show_modification_date" type="radio" default="0"
|
||||
label="SHOW FILE MODIFICATION DATE"
|
||||
description="SHOW FILE MODIFICATION DATE DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="mod_date_format" type="text" default="%x %H:%M"
|
||||
label="FORMAT STRING FOR MODIFICATION DATE" size="30"
|
||||
description="FORMAT STRING FOR MODIFICATION DATE DESCRIPTION">
|
||||
</param>
|
||||
<param name="sort_order" type="list" default="filename"
|
||||
label="ATTACHMENTS LIST ORDER"
|
||||
description="ATTACHMENTS LIST ORDER DESCRIPTION">
|
||||
<option value="filename">SORT FILENAME</option>
|
||||
<option value="file_size">SORT FILE SIZE</option>
|
||||
<option value="file_size_desc">SORT FILE SIZE DESCENDING</option>
|
||||
<option value="description">SORT DESCRIPTION</option>
|
||||
<option value="create_date">SORT CREATE DATE</option>
|
||||
<option value="create_date_desc">SORT CREATE DATE DESCENDING</option>
|
||||
<option value="modification_date">SORT MODIFICATION DATE</option>
|
||||
<option value="modification_date_desc">SORT MODIFICATION DATE DESCENDING</option>
|
||||
<option value="id">SORT ATTACHMENT ID</option>
|
||||
<option value="user_field_1">USER DEFINED FIELD 1</option>
|
||||
<option value="user_field_2">USER DEFINED FIELD 2</option>
|
||||
<option value="user_field_3">USER DEFINED FIELD 3</option>
|
||||
</param>
|
||||
<param name="user_field_1_name" type="text" default=""
|
||||
label="USER DEFINED FIELD 1 NAME" size="40"
|
||||
description="USER DEFINED FIELD NAME DESCRIPTION">
|
||||
</param>
|
||||
<param name="user_field_2_name" type="text" default=""
|
||||
label="USER DEFINED FIELD 2 NAME" size="40"
|
||||
description="USER DEFINED FIELD NAME DESCRIPTION">
|
||||
</param>
|
||||
<param name="user_field_3_name" type="text" default=""
|
||||
label="USER DEFINED FIELD 3 NAME" size="40"
|
||||
description="USER DEFINED FIELD NAME DESCRIPTION">
|
||||
</param>
|
||||
<param name="max_filename_length" type="text" default="0"
|
||||
label="MAX FILENAME LENGTH" size="2"
|
||||
description="MAX FILENAME LENGTH DESCRIPTION">
|
||||
</param>
|
||||
<param name="attachments_table_style" type="text" default="attachmentsList"
|
||||
label="CSS STYLE FOR ATTACHMENTS TABLES" size="40"
|
||||
description="CSS STYLE FOR ATTACHMENTS TABLES DESCRIPTION">
|
||||
</param>
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="file_link_open_mode" type="radio" default="in_same_window"
|
||||
label="FILE LINK OPEN MODE"
|
||||
description="FILE LINK OPEN MODE DESCRIPTION">
|
||||
<option value="in_same_window">IN SAME WINDOW</option>
|
||||
<option value="new_window">IN NEW WINDOW</option>
|
||||
</param>
|
||||
<param name="prepend" type="list" default="article_id"
|
||||
label="PREPEND TO SYSTEM FILENAME"
|
||||
description="PREPEND TO SYSTEM FILENAME DESCRIPTION">
|
||||
<option value="article_id">ARTICLE ID</option>
|
||||
<option value="attachment_id">ATTACHMENT ID</option>
|
||||
<option value="nothing">NOTHING</option>
|
||||
</param>
|
||||
<param name="attachments_subdir" type="text" default="attachments"
|
||||
label="SUBDIRECTORY FOR UPLOADS" size="80"
|
||||
description="SUBDIRECTORY FOR UPLOADS DESCRIPTION">
|
||||
</param>
|
||||
<param name="attachments_titles" type="textarea" default=""
|
||||
label="CUSTOM TITLES FOR ATTACHMENTS LISTS" rows="3" cols="40"
|
||||
description="CUSTOM TITLES FOR ATTACHMENTS LISTS DESCRIPTION">
|
||||
</param>
|
||||
<param name="hide_attachments_for" type="text" default=""
|
||||
label="HIDE ATTACHMENTS FOR" size="255"
|
||||
description="HIDE ATTACHMENTS FOR DESCRIPTION">
|
||||
</param>
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="secure" type="radio" default="0"
|
||||
label="SECURE ATTACHMENT DOWNLOADS"
|
||||
description="SECURE ATTACHMENT DOWNLOADS DESCRIPTION">
|
||||
<option value="1">Yes</option>
|
||||
<option value="0">No</option>
|
||||
</param>
|
||||
<param name="download_mode" type="radio" default="inline"
|
||||
label="DOWNLOAD MODE FOR SECURE DOWNLOADS"
|
||||
description="DOWNLOAD MODE FOR SECURE DOWNLOADS DESCRIPTION">
|
||||
<option value="inline">INLINE</option>
|
||||
<option value="attachment">ATTACHMENT</option>
|
||||
</param>
|
||||
<param name="register_url" type="text"
|
||||
default="index.php?option=com_user&task=register"
|
||||
label="URL TO REGISTER" size="255"
|
||||
description="URL TO REGISTER DESCRIPTION">
|
||||
</param>
|
||||
</params>
|
||||
</config>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Attachments component
|
||||
* @package Attachments
|
||||
* @Copyright (C) 2007, 2008 Jonathan M. Cameron, All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
* @link http://joomlacode.org/gf/project/attachments/frs/
|
||||
* @author Jonathan M. Cameron
|
||||
**/
|
||||
|
||||
/**
|
||||
* The controller for special requests
|
||||
* (adapted from administrator/components/com_config/controllers/component.php)
|
||||
*/
|
||||
class AttachmentsControllerSpecial extends JController
|
||||
{
|
||||
/**
|
||||
* Custom Constructor
|
||||
*/
|
||||
function __construct( $default = array())
|
||||
{
|
||||
$default['default_task'] = 'noop';
|
||||
parent::__construct( $default );
|
||||
}
|
||||
|
||||
function noop()
|
||||
{
|
||||
echo "<h1>Special function not specified!</h1>";
|
||||
exit();
|
||||
}
|
||||
|
||||
function editParams()
|
||||
{
|
||||
// This function allows editing the Attachments parameters
|
||||
// with a form that has a regular submit button (not Javascript).
|
||||
//
|
||||
// This function is for automated testing of the Attachments
|
||||
// extension and as exactly the same functionality as the regular
|
||||
// Attachments parameter editor in the component manager, except
|
||||
// that it is not a pop-up window.
|
||||
//
|
||||
// Due to the implementation of the component parameter editor for
|
||||
// pop up frames, this save form pops back into edit mode after saving.
|
||||
|
||||
$model = $this->getModel('Special');
|
||||
if ( !$model ) {
|
||||
echo "Unable to find Special model! <br>";
|
||||
exit();
|
||||
}
|
||||
|
||||
$table =& JTable::getInstance('component');
|
||||
if (!$table->loadByOption( 'com_attachments' ))
|
||||
{
|
||||
JError::raiseWarning( 500, 'Unable to load Attachments component' );
|
||||
return false;
|
||||
}
|
||||
|
||||
require_once(JPATH_COMPONENT.DS.'views'.DS.'special'.DS.'view.php');
|
||||
$view = new AttachmentsViewSpecial( );
|
||||
$view->assignRef('component', $table);
|
||||
$view->setModel( $model, true );
|
||||
$view->display();
|
||||
}
|
||||
|
||||
|
||||
function showSEF()
|
||||
{
|
||||
global $mainframe;
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
echo "<html><head><title>SEF Status</title></head><body>";
|
||||
echo "SEF: " . $mainframe->getCfg('sef') . "<br>";
|
||||
echo "</body></html>";
|
||||
exit();
|
||||
}
|
||||
|
||||
function listAttachmentIDs()
|
||||
{
|
||||
$db =& JFactory::getDBO();
|
||||
$query = "SELECT attach.id,article_id,art.sectionid,art.catid FROM #__attachments as attach ";
|
||||
$query .= "LEFT JOIN #__content as art ON attach.article_id = art.id ORDER BY art.id";
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadObjectList();
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
echo "\n<html><head><title>Attachment IDs</title></head><body>\n";
|
||||
echo "Attachment IDS:";
|
||||
foreach ($rows as $row) {
|
||||
echo " " . $row->id . "/" . $row->article_id . "/" . $row->sectionid . "/" . $row->catid;
|
||||
}
|
||||
echo "\n</body></html>";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Define some functions for URLs to invoke the udpate functions
|
||||
// (We could move these to an update controller...)
|
||||
//
|
||||
|
||||
function add_icon_filenames()
|
||||
{
|
||||
global $option;
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
$msg = AttachmentsUpdate::add_icon_filenames();
|
||||
$this->setRedirect('index.php?option=' . $option, $msg);
|
||||
}
|
||||
|
||||
|
||||
function update_null_dates($redirect=true)
|
||||
{
|
||||
global $option;
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
|
||||
$numUpdated = AttachmentsUpdate::update_null_dates();
|
||||
$msg = JText::sprintf( 'UPDATED N ATTACHMENTS', $numUpdated );
|
||||
$this->setRedirect('index.php?option=' . $option, $msg);
|
||||
}
|
||||
|
||||
|
||||
function update_attachments_table()
|
||||
{
|
||||
global $option;
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
|
||||
echo "\n<html><head><title>Updating Attachments Tables</title></head><body>\n";
|
||||
echo "<h2>Updating Attachments Tables</h2>\n";
|
||||
|
||||
AttachmentsUpdate::update_attachments_table();
|
||||
|
||||
$return_url = JURI::base();
|
||||
echo "<br> <br><a href=\"$return_url\">Return to Admin page</a>\n";
|
||||
echo "</body>\n</html>";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
function disable_sql_uninstall()
|
||||
{
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
|
||||
$close =JRequest::getVar('close', false);
|
||||
$msg = AttachmentsUpdate::disable_sql_uninstall();
|
||||
|
||||
if ( $close ) {
|
||||
require_once(JPATH_COMPONENT_SITE.DS.'helper.php');
|
||||
AttachmentsHelper::enqueueSystemMessage($msg);
|
||||
|
||||
// Close this window and refesh the parent window
|
||||
echo "<script>window.parent.document.getElementById('sbox-window').close();
|
||||
window.parent.location.reload();</script>";
|
||||
}
|
||||
else {
|
||||
global $option;
|
||||
$this->setRedirect('index.php?option=' . $option, $msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function regenerate_system_filenames()
|
||||
{
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
|
||||
$close =JRequest::getVar('close', false);
|
||||
$msg = AttachmentsUpdate::regenerate_system_filenames();
|
||||
|
||||
if ( $close ) {
|
||||
require_once(JPATH_SITE.DS.'components'.DS.'com_attachments'.DS.'helper.php');
|
||||
AttachmentsHelper::enqueueSystemMessage($msg);
|
||||
echo "<script>window.parent.document.getElementById('sbox-window').close();
|
||||
window.parent.location.reload();</script>";
|
||||
}
|
||||
else {
|
||||
global $option;
|
||||
$this->setRedirect('index.php?option=' . $option, $msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
ul li {
|
||||
/* border: 1px solid blue; */
|
||||
border-top: 12px solid transparent;
|
||||
}
|
||||
|
||||
ol li {
|
||||
border-top: 4px solid transparent;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 0px;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 18px;
|
||||
margin-bottom: 4px;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
h3 {
|
||||
margin-top: 0px;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
span.atop {
|
||||
padding-left: 1em;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
a:link { color : #0033ff; text-decoration: none; }
|
||||
a:visited { color : #0033ff; text-decoration: none; }
|
||||
a:hover { color : #0033ff; text-decoration: underline; }
|
||||
a:active { color : #0033ff; text-decoration: none; }
|
||||
|
||||
ul.url {
|
||||
margin-top: 4px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
ul.url li {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
ul.url a {
|
||||
font-weight: bold;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
/**
|
||||
* Attachments component
|
||||
* @package Attachments
|
||||
* @Copyright (C) 2007, 2008 Jonathan M. Cameron, All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
* @link http://joomlacode.org/gf/project/attachments/frs/
|
||||
* @author Jonathan M. Cameron
|
||||
**/
|
||||
|
||||
function com_install()
|
||||
{
|
||||
// First make sure that this version of Joomla is 1.5 or greater
|
||||
$version = new JVersion();
|
||||
if ( (real)$version->RELEASE < 1.5 ) {
|
||||
echo "<h1 style=\"color: red;\">The 'Attachments' package will only work on Joomla version 1.5 or later!</h1>";
|
||||
return false;
|
||||
}
|
||||
|
||||
echo "<h3>Updating Attachments Table...</h3>\n";
|
||||
require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_attachments'.DS.'update.php');
|
||||
AttachmentsUpdate::update_attachments_table();
|
||||
|
||||
// Check to see if the plugin has been installed yet
|
||||
$plugin_installed = false;
|
||||
$plugin_published = false;
|
||||
$db =& JFactory::getDBO();
|
||||
$query = "SELECT published FROM #__plugins WHERE element='attachments' AND folder='content' LIMIT 1";
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadObjectList();
|
||||
if ( count($rows) > 0 ) {
|
||||
$plugin_installed = true;
|
||||
$plugin_published = (intval($rows[0]->published) == 1);
|
||||
}
|
||||
|
||||
echo '<div class="header">Attachments for articles component succesfully installed! <br>';
|
||||
|
||||
if ( $plugin_installed ) {
|
||||
if ( !$plugin_published )
|
||||
echo "<i>Don’t forget to enable the plugins!</i>";
|
||||
}
|
||||
else {
|
||||
echo "<i>Don’t forget to install the plugins too!</i>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<h2>NOTES:</h2>
|
||||
|
||||
<p>
|
||||
Once the attachment plugins and component have been installed and the plugins are enabled,
|
||||
the attachments should work. The default after installation is for the attachments to be
|
||||
visible to anyone that is logged in and for the link to add attachments to visible only
|
||||
to the author of the article. Both of these options can be changed via the attachments
|
||||
parameters which can be changed in the component manager (go to the administrative back end,
|
||||
select "Article Attachments" under the "Components" menu, and click on the Parameters
|
||||
item on the toolbar).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once an attachment is uploaded, it is not visible until it is published. To do this go to the
|
||||
administrative backend and select "Article Attachments" under the "Components" menu. This will
|
||||
show a list of attachments and has controls to publish the attachments. The option to make
|
||||
attachments automatically be published after they are uploaded can be changed via the Attachments
|
||||
component manager.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This extension respects the options in the Media Manager regarding what types of files can
|
||||
be uploaded. If you can’t attach certain file types (such as zip files), go to the
|
||||
"Global Configuration" item under the "Site" menu in the administrative backend. Click
|
||||
on the "System" tab and look for the "Media Settings" section. You can add appropriate
|
||||
file extensions or mime types there.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please see the help page for further details, including known limitations of this extension
|
||||
and suggestions on how to upgrade this extension. To get to the help page, select
|
||||
"Article Attachments" under the "Components" menu in the adminstrative backend.
|
||||
Click on the help icon on the toolbar to bring up the help page. Or you may use this URL:
|
||||
<a href="<?php echo JURI::base(); ?>components/com_attachments/help/en-GB/help.html"
|
||||
target="_blank">Help File (in English)</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please report bugs and suggestions to <a href="mailto:[email protected]">[email protected]</a>.
|
||||
</p>
|
||||
<?php
|
||||
|
||||
return true;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__attachments`
|
||||
(
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`filename` VARCHAR(80) NOT NULL,
|
||||
`filename_sys` VARCHAR(255) NOT NULL,
|
||||
`file_type` VARCHAR(30) NOT NULL,
|
||||
`file_size` INT(11) UNSIGNED NOT NULL,
|
||||
`icon_filename` VARCHAR(20) NOT NULL,
|
||||
`display_filename` VARCHAR(80) NOT NULL DEFAULT '',
|
||||
`description` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`url` VARCHAR(255) NOT NULL,
|
||||
`uploader_id` INT(11) NOT NULL,
|
||||
`article_id` INT(11) UNSIGNED NOT NULL,
|
||||
`published` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
|
||||
`user_field_1` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
`user_field_2` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
`user_field_3` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
`create_date` DATETIME DEFAULT NULL,
|
||||
`modification_date` DATETIME DEFAULT NULL,
|
||||
`download_count` INT(11) UNSIGNED DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user