| [ 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 Menus 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 class HTML_menusections { 21 22 function showMenusections( $rows, $pageNav, $search, $levellist, $menutype, $option ) { 23 global $my; 24 25 mosCommonHTML::loadOverlib(); 26 ?> 27 <form action="index2.php" method="post" name="adminForm"> 28 <table class="adminheading"> 29 <tr> 30 <th class="menus"> 31 <?php printf(T_('Menu Manager <small><small>[ %s ]</small></small>'), $menutype) ?> 32 </th> 33 <td nowrap="true"> 34 <?php echo T_('Max Levels'); ?> 35 </td> 36 <td> 37 <?php echo $levellist;?> 38 </td> 39 <td> 40 <?php echo T_('Filter:'); ?> 41 </td> 42 <td> 43 <input type="text" name="search" value="<?php echo $search;?>" class="inputbox" /> 44 </td> 45 </tr> 46 <?php 47 if ( $menutype == 'mainmenu' ) { 48 ?> 49 <tr> 50 <td align="right" nowrap style="color: red; font-weight: normal;" colspan="5"> 51 * <?php echo T_('You cannot `delete` this menu as it is required for the proper operation of Mambo'); ?> * 52 <br /> 53 <span style="color: black;"> 54 * <?php echo T_('The 1st Published item in this menu [mainmenu] is the default `Homepage` for the site'); ?> * 55 </span> 56 </td> 57 </tr> 58 <?php 59 } 60 ?> 61 </table> 62 63 <table class="adminlist"> 64 <tr> 65 <th width="20"> 66 # 67 </th> 68 <th width="20"> 69 <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /> 70 </th> 71 <th class="title" width="40%"> 72 <?php echo T_('Menu Item'); ?> 73 </th> 74 <th width="5%"> 75 <?php echo T_('Published'); ?> 76 </th> 77 <th colspan="2" width="5%"> 78 <?php echo T_('Reorder'); ?> 79 </th> 80 <th width="2%"> 81 <?php echo T_('Order'); ?> 82 </th> 83 <th width="1%"> 84 <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order'); ?>" /></a> 85 </th> 86 <th width="10%"> 87 <?php echo T_('Access'); ?> 88 </th> 89 <th> 90 <?php echo T_('Itemid'); ?> 91 </th> 92 <th width="35%" align="left"> 93 <?php echo T_('Type'); ?> 94 </th> 95 <th> 96 <?php echo T_('CID'); ?> 97 </th> 98 </tr> 99 <?php 100 $k = 0; 101 $i = 0; 102 $n = count( $rows ); 103 foreach ($rows as $row) { 104 $access = mosCommonHTML::AccessProcessing( $row, $i ); 105 $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); 106 $published = mosCommonHTML::PublishedProcessing( $row, $i ); 107 ?> 108 <tr class="<?php echo "row$k"; ?>"> 109 <td> 110 <?php echo $i + 1 + $pageNav->limitstart;?> 111 </td> 112 <td> 113 <?php echo $checked; ?> 114 </td> 115 <td nowrap="nowrap" align="left"> 116 <?php 117 if ( $row->checked_out && ( $row->checked_out != $my->id ) ) { 118 echo $row->treename; 119 } else { 120 $link = 'index2.php?option=com_menus&menutype='. $row->menutype .'&task=edit&id='. $row->id . '&hidemainmenu=1'; 121 ?> 122 <a href="<?php echo $link; ?>"> 123 <?php echo $row->treename; ?> 124 </a> 125 <?php 126 } 127 ?> 128 </td> 129 <td width="10%" align="center"> 130 <?php echo $published;?> 131 </td> 132 <td> 133 <?php echo $pageNav->orderUpIcon( $i ); ?> 134 </td> 135 <td> 136 <?php echo $pageNav->orderDownIcon( $i, $n ); ?> 137 </td> 138 <td align="center" colspan="2"> 139 <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" /> 140 </td> 141 <td align="center"> 142 <?php echo $access;?> 143 </td> 144 <td align="center"> 145 <?php echo $row->id; ?> 146 </td> 147 <td align="left"> 148 <?php 149 echo mosToolTip( T_($row->descrip), '', 280, 'tooltip.png', T_($row->type), T_($row->edit) ); 150 ?> 151 </td> 152 <td align="center"> 153 <?php echo $row->componentid; ?> 154 </td> 155 </tr> 156 <?php 157 $k = 1 - $k; 158 $i++; 159 } 160 ?> 161 </table> 162 163 <?php echo $pageNav->getListFooter(); ?> 164 165 <input type="hidden" name="option" value="<?php echo $option; ?>" /> 166 <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> 167 <input type="hidden" name="task" value="" /> 168 <input type="hidden" name="boxchecked" value="0" /> 169 <input type="hidden" name="hidemainmenu" value="0" /> 170 </form> 171 <?php 172 } 173 174 175 /** 176 * Displays a selection list for menu item types 177 */ 178 function addMenuItem( &$cid, $menutype, $option, $types_content, $types_component, $types_link, $types_other ) { 179 180 mosCommonHTML::loadOverlib(); 181 ?> 182 <form action="index2.php" method="post" name="adminForm"> 183 <table class="adminheading"> 184 <tr> 185 <th class="menus"> 186 <?php echo T_('New Menu Item'); ?> 187 </th> 188 <td valign="bottom" nowrap style="color: red;"> 189 <?php //echo _MENU_GROUP; ?> 190 </td> 191 </tr> 192 </table> 193 <style type="text/css"> 194 fieldset { 195 border: 1px solid #777; 196 } 197 legend { 198 font-weight: bold; 199 } 200 </style> 201 <table class="adminform"> 202 <tr> 203 <td width="50%" valign="top"> 204 <fieldset> 205 <legend><?php echo T_('Content'); ?></legend> 206 <table class="adminform"> 207 <?php 208 $k = 0; 209 $count = count( $types_content ); 210 for ( $i=0; $i < $count; $i++ ) { 211 $row = &$types_content[$i]; 212 213 $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&hidemainmenu=1&type='. $row->type; 214 ?> 215 <tr class="<?php echo "row$k"; ?>"> 216 <td width="20"> 217 <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> 218 </td> 219 <td> 220 <a href="<?php echo $link; ?>"> 221 <?php echo T_($row->name); ?> 222 </a> 223 </td> 224 <td align="center" width="20"> 225 <?php 226 echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); 227 ?> 228 </td> 229 </tr> 230 <?php 231 $k = 1 - $k; 232 } 233 ?> 234 </table> 235 </fieldset> 236 <fieldset> 237 <legend><?php echo T_('Miscellaneous'); ?></legend> 238 <table class="adminform"> 239 <?php 240 $k = 0; 241 $count = count( $types_other ); 242 for ( $i=0; $i < $count; $i++ ) { 243 $row = &$types_other[$i]; 244 245 $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; 246 ?> 247 <tr class="<?php echo "row$k"; ?>"> 248 <td width="20"> 249 <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> 250 </td> 251 <td> 252 <a href="<?php echo $link; ?>"> 253 <?php echo T_($row->name); ?> 254 </a> 255 </td> 256 <td align="center" width="20"> 257 <?php 258 echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); 259 ?> 260 </td> 261 </tr> 262 <?php 263 $k = 1 - $k; 264 } 265 ?> 266 </table> 267 </fieldset> 268 * <?php echo T_('Note that some menu types appear in more that one grouping, but they are still the same menu type.'); ?> 269 </td> 270 <td width="50%" valign="top"> 271 <fieldset> 272 <legend><?php echo T_('Components'); ?></legend> 273 <table class="adminform"> 274 <?php 275 $k = 0; 276 $count = count( $types_component ); 277 for ( $i=0; $i < $count; $i++ ) { 278 $row = &$types_component[$i]; 279 280 $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; 281 ?> 282 <tr class="<?php echo "row$k"; ?>"> 283 <td width="20"> 284 <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> 285 </td> 286 <td> 287 <a href="<?php echo $link; ?>"> 288 <?php echo T_($row->name); ?> 289 </a> 290 </td> 291 <td align="center" width="20"> 292 <?php 293 echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); 294 ?> 295 </td> 296 </tr> 297 <?php 298 $k = 1 - $k; 299 } 300 ?> 301 </table> 302 </fieldset> 303 <fieldset> 304 <legend><?php echo T_('Links'); ?></legend> 305 <table class="adminform"> 306 <?php 307 $k = 0; 308 $count = count( $types_link ); 309 for ( $i=0; $i < $count; $i++ ) { 310 $row = &$types_link[$i]; 311 312 $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; 313 ?> 314 <tr class="<?php echo "row$k"; ?>"> 315 <td width="20"> 316 <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> 317 </td> 318 <td> 319 <a href="<?php echo $link; ?>"> 320 <?php echo T_($row->name); ?> 321 </a> 322 </td> 323 <td align="center" width="20"> 324 <?php 325 echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); 326 ?> 327 </td> 328 </tr> 329 <?php 330 $k = 1 - $k; 331 } 332 ?> 333 </table> 334 </fieldset> 335 </td> 336 </tr> 337 </table> 338 339 340 341 <input type="hidden" name="option" value="<?php echo $option; ?>" /> 342 <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> 343 <input type="hidden" name="task" value="edit" /> 344 <input type="hidden" name="boxchecked" value="0" /> 345 <input type="hidden" name="hidemainmenu" value="0" /> 346 </form> 347 <?php 348 } 349 350 351 /** 352 * Form to select Menu to move menu item(s) to 353 */ 354 function moveMenu( $option, $cid, $MenuList, $items, $menutype ) { 355 ?> 356 <form action="index2.php" method="post" name="adminForm"> 357 <br /> 358 <table class="adminheading"> 359 <tr> 360 <th> 361 <?php echo T_('Move Menu Items'); ?> 362 </th> 363 </tr> 364 </table> 365 366 <br /> 367 <table class="adminform"> 368 <tr> 369 <td width="3%"></td> 370 <td align="left" valign="top" width="30%"> 371 <strong><?php echo T_('Move to Menu:'); ?></strong> 372 <br /> 373 <?php echo $MenuList ?> 374 <br /><br /> 375 </td> 376 <td align="left" valign="top"> 377 <strong> 378 <?php echo T_('Menu Items being moved:'); ?> 379 </strong> 380 <br /> 381 <ol> 382 <?php 383 foreach ( $items as $item ) { 384 ?> 385 <li> 386 <?php echo $item->name; ?> 387 </li> 388 <?php 389 } 390 ?> 391 </ol> 392 </td> 393 </tr> 394 </table> 395 <br /><br /> 396 397 <input type="hidden" name="option" value="<?php echo $option;?>" /> 398 <input type="hidden" name="boxchecked" value="1" /> 399 <input type="hidden" name="task" value="" /> 400 <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> 401 <?php 402 foreach ( $cid as $id ) { 403 echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; 404 } 405 ?> 406 </form> 407 <?php 408 } 409 410 411 /** 412 * Form to select Menu to copy menu item(s) to 413 */ 414 function copyMenu( $option, $cid, $MenuList, $items, $menutype ) { 415 ?> 416 <form action="index2.php" method="post" name="adminForm"> 417 <br /> 418 <table class="adminheading"> 419 <tr> 420 <th> 421 <?php echo T_('Copy Menu Items'); ?> 422 </th> 423 </tr> 424 </table> 425 426 <br /> 427 <table class="adminform"> 428 <tr> 429 <td width="3%"></td> 430 <td align="left" valign="top" width="30%"> 431 <strong> 432 <?php echo T_('Copy to Menu:'); ?> 433 </strong> 434 <br /> 435 <?php echo $MenuList ?> 436 <br /><br /> 437 </td> 438 <td align="left" valign="top"> 439 <strong> 440 <?php echo T_('Menu Items being copied:'); ?> 441 </strong> 442 <br /> 443 <ol> 444 <?php 445 foreach ( $items as $item ) { 446 ?> 447 <li> 448 <?php echo $item->name; ?> 449 </li> 450 <?php 451 } 452 ?> 453 </ol> 454 </td> 455 </tr> 456 </table> 457 <br /><br /> 458 459 <input type="hidden" name="option" value="<?php echo $option;?>" /> 460 <input type="hidden" name="boxchecked" value="0" /> 461 <input type="hidden" name="task" value="" /> 462 <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> 463 <?php 464 foreach ( $cid as $id ) { 465 echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; 466 } 467 ?> 468 </form> 469 <?php 470 } 471 472 473 } 474 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 8 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 |