- md5
- 564b9f94136c13b3f5ab4b088ed71bcb
- sha1
- 5c468a3ccf568eafacfb02641d10e73a44a6b9f8
- sha256
- c8d0342492d44f4528ea144885fd586833efb294fcde397b43368a3f8bdab12c
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
<?php
/**
* @version $Id: admin.trash.html.php 3310 2006-04-26 19:22:43Z stingrey $
* @package Joomla
* @subpackage Trash
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html 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( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* HTML class for all trash component output
* @package Joomla
* @subpackage Trash
*/
class HTML_trash {
/**
* Writes a list of the Trash items
*/
function showList( $option, $contents, $menus, $pageNav_content, $pageNav_menu ) {
global $my;
$tabs = new mosTabs(1);
?>
<script language="javascript" type="text/javascript">
/**
* Toggles the check state of a group of boxes
*
* Checkboxes must have an id attribute in the form cb0, cb1...
* @param The number of box to 'check'
*/
function checkAll_xtd ( n ) {
var f = document.adminForm;
var c = f.toggle1.checked;
var n2 = 0;
for ( i=0; i < n; i++ ) {
cb = eval( 'f.cb1' + i );
if (cb) {
cb.checked = c;
n2++;
}
}
if (c) {
document.adminForm.boxchecked.value = n2;
} else {
document.adminForm.boxchecked.value = 0;
}
}
</script>
<form action="index2.php?option=com_trash" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="trash">Trash Manager</th>
</tr>
</table>
<?php
$tabs->startPane("content-pane");
$tabs->startTab("Content Items","content_items");
?>
<table class="adminheading" width="90%">
<tr>
<th><small>Content Items</small></th>
</tr>
</table>
<table class="adminlist" width="90%">
<tr>
<th width="20">#</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $contents );?>);" />
</th>
<th width="20px"> </th>
<th class="title">
Title
</th>
<th>
Section
</th>
<th>
Category
</th>
<th width="70px">
ID
</th>
</tr>
<?php
$k = 0;
$i = 0;
$n = count( $contents );
foreach ( $contents as $row ) {
?>
<tr class="<?php echo "row". $k; ?>">
<td align="center" width="30px">
<?php echo $i + 1 + $pageNav_content->limitstart;?>
</td>
<td width="20px" align="center"><?php echo mosHTML::idBox( $i, $row->id ); ?></td>
<td width="20px"></td>
<td nowrap>
<?php
echo $row->title;
?>
</td>
<td align="center" width="20%">
<?php
echo $row->sectname;
?>
</td>
<td align="center" width="20%">
<?php
echo $row->catname;
?>
</td>
<td align="center">
<?php
echo $row->id;
?>
</td>
</tr>
<?php
$k = 1 - $k;
$i++;
}
?>
</table>
<?php echo $pageNav_content->getListFooter(); ?>
<?php
$tabs->endTab();
$tabs->startTab("Menu Items","menu_items");
?>
<table class="adminheading" width="90%">
<tr>
<th><small>Menu Items</small></th>
</tr>
</table>
<table class="adminlist" width="90%">
<tr>
<th width="20">#</th>
<th width="20">
<input type="checkbox" name="toggle1" value="" onClick="checkAll_xtd(<?php echo count( $menus );?>);" />
</th>
<th width="20px"> </th>
<th class="title">
Title
</th>
<th>
Menu
</th>
<th>
Type
</th>
<th width="70px">
ID
</th>
</tr>
<?php
$k = 0;
$i = 0;
$n = count( $menus );
foreach ( $menus as $row ) {
?>
<tr class="<?php echo "row". $k; ?>">
<td align="center" width="30px">
<?php echo $i + 1 + $pageNav_menu->limitstart;?>
</td>
<td width="30px" align="center">
<input type="checkbox" id="cb1<?php echo $i;?>" name="mid[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);" />
</td>
<td width="20px"></td>
<td nowrap>
<?php
echo $row->name;
?>
</td>
<td align="center" width="20%">
<?php
echo $row->menutype;
?>
</td>
<td align="center" width="20%">
<?php
echo $row->type;
?>
</td>
<td align="center">
<?php
echo $row->id;
?>
</td>
</tr>
<?php
$k = 1 - $k;
$i++;
}
?>
</table>
<?php echo $pageNav_menu->getListFooter(); ?>
<?php
$tabs->endTab();
$tabs->endPane();
?>
<input type="hidden" name="option" value="com_trash" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
</form>
<?php
}
/**
* A delete confirmation page
* Writes list of the items that have been selected for deletion
*/
function showDelete( $option, $cid, $items, $type ) {
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>Delete Items</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="20%">
<strong>Number of Items:</strong>
<br />
<font color="#000066"><strong><?php echo count( $cid ); ?></strong></font>
<br /><br />
</td>
<td align="left" valign="top" width="25%">
<strong>Items being Deleted:</strong>
<br />
<?php
echo "<ol>";
foreach ( $items as $item ) {
echo "<li>". $item->name ."</li>";
}
echo "</ol>";
?>
</td>
<td valign="top">
* This will <strong><font color="#FF0000">Permanently Delete</font></strong> <br />these Items from the Database *
<br /><br /><br />
<div style="border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 50px;">
<a class="toolbar" href="javascript:if (confirm('Are you sure you want to Deleted the listed items? \nThis will Permanently Delete them from the database.')){ submitbutton('delete');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('remove','','images/delete_f2.png',1);">
<img name="remove" src="images/delete.png" alt="Delete" border="0" align="middle" />
Delete
</a>
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="type" value="<?php echo $type; ?>" />
<?php
foreach ($cid as $id) {
echo "\n<input type=\"hidden\" name=\"cid[]\" value=\"$id\" />";
}
?>
</form>
<?php
}
/**
* A restore confirmation page
* Writes list of the items that have been selected for restore
*/
function showRestore( $option, $cid, $items, $type ) {
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>Restore Items</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="20%">
<strong>Number of Items:</strong>
<br />
<font color="#000066"><strong><?php echo count( $cid ); ?></strong></font>
<br /><br />
</td>
<td align="left" valign="top" width="25%">
<strong>Items being Restored:</strong>
<br />
<?php
echo "<ol>";
foreach ( $items as $item ) {
echo "<li>". $item->name ."</li>";
}
echo "</ol>";
?>
</td>
<td valign="top">
* This will <strong><font color="#FF0000">Restore</font></strong> these Items,<br />they will be returned to their orignial places as Unpublished items *
<br /><br /><br />
<div style="border: 1px dotted gray; width: 80px; padding: 10px; margin-left: 50px;">
<a class="toolbar" href="javascript:if (confirm('Are you sure you want to Restore the listed items?.')){ submitbutton('restore');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('restore','','images/restore_f2.png',1);">
<img name="restore" src="images/restore.png" alt="Restore" border="0" align="middle" />
Restore
</a>
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="type" value="<?php echo $type; ?>" />
<?php
foreach ($cid as $id) {
echo "\n<input type=\"hidden\" name=\"cid[]\" value=\"$id\" />";
}
?>
</form>
<?php
}
}
?>
The same content is in 3 releases, Joomla 1.0.9 to 1.0.11. See them all, or every version of this file.