Annotation of /mambo/branches/4.6/administrator/components/com_trash/admin.trash.html.php
Parent Directory
|
Revision Log
Revision 241 - (view) (download)
| 1 : | gin | 240 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: admin.trash.html.php,v 1.1 2005/07/22 01:53:32 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Trash | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | /** | ||
| 15 : | * HTML class for all trash component output | ||
| 16 : | * @package Mambo | ||
| 17 : | * @subpackage Trash | ||
| 18 : | */ | ||
| 19 : | class HTML_trash { | ||
| 20 : | /** | ||
| 21 : | * Writes a list of the Trash items | ||
| 22 : | */ | ||
| 23 : | function showList( $option, $contents, $menus, $pageNav_content, $pageNav_menu ) { | ||
| 24 : | global $my; | ||
| 25 : | $tabs = new mosTabs(1); | ||
| 26 : | ?> | ||
| 27 : | <script language="javascript" type="text/javascript"> | ||
| 28 : | /** | ||
| 29 : | * Toggles the check state of a group of boxes | ||
| 30 : | * | ||
| 31 : | * Checkboxes must have an id attribute in the form cb0, cb1... | ||
| 32 : | * @param The number of box to 'check' | ||
| 33 : | */ | ||
| 34 : | function checkAll_xtd ( n ) { | ||
| 35 : | gin | 241 | //var f = document.adminForm; |
| 36 : | var f=document.getElementById("adminForm1"); | ||
| 37 : | gin | 240 | var c = f.toggle1.checked; |
| 38 : | var n2 = 0; | ||
| 39 : | for ( i=0; i < n; i++ ) { | ||
| 40 : | cb = eval( 'f.cb1' + i ); | ||
| 41 : | if (cb) { | ||
| 42 : | cb.checked = c; | ||
| 43 : | n2++; | ||
| 44 : | } | ||
| 45 : | } | ||
| 46 : | if (c) { | ||
| 47 : | gin | 241 | f.boxchecked.value = n2; |
| 48 : | gin | 240 | } else { |
| 49 : | gin | 241 | f.boxchecked.value = 0; |
| 50 : | gin | 240 | } |
| 51 : | } | ||
| 52 : | </script> | ||
| 53 : | gin | 241 | <form action="index2.php" method="post" name="adminForm" id="adminForm"> |
| 54 : | gin | 240 | <table class="adminheading"> |
| 55 : | <tr> | ||
| 56 : | <th class="trash"><?php echo T_('Trash Manager') ?></th> | ||
| 57 : | </tr> | ||
| 58 : | </table> | ||
| 59 : | |||
| 60 : | <?php | ||
| 61 : | $tabs->startPane("content-pane"); | ||
| 62 : | $tabs->startTab(T_("Content Items"),"content_items"); | ||
| 63 : | ?> | ||
| 64 : | <table class="adminheading" width="90%"> | ||
| 65 : | <tr> | ||
| 66 : | <th><small><?php echo T_('Content Items') ?></small></th> | ||
| 67 : | </tr> | ||
| 68 : | </table> | ||
| 69 : | |||
| 70 : | <table class="adminlist" width="90%"> | ||
| 71 : | <tr> | ||
| 72 : | <th width="20">#</th> | ||
| 73 : | <th width="20"> | ||
| 74 : | <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $contents );?>);" /> | ||
| 75 : | </th> | ||
| 76 : | <th width="20px"> </th> | ||
| 77 : | <th class="title"> | ||
| 78 : | <?php echo T_('Title') ?> | ||
| 79 : | </th> | ||
| 80 : | <th> | ||
| 81 : | <?php echo T_('Section') ?> | ||
| 82 : | </th> | ||
| 83 : | <th> | ||
| 84 : | <?php echo T_('Category') ?> | ||
| 85 : | </th> | ||
| 86 : | <th width="70px"> | ||
| 87 : | <?php echo T_('ID') ?> | ||
| 88 : | </th> | ||
| 89 : | </tr> | ||
| 90 : | <?php | ||
| 91 : | $k = 0; | ||
| 92 : | $i = 0; | ||
| 93 : | $n = count( $contents ); | ||
| 94 : | foreach ( $contents as $row ) { | ||
| 95 : | ?> | ||
| 96 : | <tr class="<?php echo "row". $k; ?>"> | ||
| 97 : | <td align="center" width="30px"> | ||
| 98 : | <?php echo $i + 1 + $pageNav_content->limitstart;?> | ||
| 99 : | </td> | ||
| 100 : | <td width="20px" align="center"><?php echo mosHTML::idBox( $i, $row->id ); ?></td> | ||
| 101 : | <td width="20px"></td> | ||
| 102 : | <td nowrap> | ||
| 103 : | <?php | ||
| 104 : | echo $row->title; | ||
| 105 : | ?> | ||
| 106 : | </td> | ||
| 107 : | <td align="center" width="20%"> | ||
| 108 : | <?php | ||
| 109 : | echo $row->sectname; | ||
| 110 : | ?> | ||
| 111 : | </td> | ||
| 112 : | <td align="center" width="20%"> | ||
| 113 : | <?php | ||
| 114 : | echo $row->catname; | ||
| 115 : | ?> | ||
| 116 : | </td> | ||
| 117 : | <td align="center"> | ||
| 118 : | <?php | ||
| 119 : | echo $row->id; | ||
| 120 : | ?> | ||
| 121 : | </td> | ||
| 122 : | </tr> | ||
| 123 : | <?php | ||
| 124 : | $k = 1 - $k; | ||
| 125 : | $i++; | ||
| 126 : | } | ||
| 127 : | ?> | ||
| 128 : | </table> | ||
| 129 : | <?php echo $pageNav_content->getListFooter(); ?> | ||
| 130 : | <?php | ||
| 131 : | $tabs->endTab(); | ||
| 132 : | gin | 241 | ?> |
| 133 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 134 : | <input type="hidden" name="task" value="" /> | ||
| 135 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 136 : | gin | 240 | |
| 137 : | gin | 241 | <?php |
| 138 : | $i=0; | ||
| 139 : | foreach ( $menus as $row ) { | ||
| 140 : | ?> | ||
| 141 : | <input type="checkbox" style="visibility:hidden;" id="dcb<?php echo $i;?>" name="mid[]" value="<?php echo $row->id; ?>"> | ||
| 142 : | <?php | ||
| 143 : | $i++; | ||
| 144 : | } | ||
| 145 : | ?> | ||
| 146 : | </form> | ||
| 147 : | |||
| 148 : | <form action="index2.php" method="post" name="" id="adminform1"> | ||
| 149 : | <?php | ||
| 150 : | gin | 240 | $tabs->startTab(T_("Menu Items"),"menu_items"); |
| 151 : | ?> | ||
| 152 : | <table class="adminheading" width="90%"> | ||
| 153 : | <tr> | ||
| 154 : | <th><small><?php echo T_('Menu Items') ?></small></th> | ||
| 155 : | </tr> | ||
| 156 : | </table> | ||
| 157 : | |||
| 158 : | <table class="adminlist" width="90%"> | ||
| 159 : | <tr> | ||
| 160 : | <th width="20">#</th> | ||
| 161 : | <th width="20"> | ||
| 162 : | <input type="checkbox" name="toggle1" value="" onClick="checkAll_xtd(<?php echo count( $menus );?>);" /> | ||
| 163 : | </th> | ||
| 164 : | <th width="20px"> </th> | ||
| 165 : | <th class="title"> | ||
| 166 : | <?php echo T_('Title') ?> | ||
| 167 : | </th> | ||
| 168 : | <th> | ||
| 169 : | <?php echo T_('Menu') ?> | ||
| 170 : | </th> | ||
| 171 : | <th> | ||
| 172 : | <?php echo T_('Type') ?> | ||
| 173 : | </th> | ||
| 174 : | <th width="70px"> | ||
| 175 : | <?php echo T_('ID') ?> | ||
| 176 : | </th> | ||
| 177 : | </tr> | ||
| 178 : | <?php | ||
| 179 : | $k = 0; | ||
| 180 : | $i = 0; | ||
| 181 : | $n = count( $menus ); | ||
| 182 : | foreach ( $menus as $row ) { | ||
| 183 : | ?> | ||
| 184 : | <tr class="<?php echo "row". $k; ?>"> | ||
| 185 : | <td align="center" width="30px"> | ||
| 186 : | <?php echo $i + 1 + $pageNav_menu->limitstart;?> | ||
| 187 : | </td> | ||
| 188 : | <td width="30px" align="center"> | ||
| 189 : | gin | 241 | <input type="checkbox" id="cb1<?php echo $i;?>" name="mid[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);document.getElementById('dcb<?php echo $i;?>').checked=this.checked;" /> |
| 190 : | gin | 240 | </td> |
| 191 : | <td width="20px"></td> | ||
| 192 : | <td nowrap> | ||
| 193 : | <?php | ||
| 194 : | echo $row->name; | ||
| 195 : | ?> | ||
| 196 : | </td> | ||
| 197 : | <td align="center" width="20%"> | ||
| 198 : | <?php | ||
| 199 : | echo $row->menutype; | ||
| 200 : | ?> | ||
| 201 : | </td> | ||
| 202 : | <td align="center" width="20%"> | ||
| 203 : | <?php | ||
| 204 : | echo $row->type; | ||
| 205 : | ?> | ||
| 206 : | </td> | ||
| 207 : | <td align="center"> | ||
| 208 : | <?php | ||
| 209 : | echo $row->id; | ||
| 210 : | ?> | ||
| 211 : | </td> | ||
| 212 : | </tr> | ||
| 213 : | <?php | ||
| 214 : | $k = 1 - $k; | ||
| 215 : | $i++; | ||
| 216 : | } | ||
| 217 : | ?> | ||
| 218 : | </table> | ||
| 219 : | <?php echo $pageNav_menu->getListFooter(); ?> | ||
| 220 : | <?php | ||
| 221 : | $tabs->endTab(); | ||
| 222 : | $tabs->endPane(); | ||
| 223 : | ?> | ||
| 224 : | |||
| 225 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 226 : | <input type="hidden" name="task" value="" /> | ||
| 227 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 228 : | </form> | ||
| 229 : | <?php | ||
| 230 : | } | ||
| 231 : | |||
| 232 : | |||
| 233 : | /** | ||
| 234 : | * A delete confirmation page | ||
| 235 : | * Writes list of the items that have been selected for deletion | ||
| 236 : | */ | ||
| 237 : | function showDelete( $option, $cid, $items, $type ) { | ||
| 238 : | ?> | ||
| 239 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 240 : | <table class="adminheading"> | ||
| 241 : | <tr> | ||
| 242 : | <th><?php echo T_('Delete Items') ?></th> | ||
| 243 : | </tr> | ||
| 244 : | </table> | ||
| 245 : | |||
| 246 : | <br /> | ||
| 247 : | <table class="adminform"> | ||
| 248 : | <tr> | ||
| 249 : | <td width="3%"></td> | ||
| 250 : | <td align="left" valign="top" width="20%"> | ||
| 251 : | <strong><?php echo T_('Number of Items:') ?></strong> | ||
| 252 : | <br /> | ||
| 253 : | <font color="#000066"><strong><?php echo count( $cid ); ?></strong></font> | ||
| 254 : | <br /><br /> | ||
| 255 : | </td> | ||
| 256 : | <td align="left" valign="top" width="25%"> | ||
| 257 : | <strong><?php echo T_('Items being Deleted:') ?></strong> | ||
| 258 : | <br /> | ||
| 259 : | <?php | ||
| 260 : | echo "<ol>"; | ||
| 261 : | foreach ( $items as $item ) { | ||
| 262 : | echo "<li>". $item->name ."</li>"; | ||
| 263 : | } | ||
| 264 : | echo "</ol>"; | ||
| 265 : | ?> | ||
| 266 : | </td> | ||
| 267 : | <td valign="top"> | ||
| 268 : | * <?php echo T_('This will <strong><font color="#FF0000">Permanently Delete</font></strong> <br />these Items from the Database') ?> * | ||
| 269 : | <br /><br /><br /> | ||
| 270 : | <div style="border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 50px;"> | ||
| 271 : | <a class="toolbar" href="javascript:if (confirm('<?php echo T_('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);"> | ||
| 272 : | <img name="remove" src="images/delete.png" alt="<?php echo T_('Delete') ?>" border="0" align="middle" /> | ||
| 273 : | <?php echo T_('Delete') ?> | ||
| 274 : | </a> | ||
| 275 : | </div> | ||
| 276 : | </td> | ||
| 277 : | </tr> | ||
| 278 : | <tr> | ||
| 279 : | <td> </td> | ||
| 280 : | </tr> | ||
| 281 : | </table> | ||
| 282 : | <br /><br /> | ||
| 283 : | |||
| 284 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 285 : | <input type="hidden" name="task" value="" /> | ||
| 286 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 287 : | <input type="hidden" name="type" value="<?php echo $type; ?>" /> | ||
| 288 : | <?php | ||
| 289 : | foreach ($cid as $id) { | ||
| 290 : | echo "\n<input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 291 : | } | ||
| 292 : | ?> | ||
| 293 : | </form> | ||
| 294 : | <?php | ||
| 295 : | } | ||
| 296 : | |||
| 297 : | |||
| 298 : | /** | ||
| 299 : | * A restore confirmation page | ||
| 300 : | * Writes list of the items that have been selected for restore | ||
| 301 : | */ | ||
| 302 : | function showRestore( $option, $cid, $items, $type ) { | ||
| 303 : | ?> | ||
| 304 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 305 : | <table class="adminheading"> | ||
| 306 : | <tr> | ||
| 307 : | <th><?php echo T_('Restore Items') ?></th> | ||
| 308 : | </tr> | ||
| 309 : | </table> | ||
| 310 : | |||
| 311 : | <br /> | ||
| 312 : | <table class="adminform"> | ||
| 313 : | <tr> | ||
| 314 : | <td width="3%"></td> | ||
| 315 : | <td align="left" valign="top" width="20%"> | ||
| 316 : | <strong><?php echo T_('Number of Items:') ?></strong> | ||
| 317 : | <br /> | ||
| 318 : | <font color="#000066"><strong><?php echo count( $cid ); ?></strong></font> | ||
| 319 : | <br /><br /> | ||
| 320 : | </td> | ||
| 321 : | <td align="left" valign="top" width="25%"> | ||
| 322 : | <strong><?php echo T_('Items being Restored:') ?></strong> | ||
| 323 : | <br /> | ||
| 324 : | <?php | ||
| 325 : | echo "<ol>"; | ||
| 326 : | foreach ( $items as $item ) { | ||
| 327 : | echo "<li>". $item->name ."</li>"; | ||
| 328 : | } | ||
| 329 : | echo "</ol>"; | ||
| 330 : | ?> | ||
| 331 : | </td> | ||
| 332 : | <td valign="top"> | ||
| 333 : | * <?php echo T_('This will <strong><font color="#FF0000">Restore</font></strong> these Items,<br />they will be returned to their orignial places as Unpublished items') ?> * | ||
| 334 : | <br /><br /><br /> | ||
| 335 : | <div style="border: 1px dotted gray; width: 80px; padding: 10px; margin-left: 50px;"> | ||
| 336 : | <a class="toolbar" href="javascript:if (confirm('<?php echo T_('Are you sure you want to Restore the listed items?.') ?>')){ submitbutton('restore');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('restore','','images/restore_f2.png',1);"> | ||
| 337 : | <img name="restore" src="images/restore.png" alt="<?php echo T_('Restore') ?>" border="0" align="middle" /> | ||
| 338 : | <?php echo T_('Restore') ?> | ||
| 339 : | </a> | ||
| 340 : | </div> | ||
| 341 : | </td> | ||
| 342 : | </tr> | ||
| 343 : | <tr> | ||
| 344 : | <td> </td> | ||
| 345 : | </tr> | ||
| 346 : | </table> | ||
| 347 : | <br /><br /> | ||
| 348 : | |||
| 349 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 350 : | <input type="hidden" name="sectionid" value="<?php echo $sectionid; ?>" /> | ||
| 351 : | <input type="hidden" name="task" value="" /> | ||
| 352 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 353 : | <input type="hidden" name="type" value="<?php echo $type; ?>" /> | ||
| 354 : | <?php | ||
| 355 : | foreach ($cid as $id) { | ||
| 356 : | echo "\n<input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 357 : | } | ||
| 358 : | ?> | ||
| 359 : | </form> | ||
| 360 : | <?php | ||
| 361 : | } | ||
| 362 : | |||
| 363 : | } | ||
| 364 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

