boards
[ class tree: boards ] [ index: boards ] [ all elements ]

Source for file assign.php

Documentation is available at assign.php

  1. <?php
  2. /**
  3.  * $Header$
  4.  * Copyright (c) 2004 bitweaver Messageboards
  5.  * All Rights Reserved. See below for details and a complete list of authors.
  6.  * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
  7.  * @package boards
  8.  * @subpackage functions
  9.  */
  10.  
  11. /**
  12.  * required setup
  13.  */
  14. require_once'../kernel/setup_inc.php' );
  15.  
  16. // Is package installed and enabled
  17. $gBitSystem->verifyPackage'boards' );
  18.  
  19. require_once(BOARDS_PKG_PATH.'lookup_inc.php' );
  20.  
  21. // verify minimal edit permission level
  22. $gContent->verifyUpdatePermission();
  23.  
  24. if (!empty($_REQUEST['remove'])) {
  25.     foreach ($_REQUEST['remove'as $board_id => $content_ids{
  26.         $b new BitBoard($board_id);
  27.         $b->load();
  28.         if $b->hasUpdatePermission() ){
  29.             foreach ($content_ids as $content_id => $remove{
  30.                 if ($remove{
  31.                     $b->removeContent($content_id);
  32.                 }
  33.             }
  34.         }else{
  35.             // @TODO assign error and report back to user which were not processed
  36.         }
  37.     }
  38. }
  39.  
  40. if!empty$_REQUEST['assign'&& @BitBase::verifyId$_REQUEST['to_board_id') ) {
  41.     $b new BitBoard$_REQUEST['to_board_id');
  42.     $b->load();
  43.     if $b->verifyUpdatePermission() ){
  44.         foreach$_REQUEST['assign'as $content_id {
  45.             $b->addContent$content_id );
  46.         }
  47.     }
  48. }
  49.  
  50. if (!empty($_REQUEST['integrity'])) {
  51.     $board_id $_REQUEST['integrity'];
  52.     $b new BitBoard($board_id);
  53.     $b->load();
  54.     if $b->verifyUpdatePermission() ){
  55.         $b->fixContentMap();
  56.     }
  57. }
  58.  
  59. $data BitBoard::getAllMap();
  60. $gBitSmarty->assign_by_ref('data',$data);
  61.  
  62. // Display the template
  63. $gBitSystem->display'bitpackage:boards/board_assign.tpl'tra('Assign content to Board'array'display_mode' => 'display' ));
  64. ?>

Documentation generated on Wed, 29 Jul 2015 13:55:34 +0000 by phpDocumentor 1.5.0-lsces