Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 876 lines (848 sloc) 22.633 kB
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
1 <?php
2 /**
3 *
4 * @package Icy Phoenix
5 * @version $Id$
6 * @copyright (c) 2008 Icy Phoenix
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 *
9 */
10
06ce0f8 @MightyGorgon Brand new version...
authored
11 if (!defined('IN_ICYPHOENIX'))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
12 {
13 die('Hacking attempt');
14 }
15
16 // NOTE: this file is included from within a function!
17 // If we need to access general variables they must be declared global!
18 //global $_POST, $_GET, $_SERVER;
19
20 // Grab page data
21 $page_array = array();
06ce0f8 @MightyGorgon Brand new version...
authored
22 $page_array = extract_current_page(IP_ROOT_PATH);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
23 //dump_ary($page_array);
24
25 // Temp vars
26 $_varary = array();
27 $_tmp1 = '';
28 $_tmp2 = '';
29 // DONE: get protocol: GET, HEAD, POST, PUT
30 $_prot = $_SERVER['REQUEST_METHOD'];
f0d7f4b @MightyGorgon Big commit with many changes.
authored
31 $update_log = false;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
32 $content = '';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
33 $db_log = array();
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
34 $db_log_actions = (($config['db_log_actions'] == '1') || ($config['db_log_actions'] == '2')) ? true : false;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
35
f0d7f4b @MightyGorgon Big commit with many changes.
authored
36 // Simplify often used variables
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
37 $_mode = urldecode(request_var('mode', ''));
38 if (empty($_mode))
f0d7f4b @MightyGorgon Big commit with many changes.
authored
39 {
40 $_mode = (isset($_POST['lock']) ? 'lock' : $_mode);
41 $_mode = (isset($_POST['unlock']) ? 'unlock' : $_mode);
42 $_mode = (isset($_POST['recycle']) ? 'recycle' : $_mode);
43 }
44 if (!empty($_mode))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
45 {
46 $content .= '[MODE: ' . $_mode . '] - ';
47 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
48
49 $_confirm = (isset($_POST['confirm'])) ? true : 0;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
50 $content .= '[CONFIRM: ' . $_confirm . '] - ';
51
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
52
53 $_forum = request_var(POST_FORUM_URL, 0);
54 $_forum = ($_forum < 0) ? 0 : $_forum;
55
56 $_topic = request_var(POST_TOPIC_URL, 0);
57 $_topic = ($_topic < 0) ? 0 : $_topic;
58
59 $_post = request_var(POST_POST_URL, 0);
60 $_post = ($_post < 0) ? 0 : $_post;
61
62 $_user = request_var(POST_USERS_URL, 0);
63 $_user = ($_user < 0) ? 0 : $_user;
64 //$_user = ($_user < 2) ? ANONYMOUS : $_user;
65
66 if (!empty($_forum))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
67 {
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
68 $content .= '[FORUM: ' . $_forum . '] - ';
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
69 }
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
70 if (!empty($_topic))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
71 {
72 $content .= '[TOPIC: ' . $_topic . '] - ';
73 }
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
74 if (!empty($_post))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
75 {
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
76 $content .= '[POST: ' . $_post . '] - ';
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
77 }
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
78 if (!empty($_user))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
79 {
80 $content .= '[USER: ' . $_user . '] - ';
81 }
82
09f38bc @MightyGorgon Another milestone almost achieved for new Icy Phoenix version: user/s…
authored
83 // Log general visits - do this before action-logging (makes sure $user->data['log_id'] relates to the action rather than visit)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
84 // Skip Visits-logging on certain pages by adding them to this switch-case
f0d7f4b @MightyGorgon Big commit with many changes.
authored
85 /*
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
86 switch($page_array['page_name'])
87 {
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
88 case CMS_PAGE_POSTING:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
89 $content .= 'POSTING';
90 if($mode == 'topicreview')
91 {
92 break;
93 }
94 // Log if not review (review is loaded in the frame when replying)
f0d7f4b @MightyGorgon Big commit with many changes.
authored
95 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
96 break;
97 default:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
98 //ip_log($content);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
99 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
100 */
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
101
102 // Diff log-schemas for each page
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
103 /*
104 if(!empty($_POST))
105 {
106 dump_ary($_POST); // easy way to figure out scheme-variables to check
107 }
108 */
f0d7f4b @MightyGorgon Big commit with many changes.
authored
109 if(($page_array['page_dir'] == ADM) || ($page_array['page_dir'] == ('../' . ADM)))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
110 {
111 // ACP Logging
112 switch($page_array['page_name'])
113 {
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
114 case 'admin_forums_extend.' . PHP_EXT:
115 if(isset($_POST['update']) && !empty($_POST['name']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
116 {
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
117 $content .= '[Forum: ' . $_POST['name'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
118 if ($db_log_actions == true)
119 {
120 $db_log = array(
121 'action' => 'ADMIN_CAT_ADD',
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
122 'desc' => $_POST['name'],
f0d7f4b @MightyGorgon Big commit with many changes.
authored
123 'target' => '',
124 );
125 }
126 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
127 }
128 break;
06ce0f8 @MightyGorgon Brand new version...
authored
129 case 'admin_forumauth.' . PHP_EXT:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
130 if(isset($_POST['simpleauth']) && $_forum)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
131 {
132 $content .= '[Forum Auth: ' . $_forum . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
133 if ($db_log_actions == true)
134 {
135 $db_log = array(
136 'action' => 'ADMIN_FORUM_AUTH',
137 'desc' => $_forum,
138 'target' => '',
139 );
140 }
141 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
142 }
143 break;
f0d7f4b @MightyGorgon Big commit with many changes.
authored
144 case 'admin_db_backup.' . PHP_EXT:
145 if(isset($_POST['submit']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
146 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
147 if($_mode == 'backup')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
148 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
149 $content .= '[DB Backup: ' . $_POST['type'] . ' => ' . $_POST['where'] . ']';
150 if ($db_log_actions == true)
151 {
152 $db_log = array(
153 'action' => 'ADMIN_DB_UTILITIES_BACKUP',
154 'desc' => $_POST['type'] . ';' . $_POST['where'],
155 'target' => '',
156 );
157 }
158 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
159 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
160 elseif ($_mode == 'restore')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
161 {
162 $content .= '[DB Restore: ' . $_POST['backup_file'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
163 if ($db_log_actions == true)
164 {
165 $db_log = array(
166 'action' => 'ADMIN_DB_UTILITIES_RESTORE',
167 'desc' => $_POST['backup_file'],
168 'target' => '',
169 );
170 }
171 $update_log = true;
172 }
173 }
174 break;
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
175 case ('admin_config_settings.' . PHP_EXT):
f0d7f4b @MightyGorgon Big commit with many changes.
authored
176 if(isset($_POST['submit']))
177 {
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
178 $content .= '[Icy Phoenix Config]';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
179 if ($db_log_actions == true)
180 {
181 $db_log = array(
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
182 'action' => 'ADMIN_BOARD_IP_CONFIG',
f0d7f4b @MightyGorgon Big commit with many changes.
authored
183 'desc' => '',
184 'target' => '',
185 );
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
186 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
187 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
188 }
189 break;
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
190 case 'admin_board.' . PHP_EXT:
191 case 'admin_board_clearcache.' . PHP_EXT:
192 case 'admin_board_quick_settings.' . PHP_EXT:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
193 if(isset($_POST['submit']))
194 {
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
195 $content .= '[Board Config]';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
196 if ($db_log_actions == true)
197 {
198 $db_log = array(
a4ea299 @MightyGorgon First commit with UTF-8 modifications, almost all files have been edi…
authored
199 'action' => 'ADMIN_BOARD_CONFIG',
f0d7f4b @MightyGorgon Big commit with many changes.
authored
200 'desc' => '',
201 'target' => '',
202 );
203 }
204 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
205 }
206 break;
06ce0f8 @MightyGorgon Brand new version...
authored
207 case 'admin_groups.' . PHP_EXT:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
208 if($_mode == 'newgroup')
209 {
210 $content .= '[Group Name: ' . $_POST['group_name'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
211 if ($db_log_actions == true)
212 {
213 $db_log = array(
214 'action' => 'ADMIN_GROUP_NEW',
215 'desc' => $_POST['group_name'],
216 'target' => '',
217 );
218 }
219 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
220 }
221 elseif($_mode == 'editgroup' && $_POST['group_delete'] == 1)
222 {
223 $content .= '[Group Delete: ' . $_POST['group_name'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
224 if ($db_log_actions == true)
225 {
226 $db_log = array(
227 'action' => 'ADMIN_GROUP_DELETE',
228 'desc' => $_POST['group_name'],
229 'target' => '',
230 );
231 }
232 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
233 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
234 elseif($_mode == 'editgroup' && isset($_POST[POST_GROUPS_URL]))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
235 {
236 $content .= '[Group Edit: ' . $_POST['group_name'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
237 if ($db_log_actions == true)
238 {
239 $db_log = array(
240 'action' => 'ADMIN_GROUP_EDIT',
241 'desc' => $_POST['group_name'],
242 'target' => '',
243 );
244 }
245 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
246 }
247 break;
06ce0f8 @MightyGorgon Brand new version...
authored
248 case 'admin_ug_auth.' . PHP_EXT:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
249 if($_mode == 'user' && isset($_POST['submit']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
250 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
251 $content .= '[User Auth: ' . $_POST[POST_USERS_URL] . ' ==> . ' . $_POST['userlevel'] . ']';
252 if ($db_log_actions == true)
253 {
254 $db_log = array(
255 'action' => 'ADMIN_USER_AUTH',
256 'desc' => $_POST['userlevel'],
257 'target' => $_POST[POST_USERS_URL],
258 );
259 }
260 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
261 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
262 elseif(isset($_POST[POST_GROUPS_URL]) && isset($_POST['adv']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
263 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
264 $content .= '[Group Auth: ' . $_POST[POST_GROUPS_URL] . ']';
265 if ($db_log_actions == true)
266 {
267 $db_log = array(
268 'action' => 'ADMIN_GROUP_AUTH',
269 'desc' => $_POST[POST_GROUPS_URL],
270 'target' => '',
271 );
272 }
273 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
274 }
275 break;
06ce0f8 @MightyGorgon Brand new version...
authored
276 case 'admin_user_ban.' . PHP_EXT:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
277 if($_mode == 'edit')
278 {
279 $_data = '';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
280 if(!empty($_POST['ban_email']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
281 {
282 $_data = $_POST['ban_email'];
283 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
284 if(!empty($_POST['ban_ip']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
285 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
286 $_data .= (($_data != '') ? ', ' : '') . $_POST['ban_ip'];
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
287 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
288 if(!empty($_POST['username']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
289 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
290 $_data .= (($_data != '') ? ', ' : '') . $_POST['username'];
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
291 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
292 if(!empty($_data))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
293 {
294 $content .= '[Ban Edit: ' . $_data . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
295 if ($db_log_actions == true)
296 {
297 if(!empty($_POST['username']))
298 {
2d7e806 @MightyGorgon Some bugs fixes:
authored
299 $sql = get_users_sql(phpbb_clean_username($_POST['username']), false, false, true, true);
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
300 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
301 $user_row = $db->sql_fetchrow($result);
302 $db->sql_freeresult($result);
303 }
304
305 $db_log = array(
306 'action' => 'ADMIN_USER_BAN',
307 'desc' => $_data,
308 'target' => $user_row['user_id'],
309 );
310 }
311 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
312 }
313 $_data = '';
314 // NOTE: we only know the ban_id being unbanned... not what user,ip or email
f0d7f4b @MightyGorgon Big commit with many changes.
authored
315 if(!empty($_POST['unban_user']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
316 {
317 foreach($_POST['unban_user'] as $key => $val)
318 {
319 if($val > 0)
320 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
321 $_data .= (($_data != '') ? ', ' : '') . $val;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
322 }
323 }
324 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
325 if(!empty($_POST['unban_ip']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
326 {
327 foreach($_POST['unban_ip'] as $key => $val)
328 {
329 if($val > 0)
330 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
331 $_data .= (($_data != '') ? ', ' : '') . $val;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
332 }
333 }
334 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
335 if(!empty($_POST['unban_email']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
336 {
337 foreach($_POST['unban_email'] as $key => $val)
338 {
339 if($val > 0)
340 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
341 $_data .= (($_data != '') ? ', ' : '') . $val;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
342 }
343 }
344 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
345 if(!empty($_data))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
346 {
347 $content .= '[Ban Edit: ' . $_data . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
348 if ($db_log_actions == true)
349 {
350 $db_log = array(
351 'action' => 'ADMIN_USER_UNBAN',
352 'desc' => $_data,
353 'target' => '',
354 );
355 }
356 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
357 }
358 }
359 break;
06ce0f8 @MightyGorgon Brand new version...
authored
360 case 'admin_users.' . PHP_EXT:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
361 if($_mode == 'save' && isset($_POST['id']) && isset($_POST['deleteuser']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
362 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
363 $content .= '[User Delete: ' . $_POST['id'] . ' ==> ' . $_POST['acp_username'] . ']';
364 if ($db_log_actions == true)
365 {
366 $db_log = array(
367 'action' => 'ADMIN_USER_DELETE',
368 'desc' => $_POST['acp_username'],
369 'target' => '',
370 );
371 }
372 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
373 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
374 elseif($_mode == 'save' && isset($_POST['id']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
375 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
376 $content .= '[User Edit: ' . $_POST['id'] . ' ==> ' . $_POST['acp_username'] . ']';
377 if ($db_log_actions == true)
378 {
379 $db_log = array(
380 'action' => 'ADMIN_USER_EDIT',
381 'desc' => $_POST['acp_username'],
382 'target' => $_POST['id'],
383 );
384 }
385 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
386 }
387 break;
388 default:
389 // No default action
390 }
391 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
392 elseif(($page_array['page_dir'] == '') || ($page_array['page_dir'] == './'))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
393 {
394 switch($page_array['page_name'])
395 {
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
396 case CMS_PAGE_POSTING:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
397 // post-deletion, edits
6fc5bc8 @MightyGorgon Pre Beta 2 Package
authored
398 if ($db_log_actions && !empty($_post))
f0d7f4b @MightyGorgon Big commit with many changes.
authored
399 {
400 $sql = "SELECT poster_id FROM " . POSTS_TABLE . " WHERE post_id = '" . $_post . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
401 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
402 $post_row = $db->sql_fetchrow($result);
403 $db->sql_freeresult($result);
404 }
405 if(($_mode == 'delete') && $_confirm && $_post)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
406 {
407 $content .= '[Post Delete: ' . $_post . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
408 if ($db_log_actions == true)
409 {
410 $db_log = array(
411 'action' => 'POST_DELETE',
412 'desc' => $_post,
413 'target' => $post_row['poster_id'],
414 );
415 }
416 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
417 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
418 elseif(($_mode == 'editpost') && $_post && isset($_POST['post']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
419 {
420 $content .= '[Post Edit: ' . $_POST['subject'] . ' ==> ' . $_post . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
421 if ($db_log_actions == true)
422 {
423 $db_log = array(
424 'action' => 'POST_EDIT',
425 'desc' => $_post . ';' . $_POST['subject'],
426 'target' => $post_row['poster_id'],
427 );
428 }
429 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
430 }
431 break;
d164727 @MightyGorgon First implementation of the new permissions system in CMS.
authored
432 case CMS_PAGE_GROUP_CP:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
433 if((isset($_GET[POST_GROUPS_URL]) || isset($_POST[POST_GROUPS_URL])))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
434 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
435 // both the POST and the GET POST_GROUPS_URL var should be set
436 $_tmp1 = (isset($_GET[POST_GROUPS_URL])) ? intval($_GET[POST_GROUPS_URL]) : intval($_POST[POST_GROUPS_URL]);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
437 }
438 if($_tmp1 > 0){
439 // Only log if we actually have a group_id
440 if(isset($_POST['joingroup']))
441 {
442 $content .= '[Group Join: ' . $_tmp1 . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
443 if ($db_log_actions == true)
444 {
445 $db_log = array(
446 'action' => 'GROUP_JOIN',
447 'desc' => $_tmp1,
448 'target' => '',
449 );
450 }
451 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
452 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
453 if (((isset($_POST['approve']) || isset($_POST['deny'])) && isset($_POST['pending_members'])) || (isset($_POST['remove']) && isset($_POST['members'])))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
454 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
455 if(isset($_POST['remove']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
456 {
457 $_varary = $_POST['members'];
458 }
459 else
460 {
461 $_varary = $_POST['pending_members'];
462 }
463
464 $_data = '';
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
465 for($i = 0; $i < sizeof($_varary); $i++)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
466 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
467 $_data .= (($_data != '') ? ', ' : '') . intval($_varary[$i]);
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
468 }
469 $content .= '[Group Edit: ' . $_tmp1 . ' ==> ' . $_data . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
470 if ($db_log_actions == true)
471 {
472 $db_log = array(
473 'action' => 'GROUP_EDIT',
474 'desc' => $_tmp1,
475 'target' => $_data,
476 );
477 }
478 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
479 }
480 elseif(isset($_POST['add']) && isset($_POST['username']))
481 {
482 $content .= '[Group Add: ' . $_tmp1 . ' ==> ' . $_POST['username'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
483 if ($db_log_actions == true)
484 {
2d7e806 @MightyGorgon Some bugs fixes:
authored
485 $sql = get_users_sql(phpbb_clean_username($_POST['username']), false, false, true, true);
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
486 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
487 $user_row = $db->sql_fetchrow($result);
488 $db->sql_freeresult($result);
489
490 $db_log = array(
491 'action' => 'GROUP_ADD',
492 'desc' => $_tmp1,
493 'target' => $user_row['user_id'],
494 );
495 }
496 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
497 }
498 elseif(isset($_POST['groupstatus']) && isset($_POST['group_type']))
499 {
500 $content .= '[Group Type: ' . $_tmp1 . ' ==> ' . intval($_POST['group_type']) . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
501 if ($db_log_actions == true)
502 {
503 $db_log = array(
504 'action' => 'GROUP_TYPE',
505 'desc' => $_tmp1 . ';' . intval($_POST['group_type']),
506 'target' => '',
507 );
508 }
509 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
510 }
511 }
512 break;
513 /*
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
514 case CMS_PAGE_PROFILE:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
515 if($_mode == 'register' && isset($_POST['agreed']) && $_prot == 'POST')
516 {
517 if(!empty($_POST['username']) && !empty($_POST['website']))
518 {
519 $content .= '[User Register: ' . $_tmp1 . ' ==> ' . $_POST['website'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
520 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
521 }
522 elseif(!empty($_POST['username']))
523 {
524 $content .= '[Profile Edit: ' . $_tmp1 . ' ==> ' . $_POST['website'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
525 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
526 }
527 }
528 break;
529 */
06ce0f8 @MightyGorgon Brand new version...
authored
530 case 'modcp.' . PHP_EXT:
f0d7f4b @MightyGorgon Big commit with many changes.
authored
531 if(($_mode == 'move') || ($_mode == 'delete') || ($_mode == 'lock') || ($_mode == 'unlock') || ($_mode == 'merge') || ($_mode == 'recycle'))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
532 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
533 $_varary = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($_topic);
534 $_data = '';
535 $_users = '';
536 $user_ids = array();
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
537 for($i = 0; $i < sizeof($_varary); $i++)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
538 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
539 $_data .= (($_data != '') ? ', ' : '') . intval($_varary[$i]);
540
541 if ($db_log_actions == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
542 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
543 $sql = "SELECT topic_poster FROM " . TOPICS_TABLE . " WHERE topic_id = '" . intval($_varary[$i]) . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
544 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
545 $user_id = $db->sql_fetchrow($result);
546 $db->sql_freeresult($result);
547
548 if (!in_array(intval($user_id['topic_poster']), $user_ids))
549 {
550 $user_ids[] = intval($user_id['topic_poster']);
551 $_users .= (($_users != '') ? ', ' : '') . intval($user_id['topic_poster']);
552 }
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
553 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
554 }
555 if($_confirm)
556 {
557 if($_mode == 'delete')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
558 {
559 $content .= '[Topic Delete: ' . $_data . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
560 if ($db_log_actions == true)
561 {
562 $db_log = array(
563 'action' => 'MODCP_DELETE',
564 'desc' => $_data,
565 'target' => $_users,
566 );
567 }
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
568 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
569 if($_mode == 'move')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
570 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
571 $new_forum_id = intval(substr($_POST['new_forum'], 1));
572 $content .= '[Topic Move: ' . $_data . ' ==> ' . $new_forum_id . ']';
573 if ($db_log_actions == true)
574 {
575 $sql = "SELECT forum_name FROM " . FORUMS_TABLE . " WHERE forum_id = '" . $new_forum_id . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
576 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
577 $forum_row = $db->sql_fetchrow($result);
578 $db->sql_freeresult($result);
579
580 $db_log = array(
581 'action' => 'MODCP_MOVE',
582 'desc' => $_data . ';' . $new_forum_id . ';' . $forum_row['forum_name'],
583 'target' => $_users,
584 );
585 }
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
586 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
587 if($_mode == 'merge')
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
588 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
589 $content .= '[Topic Merge: ' . $_data . ' ==> ' . intval($_POST['new_topic']) . ']';
590 if ($db_log_actions == true)
591 {
592 $sql = "SELECT topic_title FROM " . TOPICS_TABLE . " WHERE topic_id = '" . intval($_POST['new_topic']) . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
593 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
594 $topic_row = $db->sql_fetchrow($result);
595 $db->sql_freeresult($result);
596
597 $db_log = array(
598 'action' => 'MODCP_MERGE',
599 'desc' => $_data . ';' . intval($_POST['new_topic']) . ';' . $topic_row['topic_title'],
600 'target' => $_users,
601 );
602 }
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
603 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
604 $update_log = true;
605 }
606 if($_mode == 'recycle')
607 {
608 $content .= '[Topic Recycle: ' . $_data . ']';
609 if ($db_log_actions == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
610 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
611 $db_log = array(
612 'action' => 'MODCP_RECYCLE',
613 'desc' => $_data,
614 'target' => $_users,
615 );
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
616 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
617 $update_log = true;
618 }
619 if($_mode == 'lock')
620 {
621 $content .= '[Topic Lock: ' . $_data . ']';
622 if ($db_log_actions == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
623 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
624 $db_log = array(
625 'action' => 'MODCP_LOCK',
626 'desc' => $_data,
627 'target' => $_users,
628 );
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
629 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
630 $update_log = true;
631 }
632 if($_mode == 'unlock')
633 {
634 $content .= '[Topic Unlock: ' . $_data . ']';
635 if ($db_log_actions == true)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
636 {
f0d7f4b @MightyGorgon Big commit with many changes.
authored
637 $db_log = array(
638 'action' => 'MODCP_UNLOCK',
639 'desc' => $_data,
640 'target' => $_users,
641 );
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
642 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
643 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
644 }
645 }
646 if($_mode == 'split')
647 {
648 if (isset($_POST['split_type_all']) || isset($_POST['split_type_beyond']))
649 {
650 $_varary = $_POST['post_id_list'];
651
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
652 for ($i = 0; $i < sizeof($_varary); $i++)
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
653 {
654 $_data .= (($_data != '') ? ', ' : '') . intval($_varary[$i]);
655 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
656 $new_forum_id = intval(substr($_POST['new_forum_id'], 1));
657 $content .= '[Topic Split: ' . $_data . ' ==> ' . $new_forum_id . ']';
658 if ($db_log_actions == true)
659 {
660 $sql = "SELECT forum_name FROM " . FORUMS_TABLE . " WHERE forum_id = '" . $new_forum_id . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
661 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
662 $forum_row = $db->sql_fetchrow($result);
663 $db->sql_freeresult($result);
664
665 $db_log = array(
666 'action' => 'MODCP_SPLIT',
667 'desc' => $_data . ';' . $new_forum_id . ';' . $forum_row['forum_name'] . ';' . $_POST['subject'],
668 'target' => $_users,
669 );
670 }
671 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
672 }
673 }
674 break;
06ce0f8 @MightyGorgon Brand new version...
authored
675 case 'bin.' . PHP_EXT:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
676 $content .= '[Topic Recycle: ' . $_topic . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
677 if ($db_log_actions == true)
678 {
679 $sql = "SELECT topic_title, topic_poster FROM " . TOPICS_TABLE . " WHERE topic_id = '" . intval($_topic) . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
680 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
681 $topic_row = $db->sql_fetchrow($result);
682 $db->sql_freeresult($result);
683
684 $db_log = array(
685 'action' => 'TOPIC_BIN',
686 'desc' => $_topic . ';' . $topic_row['topic_title'],
687 'target' => $topic_row['topic_poster'],
688 );
689 }
690 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
691 break;
06ce0f8 @MightyGorgon Brand new version...
authored
692 case 'viewtopic.' . PHP_EXT:
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
693 // Log hackattacks to warnings log
f0d7f4b @MightyGorgon Big commit with many changes.
authored
694 if (isset($_GET['highlight']))
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
695 {
696 if(preg_match('/system\(chr\(\d+\)/', $_GET['highlight']))
697 {
698 $content .= '[Viewtopic Attack: ' . $_GET['highlight'] . ']';
f0d7f4b @MightyGorgon Big commit with many changes.
authored
699 if ($db_log_actions == true)
700 {
701 $sql = "SELECT topic_title, topic_poster FROM " . TOPICS_TABLE . " WHERE topic_id = " . intval($_topic) . "";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
702 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
703 $topic_row = $db->sql_fetchrow($result);
704 $db->sql_freeresult($result);
705
706 $db_log = array(
707 'action' => 'TOPIC_ATTACK',
708 'desc' => $_topic . ';' . $topic_row['topic_title'],
709 'target' => $topic_row['topic_poster'],
710 );
711 }
712 $update_log = true;
713 }
714 }
715 break;
716 case 'card.' . PHP_EXT:
717 if ($db_log_actions == true)
718 {
719 $sql = "SELECT poster_id FROM " . POSTS_TABLE . " WHERE post_id = '" . intval($_GET['post_id']) . "'";
2d81429 @MightyGorgon New Icy Phoenix version based on some new core functions.php
authored
720 $result = $db->sql_query($sql);
f0d7f4b @MightyGorgon Big commit with many changes.
authored
721 $post_row = $db->sql_fetchrow($result);
722 $db->sql_freeresult($result);
723 }
724 if($_mode == 'ban')
725 {
726 $content .= '[Ban: ' . $post_row['poster_id'] . ']';
727 if ($db_log_actions == true)
728 {
729 $db_log = array(
730 'action' => 'CARD_BAN',
731 'desc' => '',
732 'target' => $post_row['poster_id'],
733 );
734 }
735 }
736 if($_mode == 'warn')
737 {
738 $content .= '[Warn: ' . $post_row['poster_id'] . ']';
739 if ($db_log_actions == true)
740 {
741 $db_log = array(
742 'action' => 'CARD_WARN',
743 'desc' => '',
744 'target' => $post_row['poster_id'],
745 );
746 }
747 }
748 if($_mode == 'unban')
749 {
750 $content .= '[Unban: ' . $post_row['poster_id'] . ']';
751 if ($db_log_actions == true)
752 {
753 $db_log = array(
754 'action' => 'CARD_UNBAN',
755 'desc' => '',
756 'target' => $post_row['poster_id'],
757 );
758 }
759 }
760 $update_log = true;
761 break;
762 case 'cms.' . PHP_EXT:
763 if($_mode == 'layouts')
764 {
765 if (($_GET['action'] == 'edit') && isset($_POST['save']))
766 {
767 $l_id = (intval($_GET['l_id']));
768 $content .= '[CMS Layout Edit: ' . $l_id . ']';
769 if ($db_log_actions == true)
770 {
771 $db_log = array(
772 'action' => 'CMS_LAYOUT_EDIT',
773 'desc' => $l_id,
774 'target' => '',
775 );
776 }
777 $update_log = true;
778 }
779 elseif(($_GET['action'] == 'delete') && $_confirm)
780 {
781 $l_id = (intval($_GET['l_id']));
782 $content .= '[CMS Layout Delete: ' . $l_id . ']';
783 if ($db_log_actions == true)
784 {
785 $db_log = array(
786 'action' => 'CMS_LAYOUT_DELETE',
787 'desc' => $l_id,
788 'target' => '',
789 );
790 }
791 $update_log = true;
792 }
793 }
794 if($_mode == 'blocks')
795 {
796 if (($_GET['action'] == 'edit') && isset($_POST['save']))
797 {
798 $b_id = (intval($_GET['b_id']));
799 $l_id = (intval($_GET['l_id']));
800 $ls_id = (intval($_GET['ls_id']));
801 if ($l_id)
802 {
803 $content .= '[CMS Block Edit: ' . $b_id . ']';
804 if ($db_log_actions == true)
805 {
806 $db_log = array(
807 'action' => 'CMS_BLOCK_EDIT',
808 'desc' => $b_id . ';' . $l_id,
809 'target' => '',
810 );
811 }
812 }
813 elseif ($ls_id)
814 {
815 $content .= '[CMS Block Edit: ' . $b_id . ']';
816 if ($db_log_actions == true)
817 {
818 $db_log = array(
819 'action' => 'CMS_BLOCK_EDIT_LS',
820 'desc' => $b_id . ';' . $ls_id,
821 'target' => '',
822 );
823 }
824 }
825 $update_log = true;
826 }
827 elseif(($_GET['action'] == 'delete') && $_confirm)
828 {
829 $b_id = (intval($_GET['b_id']));
830 $l_id = (intval($_GET['l_id']));
831 $ls_id = (intval($_GET['ls_id']));
832 if ($l_id)
833 {
834 $content .= '[CMS Block Delete: ' . $b_id . ']';
835 if ($db_log_actions == true)
836 {
837 $db_log = array(
838 'action' => 'CMS_BLOCK_DELETE',
839 'desc' => $b_id . ';' . $l_id,
840 'target' => '',
841 );
842 }
843 }
844 elseif ($ls_id)
845 {
846 $content .= '[CMS Block Delete: ' . $b_id . ']';
847 if ($db_log_actions == true)
848 {
849 $db_log = array(
850 'action' => 'CMS_BLOCK_DELETE_LS',
851 'desc' => $b_id . ';' . $ls_id,
852 'target' => '',
853 );
854 }
855 }
856 $update_log = true;
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
857 }
858 }
859 break;
860 default:
861 }
862 }
863
f0d7f4b @MightyGorgon Big commit with many changes.
authored
864 if ($update_log)
865 {
fa5aa7d @MightyGorgon Some bugs fixes in CMS added a couple of new features for tags and im…
authored
866 if (!function_exists('ip_log'))
867 {
868 include(IP_ROOT_PATH . 'includes/functions_mg_log.' . PHP_EXT);
869 }
f0d7f4b @MightyGorgon Big commit with many changes.
authored
870 ip_log($content, $db_log);
871 }
872
d07f25e @MightyGorgon git-svn-id: http://svn.assembla.com/svn/icy_phoenix/ip/trunk@29 e0e46…
authored
873 // unset temp-vars
874 unset($_mode, $_data, $_post, $_topic, $_forum, $_user, $_confirm, $_content, $_tmp1, $_tmp2, $_varary);
875
876 ?>
Something went wrong with that request. Please try again.