Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezforum/user/userlogin.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: userlogin.php 9518 2002-05-08 11:51:36Z vl $
5 //
6 // Created on: <14-Oct-2000 15:41:17 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "classes/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezhttptool.php" );
30 // include_once( "classes/eztexttool.php" );
31 // include_once( "ezuser/classes/ezuser.php" );
32
33 $ini =& eZINI::instance( 'site.ini' );
34
35 $Language = $ini->variable( "eZForumMain", "Language" );
36
37
38
39 if ( eZUser::currentUser() )
40 {
41 if ( isset( $RedirectURL ) )
42 {
43 $AdditionalURLInfo="?RedirectURL=$RedirectURL";
44 }
45 else
46 {
47 $RedirectURL='';
48 }
49
50 if ( $Action == "newsimple" )
51 {
52 eZHTTPTool::header( "Location: /forum/messageedit/new/$ForumID/$AdditionalURLInfo" );
53 }
54
55 if ( $Action == "replysimple" )
56 {
57 eZHTTPTool::header( "Location: /forum/messageedit/reply/$ReplyToID/$ForumID/$AdditionalURLInfo" );
58 }
59
60 if ( $Action == "new" )
61 {
62 eZHTTPTool::header( "Location: /forum/messageedit/new/$ForumID/$AdditionalURLInfo" );
63 }
64
65 if ( $Action == "edit" )
66 {
67 eZHTTPTool::header( "Location: /forum/messageedit/edit/$MessageID/$AdditionalURLInfo" );
68 }
69
70 if ( $Action == "delete" )
71 {
72 eZHTTPTool::header( "Location: /forum/messageedit/delete/$MessageID/$AdditionalURLInfo" );
73 }
74
75 if ( $Action == "reply" )
76 {
77 eZHTTPTool::header( "Location: /forum/messageedit/reply/$ReplyToID/$AdditionalURLInfo" );
78 }
79 }
80 else
81 {
82 $Anonymous = false;
83
84 if ( isset( $RedirectURL ) )
85 {
86 $AdditionalURLInfo="?RedirectURL=$RedirectURL";
87 }
88 else
89 {
90 $AdditionalURLInfo = "";
91 $RedirectURL='';
92 }
93
94 switch ( $Action )
95 {
96 case "new":
97 {
98 // include_once( "ezforum/classes/ezforum.php" );
99 // include_once( "ezforum/classes/ezforummessage.php" );
100
101 $CheckForumID = $ForumID;
102 if( !isset( $AdditionalURLInfo ) )
103 {
104 $AdditionalURLInfo = "";
105 }
106
107 include( "kernel/ezforum/user/messagepermissions.php" );
108
109 if ( $ForumPost == true )
110 {
111 eZHTTPTool::header( "Location: /forum/messageedit/new/$ForumID/$AdditionalURLInfo" );
112 }
113 }
114 break;
115
116 case "reply":
117 {
118 // include_once( "ezforum/classes/ezforum.php" );
119 // include_once( "ezforum/classes/ezforummessage.php" );
120
121 $msg = new eZForumMessage( $ReplyToID );
122
123 $CheckForumID = $msg->forumID();
124
125 include( "kernel/ezforum/user/messagepermissions.php" );
126
127 if ( $ForumPost == true )
128 {
129 eZHTTPTool::header( "Location: /forum/messageedit/reply/$ReplyToID/$AdditionalURLInfo" );
130 }
131 }
132 break;
133 }
134
135 if ( $Anonymous == false )
136 {
137 $t = new eZTemplate( "kernel/ezforum/user/" . $ini->variable( "eZForumMain", "TemplateDir" ),
138 "kernel/ezforum/user/intl/", $Language, "userlogin.php" );
139
140 $t->setAllStrings();
141
142 $t->set_file( "user_login_tpl", "userlogin.tpl" );
143
144 if ( $Action == "newsimple" )
145 {
146 $t->set_var( "redirect_url", eZTextTool::htmlspecialchars( $RedirectURL ) );
147 }
148
149 if ( $Action == "replysimple" )
150 {
151 $t->set_var( "redirect_url", eZTextTool::htmlspecialchars( $RedirectURL ) );
152 }
153
154 if ( $Action == "new" )
155 {
156 $t->set_var( "redirect_url", "/forum/messageedit/new/$ForumID/" );
157 }
158
159 if ( $Action == "edit" )
160 {
161 $t->set_var( "redirect_url", "/forum/messageedit/edit/$MessageID/" );
162 }
163
164 if ( $Action == "delete" )
165 {
166 $t->set_var( "redirect_url", "/forum/messageedit/delete/$MessageID/" );
167 }
168
169 if ( $Action == "reply" )
170 {
171 $t->set_var( "redirect_url", "/forum/messageedit/reply/$ReplyToID/" );
172 }
173
174 $t->pparse( "output", "user_login_tpl" );
175 }
176 }
177
178 ?>
eZForumMessage
Definition: ezforummessage.php:42
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZTemplate
Definition: eztemplate.php:107
eZTextTool\htmlspecialchars
static htmlspecialchars( $string)
Definition: eztexttool.php:144
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$Action
$Action
Definition: companysearch.php:80
$msg
$msg
Definition: editmessage.php:47
$RedirectURL
$RedirectURL
Definition: ezforum/user/userlogin.php:91
$Language
$Language
Definition: ezforum/user/userlogin.php:35
$ini
$ini
Definition: ezforum/user/userlogin.php:33
$Anonymous
$Anonymous
Definition: homepage.php:65
$ForumPost
$ForumPost
Definition: messagepermissions.php:43
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.