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

Source for file watches.php

Documentation is available at watches.php

  1. <?php
  2. /**
  3.  * user watches
  4.  *
  5.  * @copyright (c) 2004-15 bitweaver.org
  6.  *
  7.  * @package users
  8.  * @subpackage functions
  9.  */
  10.  
  11. /**
  12.  * required setup
  13.  */
  14. include_once'../kernel/setup_inc.php' );
  15. $user $gBitUser->mUserId;
  16. if (!$user{
  17.     $gBitSmarty->assign('msg'tra("You must log in to use this feature"));
  18.     $gBitSystem->display'error.tpl' NULLarray'display_mode' => 'display' ));
  19.     die;
  20. }
  21.  
  22. $gBitSystem->verifyFeature'users_watches' );
  23.  
  24. if (isset($_REQUEST['hash'])) {
  25.     
  26.     $gBitUser->remove_user_watch_by_hash($_REQUEST['hash']);
  27. }
  28. if (isset($_REQUEST['watch'])) {
  29.     
  30.     foreach (array_keys($_REQUEST["watch"])as $item{
  31.         $gBitUser->remove_user_watch_by_hash($item);
  32.     }
  33. }
  34. // Get watch events and put them in watch_events
  35. $events $gBitUser->get_watches_events();
  36. $gBitSmarty->assign('events'$events);
  37. // if not set event type then all
  38. if (!isset($_REQUEST['event']))
  39.     $_REQUEST['event''';
  40. // get all the information for the event
  41. $watches $gBitUser->getWatches$_REQUEST['event');
  42. $gBitSmarty->assign('watches'$watches);
  43.  
  44. $gBitSystem->display'bitpackage:users/user_watches.tpl'NULLarray'display_mode' => 'display' ));
  45. ?>

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