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