summaryrefslogtreecommitdiff
path: root/watches.php
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 05:12:24 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 05:12:24 +0000
commit657b3b2cb4d1ecb68c78320bdc03151590a9e6cd (patch)
treec88e26bedb5f01d457e28d07d6b7aa08ed13cdd1 /watches.php
downloadusers-657b3b2cb4d1ecb68c78320bdc03151590a9e6cd.tar.gz
users-657b3b2cb4d1ecb68c78320bdc03151590a9e6cd.tar.bz2
users-657b3b2cb4d1ecb68c78320bdc03151590a9e6cd.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'watches.php')
-rw-r--r--watches.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/watches.php b/watches.php
new file mode 100644
index 0000000..62c9f06
--- /dev/null
+++ b/watches.php
@@ -0,0 +1,37 @@
+<?php
+// $Header: /cvsroot/bitweaver/_bit_users/watches.php,v 1.1 2005/06/19 05:12:22 bitweaver Exp $
+// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
+// All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+include_once( '../bit_setup_inc.php' );
+$user = $gBitUser->mUserId;
+if (!$user) {
+ $smarty->assign('msg', tra("You must log in to use this feature"));
+ $gBitSystem->display( 'error.tpl' );
+ die;
+}
+
+$gBitSystem->verifyFeature( 'feature_user_watches' );
+
+if (isset($_REQUEST['hash'])) {
+
+ $gBitUser->remove_user_watch_by_hash($_REQUEST['hash']);
+}
+if (isset($_REQUEST['watch'])) {
+
+ foreach (array_keys($_REQUEST["watch"])as $item) {
+ $gBitUser->remove_user_watch_by_hash($item);
+ }
+}
+// Get watch events and put them in watch_events
+$events = $gBitUser->get_watches_events();
+$smarty->assign('events', $events);
+// if not set event type then all
+if (!isset($_REQUEST['event']))
+ $_REQUEST['event'] = '';
+// get all the information for the event
+$watches = $gBitUser->getWatches( $_REQUEST['event'] );
+$smarty->assign('watches', $watches);
+
+$gBitSystem->display( 'bitpackage:users/user_watches.tpl');
+?>