Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezforum/user/datasupplier.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: datasupplier.php 8879 2002-01-04 14:29:07Z kaid $
5 //
6 // Created on: <23-Oct-2000 17:53:46 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/ezhttptool.php" );
28 // include_once( "classes/eztemplate.php" );
29
30 $ini =& eZINI::instance( 'site.ini' );
31 $GlobalSectionID = $ini->variable( "eZForumMain", "DefaultSection" );
32
33 function &errorPage( $PrimaryName, $PrimaryURL, $type )
34 {
35 $ini =& eZINI::instance( 'site.ini' );
36
37 $t = new eZTemplate( "kernel/ezforum/user/" . $ini->variable( "eZForumMain", "TemplateDir" ),
38 "kernel/ezforum/user/intl", $ini->variable( "eZForumMain", "Language" ), "message.php" );
39
40 $t->set_file( "page", "messageerror.tpl" );
41 $t->set_var( "primary_url", $PrimaryURL );
42 $t->set_var( "primary_url_name", $t->Ini->variable( "strings", $PrimaryName ) );
43 if ( $type == 404 )
44 {
45 $t->set_var( "error_1", $t->Ini->variable( "strings", 'error_missing_page_1' ) );
46 $t->set_var( "error_2", $t->Ini->variable( "strings", 'error_missing_page_2' ) );
47 $t->set_var( "error_3", $t->Ini->variable( "strings", 'error_missing_page_3' ) );
48 }
49 else
50 {
51 $t->set_var( "error_1", $t->Ini->variable( "strings", 'error_forbidden_page_1' ) );
52 $t->set_var( "error_2", $t->Ini->variable( "strings", 'error_forbidden_page_2' ) );
53 $t->set_var( "error_3", $t->Ini->variable( "strings", 'error_forbidden_page_3' ) );
54 }
55 $t->setAllStrings();
56
57 $error = $t->parse( "error", "page" );
58 $Info =& stripslashes( $error );
59 $error =& urlencode( $Info );
60 return $error;
61 }
62
63 switch ( $url_array[2] )
64 {
65 case "userlogin":
66 {
67 $Action = $url_array[3];
68
69 switch ( $Action )
70 {
71 case "edit":
72 case "delete":
73 {
74 $MessageID = $url_array[4];
75 include( "kernel/ezforum/user/userlogin.php" );
76 }
77 break;
78 }
79 if ( $url_array[3] == "new" )
80 {
81 $Action = $url_array[3];
82 $ForumID = $url_array[4];
83 $MessageID = $url_array[4];
84 include( "kernel/ezforum/user/userlogin.php" );
85 }
86
87 if ( $url_array[3] == "reply" )
88 {
89 $Action = $url_array[3];
90 $ReplyToID = $url_array[4];
91 include( "kernel/ezforum/user/userlogin.php" );
92 }
93
94 if ( $url_array[3] == "newsimple" )
95 {
96 $ForumID = $url_array[4];
97 include( "kernel/ezforum/user/userlogin.php" );
98 }
99
100 if ( $url_array[3] == "replysimple" )
101 {
102 $ForumID = $url_array[4];
103 $ReplyToID = $url_array[5];
104 include( "kernel/ezforum/user/userlogin.php" );
105 }
106 }
107 break;
108
109 case "categorylist":
110 {
111 include( "kernel/ezforum/user/categorylist.php" );
112 }
113 break;
114
115 case "forumlist":
116 {
117 $CategoryID = $url_array[3];
118 include( "kernel/ezforum/user/forumlist.php" );
119 }
120 break;
121
122 case "messagelist":
123 {
124 $ForumID = $url_array[3];
125
126 if ( $url_array[4] == "parent" )
127 $Offset = $url_array[5];
128
129 include( "kernel/ezforum/user/messagelist.php" );
130 }
131 break;
132
133 case "messagelistflat":
134 {
135 $ForumID = $url_array[3];
136
137 if ( $url_array[4] == "parent" )
138 $Offset = $url_array[5];
139
140 include( "kernel/ezforum/user/messagelistflat.php" );
141 }
142 break;
143
144 case "messagesimpleedit":
145 case "messagesimplereply":
146 case "reply":
147 case "messageedit":
148 case "newpost":
149 case "newsimple":
150 {
151 $Action = $url_array[3];
152 $ID = $url_array[4];
153
154 switch ( $Action )
155 {
156 case "reply":
157 {
158 $ReplyToID = $ID;
159 $ForumID = $url_array[5];
160 }
161 break;
162
163 case "preview":
164 {
165 $ReplyToID = $ID;
166 }
167 break;
168
169 case "new":
170 {
171 $ForumID = $ID;
172 }
173 break;
174
175 case "edit":
176 case "completed":
177 case "insert":
178 case "update":
179 case "delete":
180 case "dodelete":
181 {
182 $MessageID = $ID;
183 }
184 break;
185 }
186 include( "kernel/ezforum/user/messageedit.php" );
187
188 }
189 break;
190
191 case "message":
192 {
193 $MessageID = $url_array[3];
194 include( "kernel/ezforum/user/message.php" );
195 }
196 break;
197
198 case "search" :
199 {
200 if ( isset( $url_array[3] ) and $url_array[3] == "parent" )
201 {
202 $QueryString = urldecode( $url_array[4] );
203 $Offset = $url_array[5];
204 if ( !is_numeric( $Offset ) )
205 $Offset = 0;
206 }
207
208 include( "kernel/ezforum/user/search.php" );
209 }
210 break;
211
212 default :
213 {
214 eZHTTPTool::header( "Location: /error/404?Info=" . errorPage( "forum_main", "/forum/categorylist/", 404 ) );
215 }
216 break;
217 }
218
219 ?>
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZTemplate
Definition: eztemplate.php:107
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$type
$type
Definition: classes/admin/linkselect.php:220
$Action
$Action
Definition: companysearch.php:80
$url_array
$url_array
Definition: ezaddress/admin/datasupplier.php:34
$error
$error
Definition: ezarticle/admin/categoryedit.php:51
$Offset
$Offset
Definition: ezarticle/user/search.php:110
errorPage
& errorPage( $PrimaryName, $PrimaryURL, $type)
Definition: ezforum/user/datasupplier.php:33
$GlobalSectionID
$GlobalSectionID
Definition: ezforum/user/datasupplier.php:31
$ini
$ini
Definition: ezforum/user/datasupplier.php:30
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.