Subversion Repositories novennotification

[/] [modules/] [novennotification/] [view.php] - Blame information for rev 1

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1 acidre
<?php
2
 
3
//
4
// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
5
// SOFTWARE NAME: Noven notification
6
// SOFTWARE RELEASE: 1.0.0
7
// COPYRIGHT NOTICE: Copyright (C) 2009 - Jean-Luc Nguyen, Noven.
8
// SOFTWARE LICENSE: GNU General Public License v2.0
9
// NOTICE: >
10
//   This program is free software; you can redistribute it and/or
11
//   modify it under the terms of version 2.0  of the GNU General
12
//   Public License as published by the Free Software Foundation.
13
//
14
//   This program is distributed in the hope that it will be useful,
15
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
//   GNU General Public License for more details.
18
//
19
//   You should have received a copy of version 2.0 of the GNU General
20
//   Public License along with this program; if not, write to the Free
21
//   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
//   MA 02110-1301, USA.
23
//
24
//
25
// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
26
//
27
 
28
include_once( "kernel/common/template.php" );
29
 
30
$Module =& $Params["Module"];
31
$Result = array();
32
$tpl = templateInit();
33
$http = eZHTTPTool::instance();
34
 
35
if ( $Params['UserID'] )
36
{
37
    $userContentObjectID = $Params['UserID'];
38
    $user = eZUser::fetch($userContentObjectID);
39
    $subscribedNodes = eZSubTreeHandler::rules( $user, 0, 500 );  
40
 
41
    $tpl->setVariable('subscribed_nodes', $subscribedNodes);
42
    $tpl->setVariable('user', $user);
43
}
44
 
45
$Result['content'] = $tpl->fetch( "design:novennotification/view.tpl" );
46
$Result['path'] = array(
47
                        array(  'url'   => false,
48
                                'text'  => ezi18n( 'extension/novennotification', 'Users notification settings' ) ) );
49