Files
@ f4e0e3085bf0
Branch filter:
Location: hot67beta/administrator/components/com_cache/admin.cache.html.php
f4e0e3085bf0
4.1 KiB
text/x-php
morepad
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | <?php
/**
* @version $Id: admin.cache.html.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' );
/**
* HTML View class for the Cache component
*
* @static
* @package Joomla
* @subpackage Cache
* @since 1.5
*/
class CacheView
{
/**
* Displays the cache
*
* @param array An array of records
* @param string The URL option
*/
function displayCache(&$rows, &$client, &$page)
{
?>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist" cellspacing="1">
<thead>
<tr>
<th class="title" width="10">
<?php echo JText::_( 'Num' ); ?>
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows );?>);" />
</th>
<th class="title" nowrap="nowrap">
<?php echo JText::_( 'Cache Group' ); ?>
</th>
<th width="5%" align="center" nowrap="nowrap">
<?php echo JText::_( 'Number of Files' ); ?>
</th>
<th width="10%" align="center">
<?php echo JText::_( 'Size' ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php echo $page->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$rc = 0;
for ($i = 0, $n = count($rows); $i < $n; $i ++) {
$row = & $rows[$i];
?>
<tr class="<?php echo "row$rc"; ?>" >
<td>
<?php echo $page->getRowOffset( $i ); ?>
</td>
<td>
<input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->group; ?>" onclick="isChecked(this.checked);" />
</td>
<td>
<span class="bold">
<?php echo $row->group; ?>
</span>
</td>
<td align="center">
<?php echo $row->count; ?>
</td>
<td align="center">
<?php echo $row->size ?>
</td>
</tr>
<?php
$rc = 1 - $rc;
}
?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="option" value="com_cache" />
<input type="hidden" name="client" value="<?php echo $client->id;?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
}
function showPurgeExecute(){
?>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist" cellspacing="1">
<thead>
<tr>
<th align="left" style="text-align: left;">
<?php echo JText::_( 'Purge expired items' ); ?>
</th>
</tr>
</thead>
<tr>
<td align="left">
<?php echo JText::_( 'Click on the Purge expired icon in the toolbar to delete all expired cache files. Note: Cache files that are still current will not be deleted.'); ?> <br />
<span style="font-weight: bold"><?php echo JText::_( 'WARNING: This can be resource intensive on sites with large number of items!' ); ?></span>
</td>
</tr>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="option" value="com_cache" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
}
function purgeSuccess(){
?>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist" cellspacing="1">
<thead>
<tr>
<th align="left" style="text-align: left;">
<?php echo JText::_( 'Success!' ); ?>
</th>
</tr>
</thead>
<tr>
<td align="left">
<?php echo JText::_( 'Expired items have been purged' ); ?>
</td>
</tr>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="option" value="com_cache" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php
}
}
|