Annotation of /mambo/branches/4.6/administrator/components/com_categories/admin.categories.html.php
Parent Directory
|
Revision Log
Revision 1 -
(view)
(download)
Original Path: mambo/trunk/administrator/components/com_categories/admin.categories.html.php
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: admin.categories.html.php,v 1.2 2005/10/20 01:11:37 cfraser Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Categories | ||
| 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 : | * @package Mambo | ||
| 16 : | * @subpackage Categories | ||
| 17 : | */ | ||
| 18 : | class categories_html { | ||
| 19 : | |||
| 20 : | /** | ||
| 21 : | * Writes a list of the categories for a section | ||
| 22 : | * @param array An array of category objects | ||
| 23 : | * @param string The name of the category section | ||
| 24 : | */ | ||
| 25 : | function show( &$rows, $section, $section_name, &$pageNav, &$lists, $type ) { | ||
| 26 : | global $my, $mosConfig_live_site; | ||
| 27 : | |||
| 28 : | mosCommonHTML::loadOverlib(); | ||
| 29 : | ?> | ||
| 30 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 31 : | <table class="adminheading"> | ||
| 32 : | <tr> | ||
| 33 : | <?php | ||
| 34 : | if ( $section == 'content') { | ||
| 35 : | ?> | ||
| 36 : | <th class="categories"> | ||
| 37 : | Category Manager <small><small>[ Content: All ]</small></small> | ||
| 38 : | </th> | ||
| 39 : | <td width="right"> | ||
| 40 : | <?php echo $lists['sectionid'];?> | ||
| 41 : | </td> | ||
| 42 : | <?php | ||
| 43 : | } else { | ||
| 44 : | if ( is_numeric( $section ) ) { | ||
| 45 : | $query = 'com_content§ionid=' . $section; | ||
| 46 : | } else { | ||
| 47 : | if ( $section == 'com_contact_details' ) { | ||
| 48 : | $query = 'com_contact'; | ||
| 49 : | } else { | ||
| 50 : | $query = $section; | ||
| 51 : | } | ||
| 52 : | } | ||
| 53 : | ?> | ||
| 54 : | <th class="categories"> | ||
| 55 : | Category Manager <small><small>[ <?php echo $section_name;?> ]</small></small> | ||
| 56 : | </th> | ||
| 57 : | <?php | ||
| 58 : | } | ||
| 59 : | ?> | ||
| 60 : | </tr> | ||
| 61 : | </table> | ||
| 62 : | |||
| 63 : | <table class="adminlist"> | ||
| 64 : | <tr> | ||
| 65 : | <th width="10" align="left"> | ||
| 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"> | ||
| 72 : | Category Name | ||
| 73 : | </th> | ||
| 74 : | <th width="10%"> | ||
| 75 : | Published | ||
| 76 : | </th> | ||
| 77 : | <?php | ||
| 78 : | if ( $section <> 'content') { | ||
| 79 : | ?> | ||
| 80 : | <th colspan="2" width="5%"> | ||
| 81 : | Reorder | ||
| 82 : | </th> | ||
| 83 : | <?php | ||
| 84 : | } | ||
| 85 : | ?> | ||
| 86 : | <th width="2%"> | ||
| 87 : | Order | ||
| 88 : | </th> | ||
| 89 : | <th width="1%"> | ||
| 90 : | <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a> | ||
| 91 : | </th> | ||
| 92 : | <th width="10%"> | ||
| 93 : | Access | ||
| 94 : | </th> | ||
| 95 : | <?php | ||
| 96 : | if ( $section == 'content') { | ||
| 97 : | ?> | ||
| 98 : | <th width="12%" align="left"> | ||
| 99 : | Section | ||
| 100 : | </th> | ||
| 101 : | <?php | ||
| 102 : | } | ||
| 103 : | ?> | ||
| 104 : | <th width="5%" nowrap> | ||
| 105 : | Category ID | ||
| 106 : | </th> | ||
| 107 : | <?php | ||
| 108 : | if ( $type == 'content') { | ||
| 109 : | ?> | ||
| 110 : | <th width="5%"> | ||
| 111 : | # Active | ||
| 112 : | </th> | ||
| 113 : | <th width="5%"> | ||
| 114 : | # Trash | ||
| 115 : | </th> | ||
| 116 : | <?php | ||
| 117 : | } else { | ||
| 118 : | ?> | ||
| 119 : | <th width="20%"> | ||
| 120 : | </th> | ||
| 121 : | <?php | ||
| 122 : | } | ||
| 123 : | ?> | ||
| 124 : | </tr> | ||
| 125 : | <?php | ||
| 126 : | $k = 0; | ||
| 127 : | for ($i=0, $n=count( $rows ); $i < $n; $i++) { | ||
| 128 : | $row = &$rows[$i]; | ||
| 129 : | |||
| 130 : | $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->section; | ||
| 131 : | |||
| 132 : | $link = 'index2.php?option=com_categories§ion='. $section .'&task=editA&hidemainmenu=1&id='. $row->id; | ||
| 133 : | |||
| 134 : | $access = mosCommonHTML::AccessProcessing( $row, $i ); | ||
| 135 : | $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); | ||
| 136 : | $published = mosCommonHTML::PublishedProcessing( $row, $i ); | ||
| 137 : | ?> | ||
| 138 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 139 : | <td> | ||
| 140 : | <?php echo $pageNav->rowNumber( $i ); ?> | ||
| 141 : | </td> | ||
| 142 : | <td> | ||
| 143 : | <?php echo $checked; ?> | ||
| 144 : | </td> | ||
| 145 : | <td> | ||
| 146 : | <?php | ||
| 147 : | if ( $row->checked_out_contact_category && ( $row->checked_out_contact_category != $my->id ) ) { | ||
| 148 : | echo $row->name .' ( '. $row->title .' )'; | ||
| 149 : | } else { | ||
| 150 : | ?> | ||
| 151 : | <a href="<?php echo $link; ?>"> | ||
| 152 : | <?php echo $row->name .' ( '. $row->title .' )'; ?> | ||
| 153 : | </a> | ||
| 154 : | <?php | ||
| 155 : | } | ||
| 156 : | ?> | ||
| 157 : | </td> | ||
| 158 : | <td align="center"> | ||
| 159 : | <?php echo $published;?> | ||
| 160 : | </td> | ||
| 161 : | <?php | ||
| 162 : | if ( $section <> 'content' ) { | ||
| 163 : | ?> | ||
| 164 : | <td> | ||
| 165 : | <?php echo $pageNav->orderUpIcon( $i ); ?> | ||
| 166 : | </td> | ||
| 167 : | <td> | ||
| 168 : | <?php echo $pageNav->orderDownIcon( $i, $n ); ?> | ||
| 169 : | </td> | ||
| 170 : | <?php | ||
| 171 : | } | ||
| 172 : | ?> | ||
| 173 : | <td align="center" colspan="2"> | ||
| 174 : | <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" /> | ||
| 175 : | </td> | ||
| 176 : | <td align="center"> | ||
| 177 : | <?php echo $access;?> | ||
| 178 : | </td> | ||
| 179 : | <?php | ||
| 180 : | if ( $section == 'content' ) { | ||
| 181 : | ?> | ||
| 182 : | <td align="left"> | ||
| 183 : | <a href="<?php echo $row->sect_link; ?>" title="Edit Section"> | ||
| 184 : | <?php echo $row->section_name; ?> | ||
| 185 : | </a> | ||
| 186 : | </td> | ||
| 187 : | <?php | ||
| 188 : | } | ||
| 189 : | ?> | ||
| 190 : | <td align="center"> | ||
| 191 : | <?php echo $row->id; ?> | ||
| 192 : | </td> | ||
| 193 : | <?php | ||
| 194 : | if ( $type == 'content') { | ||
| 195 : | ?> | ||
| 196 : | <td align="center"> | ||
| 197 : | <?php echo $row->active; ?> | ||
| 198 : | </td> | ||
| 199 : | <td align="center"> | ||
| 200 : | <?php echo $row->trash; ?> | ||
| 201 : | </td> | ||
| 202 : | <?php | ||
| 203 : | } else { | ||
| 204 : | ?> | ||
| 205 : | <td> | ||
| 206 : | </td> | ||
| 207 : | <?php | ||
| 208 : | } | ||
| 209 : | $k = 1 - $k; | ||
| 210 : | ?> | ||
| 211 : | </tr> | ||
| 212 : | <?php | ||
| 213 : | } | ||
| 214 : | ?> | ||
| 215 : | </table> | ||
| 216 : | |||
| 217 : | <?php echo $pageNav->getListFooter(); ?> | ||
| 218 : | |||
| 219 : | <input type="hidden" name="option" value="com_categories" /> | ||
| 220 : | <input type="hidden" name="section" value="<?php echo $section;?>" /> | ||
| 221 : | <input type="hidden" name="task" value="" /> | ||
| 222 : | <input type="hidden" name="chosen" value="" /> | ||
| 223 : | <input type="hidden" name="act" value="" /> | ||
| 224 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 225 : | <input type="hidden" name="type" value="<?php echo $type; ?>" /> | ||
| 226 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 227 : | </form> | ||
| 228 : | <?php | ||
| 229 : | } | ||
| 230 : | |||
| 231 : | /** | ||
| 232 : | * Writes the edit form for new and existing categories | ||
| 233 : | * @param mosCategory The category object | ||
| 234 : | * @param string | ||
| 235 : | * @param array | ||
| 236 : | */ | ||
| 237 : | function edit( &$row, &$lists, $redirect, $menus ) { | ||
| 238 : | if ($row->image == "") { | ||
| 239 : | $row->image = 'blank.png'; | ||
| 240 : | } | ||
| 241 : | |||
| 242 : | if ( $redirect == 'content' ) { | ||
| 243 : | $component = 'Content'; | ||
| 244 : | } else { | ||
| 245 : | $component = ucfirst( substr( $redirect, 4 ) ); | ||
| 246 : | if ( $redirect == 'com_contact_details' ) { | ||
| 247 : | $component = 'Contact'; | ||
| 248 : | } | ||
| 249 : | } | ||
| 250 : | mosMakeHtmlSafe( $row, ENT_QUOTES, 'description' ); | ||
| 251 : | ?> | ||
| 252 : | <script language="javascript" type="text/javascript"> | ||
| 253 : | function submitbutton(pressbutton, section) { | ||
| 254 : | var form = document.adminForm; | ||
| 255 : | if (pressbutton == 'cancel') { | ||
| 256 : | submitform( pressbutton ); | ||
| 257 : | return; | ||
| 258 : | } | ||
| 259 : | |||
| 260 : | if ( pressbutton == 'menulink' ) { | ||
| 261 : | if ( form.menuselect.value == "" ) { | ||
| 262 : | alert( "Please select a Menu" ); | ||
| 263 : | return; | ||
| 264 : | } else if ( form.link_type.value == "" ) { | ||
| 265 : | alert( "Please select a menu type" ); | ||
| 266 : | return; | ||
| 267 : | } else if ( form.link_name.value == "" ) { | ||
| 268 : | alert( "Please enter a Name for this menu item" ); | ||
| 269 : | return; | ||
| 270 : | } | ||
| 271 : | } | ||
| 272 : | |||
| 273 : | if ( form.name.value == "" ) { | ||
| 274 : | alert("Category must have a name"); | ||
| 275 : | } else { | ||
| 276 : | <?php getEditorContents( 'editor1', 'description' ) ; ?> | ||
| 277 : | submitform(pressbutton); | ||
| 278 : | } | ||
| 279 : | } | ||
| 280 : | // show / hide publishing information | ||
| 281 : | function displayParameterInfo() | ||
| 282 : | { | ||
| 283 : | |||
| 284 : | if(document.getElementById('simpleediting').style.display == 'block') | ||
| 285 : | { | ||
| 286 : | document.getElementById('simpleediting').style.display = 'none'; | ||
| 287 : | document.getElementById('show').style.display = 'block'; | ||
| 288 : | document.getElementById('hide').style.display = 'none'; | ||
| 289 : | document.adminForm.simple_editing.value ='on'; | ||
| 290 : | } | ||
| 291 : | else | ||
| 292 : | { | ||
| 293 : | document.getElementById('simpleediting').style.display = 'block'; | ||
| 294 : | document.getElementById('show').style.display = 'none'; | ||
| 295 : | document.getElementById('hide').style.display = 'block'; | ||
| 296 : | document.adminForm.simple_editing.value ='off'; | ||
| 297 : | } | ||
| 298 : | |||
| 299 : | } | ||
| 300 : | </script> | ||
| 301 : | <? | ||
| 302 : | if($_SESSION['simple_editing'] == 'on') | ||
| 303 : | { | ||
| 304 : | $simpleediting ='none'; | ||
| 305 : | $simple = 'block'; | ||
| 306 : | $advanced = 'none'; | ||
| 307 : | } | ||
| 308 : | else | ||
| 309 : | { | ||
| 310 : | |||
| 311 : | $advanced = 'block'; | ||
| 312 : | $simple = 'none'; | ||
| 313 : | $simpleediting ='block'; | ||
| 314 : | } | ||
| 315 : | |||
| 316 : | ?> | ||
| 317 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 318 : | <input type ="hidden" name="simple_editing" value=''> | ||
| 319 : | <table class="adminheading"> | ||
| 320 : | <tr> | ||
| 321 : | <th class="categories"> | ||
| 322 : | Category: | ||
| 323 : | <small> | ||
| 324 : | <?php echo $row->id ? 'Edit' : 'New';?> | ||
| 325 : | </small> | ||
| 326 : | <small><small> | ||
| 327 : | [ <?php echo $component; ?>: <?php echo $row->name; ?> ] | ||
| 328 : | </small></small> | ||
| 329 : | </th> | ||
| 330 : | </tr> | ||
| 331 : | </table> | ||
| 332 : | <table width="100%"> | ||
| 333 : | <tr> | ||
| 334 : | <td valign="top" align="right"> | ||
| 335 : | <div id = "show" style="display:<?php echo $simple;?>"> | ||
| 336 : | <a href="javascript:displayParameterInfo();">Show Advanced Details</a> | ||
| 337 : | </div> | ||
| 338 : | <div id = "hide" style="display:<?php echo $advanced;?>"> | ||
| 339 : | <a href="javascript:displayParameterInfo();">Hide Advanced Details</a> | ||
| 340 : | </div> | ||
| 341 : | </td> | ||
| 342 : | </tr> | ||
| 343 : | </table> | ||
| 344 : | <table width="100%"> | ||
| 345 : | <tr> | ||
| 346 : | <td valign="top" > | ||
| 347 : | <table class="adminform"> | ||
| 348 : | <tr> | ||
| 349 : | <th colspan="3"> | ||
| 350 : | Category Details | ||
| 351 : | </th> | ||
| 352 : | <tr> | ||
| 353 : | <tr> | ||
| 354 : | <td> | ||
| 355 : | Category Title: | ||
| 356 : | </td> | ||
| 357 : | <td colspan="2"> | ||
| 358 : | <input class="text_area" type="text" name="title" value="<?php echo $row->title; ?>" size="50" maxlength="50" title="A short name to appear in menus" /> | ||
| 359 : | </td> | ||
| 360 : | </tr> | ||
| 361 : | <tr> | ||
| 362 : | <td> | ||
| 363 : | Category Name: | ||
| 364 : | </td> | ||
| 365 : | <td colspan="2"> | ||
| 366 : | <input class="text_area" type="text" name="name" value="<?php echo $row->name; ?>" size="50" maxlength="255" title="A long name to be displayed in headings" /> | ||
| 367 : | </td> | ||
| 368 : | </tr> | ||
| 369 : | <tr> | ||
| 370 : | <td> | ||
| 371 : | Section: | ||
| 372 : | </td> | ||
| 373 : | <td colspan="2"> | ||
| 374 : | <?php echo $lists['section']; ?> | ||
| 375 : | </td> | ||
| 376 : | </tr> | ||
| 377 : | <tr> | ||
| 378 : | <td> | ||
| 379 : | Image: | ||
| 380 : | </td> | ||
| 381 : | <td> | ||
| 382 : | <?php echo $lists['image']; ?> | ||
| 383 : | </td> | ||
| 384 : | <td rowspan="4" width="50%"> | ||
| 385 : | <script language="javascript" type="text/javascript"> | ||
| 386 : | if (document.forms[0].image.options.value!=''){ | ||
| 387 : | jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' ); | ||
| 388 : | } else { | ||
| 389 : | jsimg='../images/M_images/blank.png'; | ||
| 390 : | } | ||
| 391 : | document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="Preview" />'); | ||
| 392 : | </script> | ||
| 393 : | </td> | ||
| 394 : | </tr> | ||
| 395 : | <tr> | ||
| 396 : | <td> | ||
| 397 : | Image Position: | ||
| 398 : | </td> | ||
| 399 : | <td> | ||
| 400 : | <?php echo $lists['image_position']; ?> | ||
| 401 : | </td> | ||
| 402 : | </tr> | ||
| 403 : | <tr> | ||
| 404 : | <td> | ||
| 405 : | Ordering: | ||
| 406 : | </td> | ||
| 407 : | <td> | ||
| 408 : | <?php echo $lists['ordering']; ?> | ||
| 409 : | </td> | ||
| 410 : | </tr> | ||
| 411 : | <tr> | ||
| 412 : | <td> | ||
| 413 : | Access Level: | ||
| 414 : | </td> | ||
| 415 : | <td> | ||
| 416 : | <?php echo $lists['access']; ?> | ||
| 417 : | </td> | ||
| 418 : | </tr> | ||
| 419 : | <tr> | ||
| 420 : | <td> | ||
| 421 : | Published: | ||
| 422 : | </td> | ||
| 423 : | <td> | ||
| 424 : | <?php echo $lists['published']; ?> | ||
| 425 : | </td> | ||
| 426 : | </tr> | ||
| 427 : | <tr> | ||
| 428 : | <td valign="top"> | ||
| 429 : | Description: | ||
| 430 : | </td> | ||
| 431 : | <td colspan="2"> | ||
| 432 : | <?php | ||
| 433 : | // parameters : areaname, content, hidden field, width, height, rows, cols | ||
| 434 : | editorArea( 'editor1', $row->description , 'description', '100%;', '300', '60', '20' ) ; ?> | ||
| 435 : | </td> | ||
| 436 : | </tr> | ||
| 437 : | </table> | ||
| 438 : | </td> | ||
| 439 : | <td valign="top" align="right"> | ||
| 440 : | <div id="simpleediting" style="display:<?php echo $simpleediting;?>"> | ||
| 441 : | <table cellspacing="0" cellpadding="0" border="0" width="100%" > | ||
| 442 : | <tr> | ||
| 443 : | <td width="40%"> | ||
| 444 : | <?php | ||
| 445 : | if ( $row->id > 0 ) { | ||
| 446 : | ?> | ||
| 447 : | <table class="adminform"> | ||
| 448 : | <tr> | ||
| 449 : | <th colspan="2"> | ||
| 450 : | Link to Menu | ||
| 451 : | </th> | ||
| 452 : | <tr> | ||
| 453 : | <tr> | ||
| 454 : | <td colspan="2"> | ||
| 455 : | This will create a new menu item in the menu you select | ||
| 456 : | <br /><br /> | ||
| 457 : | </td> | ||
| 458 : | <tr> | ||
| 459 : | <tr> | ||
| 460 : | <td valign="top" width="100px"> | ||
| 461 : | Select a Menu | ||
| 462 : | </td> | ||
| 463 : | <td> | ||
| 464 : | <?php echo $lists['menuselect']; ?> | ||
| 465 : | </td> | ||
| 466 : | <tr> | ||
| 467 : | <tr> | ||
| 468 : | <td valign="top" width="100px"> | ||
| 469 : | Select Menu Type | ||
| 470 : | </td> | ||
| 471 : | <td> | ||
| 472 : | <?php echo $lists['link_type']; ?> | ||
| 473 : | </td> | ||
| 474 : | <tr> | ||
| 475 : | <tr> | ||
| 476 : | <td valign="top" width="100px"> | ||
| 477 : | Menu Item Name | ||
| 478 : | </td> | ||
| 479 : | <td> | ||
| 480 : | <input type="text" name="link_name" class="inputbox" value="" size="25" /> | ||
| 481 : | </td> | ||
| 482 : | <tr> | ||
| 483 : | <tr> | ||
| 484 : | <td> | ||
| 485 : | </td> | ||
| 486 : | <td> | ||
| 487 : | <input name="menu_link" type="button" class="button" value="Link to Menu" onClick="submitbutton('menulink');" /> | ||
| 488 : | </td> | ||
| 489 : | <tr> | ||
| 490 : | <tr> | ||
| 491 : | <th colspan="2"> | ||
| 492 : | Existing Menu Links | ||
| 493 : | </th> | ||
| 494 : | </tr> | ||
| 495 : | <?php | ||
| 496 : | if ( $menus == NULL ) { | ||
| 497 : | ?> | ||
| 498 : | <tr> | ||
| 499 : | <td colspan="2"> | ||
| 500 : | None | ||
| 501 : | </td> | ||
| 502 : | </tr> | ||
| 503 : | <?php | ||
| 504 : | } else { | ||
| 505 : | mosCommonHTML::menuLinksSecCat( $menus ); | ||
| 506 : | } | ||
| 507 : | ?> | ||
| 508 : | <tr> | ||
| 509 : | <td colspan="2"> | ||
| 510 : | </td> | ||
| 511 : | </tr> | ||
| 512 : | </table> | ||
| 513 : | <?php | ||
| 514 : | } else { | ||
| 515 : | ?> | ||
| 516 : | <table class="adminform" width="40%"> | ||
| 517 : | <tr><th> </th></tr> | ||
| 518 : | <tr><td>Menu links available when saved</td></tr> | ||
| 519 : | </table> | ||
| 520 : | <?php | ||
| 521 : | } | ||
| 522 : | ?> | ||
| 523 : | </td> | ||
| 524 : | </tr> | ||
| 525 : | </table> | ||
| 526 : | </td> | ||
| 527 : | </tr> | ||
| 528 : | </table> | ||
| 529 : | </div> | ||
| 530 : | </td> | ||
| 531 : | </tr> | ||
| 532 : | </table> | ||
| 533 : | <input type="hidden" name="option" value="com_categories" /> | ||
| 534 : | <input type="hidden" name="oldtitle" value="<?php echo $row->title ; ?>" /> | ||
| 535 : | <input type="hidden" name="id" value="<?php echo $row->id; ?>" /> | ||
| 536 : | <input type="hidden" name="sectionid" value="<?php echo $row->section; ?>" /> | ||
| 537 : | <input type="hidden" name="task" value="" /> | ||
| 538 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 539 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 540 : | </form> | ||
| 541 : | <?php | ||
| 542 : | } | ||
| 543 : | |||
| 544 : | |||
| 545 : | /** | ||
| 546 : | * Form to select Section to move Category to | ||
| 547 : | */ | ||
| 548 : | function moveCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) { | ||
| 549 : | ?> | ||
| 550 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 551 : | <br /> | ||
| 552 : | <table class="adminheading"> | ||
| 553 : | <tr> | ||
| 554 : | <th class="categories"> | ||
| 555 : | Move Category | ||
| 556 : | </th> | ||
| 557 : | </tr> | ||
| 558 : | </table> | ||
| 559 : | |||
| 560 : | <br /> | ||
| 561 : | <table class="adminform"> | ||
| 562 : | <tr> | ||
| 563 : | <td width="3%"></td> | ||
| 564 : | <td align="left" valign="top" width="30%"> | ||
| 565 : | <strong>Move to Section:</strong> | ||
| 566 : | <br /> | ||
| 567 : | <?php echo $SectionList ?> | ||
| 568 : | <br /><br /> | ||
| 569 : | </td> | ||
| 570 : | <td align="left" valign="top" width="20%"> | ||
| 571 : | <strong>Categories being moved:</strong> | ||
| 572 : | <br /> | ||
| 573 : | <?php | ||
| 574 : | echo "<ol>"; | ||
| 575 : | foreach ( $items as $item ) { | ||
| 576 : | echo "<li>". $item->name ."</li>"; | ||
| 577 : | } | ||
| 578 : | echo "</ol>"; | ||
| 579 : | ?> | ||
| 580 : | </td> | ||
| 581 : | <td valign="top" width="20%"> | ||
| 582 : | <strong>Content Items being moved:</strong> | ||
| 583 : | <br /> | ||
| 584 : | <?php | ||
| 585 : | echo "<ol>"; | ||
| 586 : | foreach ( $contents as $content ) { | ||
| 587 : | echo "<li>". $content->title ."</li>"; | ||
| 588 : | } | ||
| 589 : | echo "</ol>"; | ||
| 590 : | ?> | ||
| 591 : | </td> | ||
| 592 : | <td valign="top"> | ||
| 593 : | This will move the Categories listed | ||
| 594 : | <br /> | ||
| 595 : | and all the items within the category (also listed) | ||
| 596 : | <br /> | ||
| 597 : | to the selected Section. | ||
| 598 : | </td>. | ||
| 599 : | </tr> | ||
| 600 : | </table> | ||
| 601 : | <br /><br /> | ||
| 602 : | |||
| 603 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 604 : | <input type="hidden" name="section" value="<?php echo $sectionOld;?>" /> | ||
| 605 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 606 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 607 : | <input type="hidden" name="task" value="" /> | ||
| 608 : | <?php | ||
| 609 : | foreach ( $cid as $id ) { | ||
| 610 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 611 : | } | ||
| 612 : | ?> | ||
| 613 : | </form> | ||
| 614 : | <?php | ||
| 615 : | } | ||
| 616 : | |||
| 617 : | |||
| 618 : | /** | ||
| 619 : | * Form to select Section to copy Category to | ||
| 620 : | */ | ||
| 621 : | function copyCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) { | ||
| 622 : | ?> | ||
| 623 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 624 : | <br /> | ||
| 625 : | <table class="adminheading"> | ||
| 626 : | <tr> | ||
| 627 : | <th class="categories"> | ||
| 628 : | Copy Category | ||
| 629 : | </th> | ||
| 630 : | </tr> | ||
| 631 : | </table> | ||
| 632 : | |||
| 633 : | <br /> | ||
| 634 : | <table class="adminform"> | ||
| 635 : | <tr> | ||
| 636 : | <td width="3%"></td> | ||
| 637 : | <td align="left" valign="top" width="30%"> | ||
| 638 : | <strong>Copy to Section:</strong> | ||
| 639 : | <br /> | ||
| 640 : | <?php echo $SectionList ?> | ||
| 641 : | <br /><br /> | ||
| 642 : | </td> | ||
| 643 : | <td align="left" valign="top" width="20%"> | ||
| 644 : | <strong>Categories being copied:</strong> | ||
| 645 : | <br /> | ||
| 646 : | <?php | ||
| 647 : | echo "<ol>"; | ||
| 648 : | foreach ( $items as $item ) { | ||
| 649 : | echo "<li>". $item->name ."</li>"; | ||
| 650 : | } | ||
| 651 : | echo "</ol>"; | ||
| 652 : | ?> | ||
| 653 : | </td> | ||
| 654 : | <td valign="top" width="20%"> | ||
| 655 : | <strong>Content Items being copied:</strong> | ||
| 656 : | <br /> | ||
| 657 : | <?php | ||
| 658 : | echo "<ol>"; | ||
| 659 : | foreach ( $contents as $content ) { | ||
| 660 : | echo "<li>". $content->title ."</li>"; | ||
| 661 : | echo "\n <input type=\"hidden\" name=\"item[]\" value=\"$content->id\" />"; | ||
| 662 : | } | ||
| 663 : | echo "</ol>"; | ||
| 664 : | ?> | ||
| 665 : | </td> | ||
| 666 : | <td valign="top"> | ||
| 667 : | This will copy the Categories listed | ||
| 668 : | <br /> | ||
| 669 : | and all the items within the category (also listed) | ||
| 670 : | <br /> | ||
| 671 : | to the selected Section. | ||
| 672 : | </td>. | ||
| 673 : | </tr> | ||
| 674 : | </table> | ||
| 675 : | <br /><br /> | ||
| 676 : | |||
| 677 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 678 : | <input type="hidden" name="section" value="<?php echo $sectionOld;?>" /> | ||
| 679 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 680 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 681 : | <input type="hidden" name="task" value="" /> | ||
| 682 : | <?php | ||
| 683 : | foreach ( $cid as $id ) { | ||
| 684 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 685 : | } | ||
| 686 : | ?> | ||
| 687 : | </form> | ||
| 688 : | <?php | ||
| 689 : | } | ||
| 690 : | |||
| 691 : | } | ||
| 692 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

