Repository navigation
Expand file tree
/
Copy pathaltusercp.php
More file actions
464 lines (385 loc) · 17.2 KB
/
Copy pathaltusercp.php
File metadata and controls
464 lines (385 loc) · 17.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<?php
/**
**************************
** FreeTSP Version: 1.0 **
**************************
** http://www.freetsp.info
** https://github.com/Krypto/FreeTSP
** Licence Info: GPL
** Copyright (C) 2010 FreeTSP v1.0
** A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
** Project Leaders: Krypto, Fireknight.
**/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.'function_main.php');
require_once(FUNC_DIR.'function_user.php');
require_once(FUNC_DIR.'function_vfunctions.php');
require_once(FUNC_DIR.'function_bbcode.php');
require_once(FUNC_DIR.'function_page_verify.php');
db_connect();
logged_in();
$newpage = new page_verify();
$newpage->create('_altusercp_');
site_header(htmlentities($CURUSER["username"], ENT_QUOTES)."'s private page", false);
if (isset($_GET["edited"]))
{
display_message("success", "Success", "<a href='altusercp.php'>Your Profile has been Updated!</a>");
if ($_GET["mailsent"])
{
display_message("success", "Success", "<a href='altusercp.php'>A Confirmation email has been Sent!</a>");
}
}
elseif (isset($_GET["emailch"]))
{
display_message("success", "Success", "<a href='altusercp.php'>Email Address Changed!</a>");
}
else
{
print("<h1>Welcome, $CURUSER[username]!</h1>");
}
print("<table align='center'>");
print("<tr>
<td class='colhead' width='125' height='18' align='center'>".htmlspecialchars($CURUSER["username"])."'s Avatar</td>
</tr>");
if ($CURUSER['avatar'])
{
print("<tr>
<td class='std'>
<img src='".htmlspecialchars($CURUSER["avatar"])."' width='125' height='125' border='0' alt='' title='' />
</td>
</tr>");
}
else
{
print("<tr>
<td class='std'>
<img src='".$image_dir."default_avatar.gif' width='125' height='125' border='0' alt=' title='' />
</td>
</tr>");
}
print("</table>");
print("<h1><a href='userdetails.php?id=$CURUSER[id]'>Your Details</a></h1>");
print("<div id='featured'>
<ul>
<li><a href='#fragment-0'></a></li>
<li><a href='#fragment-1' class='btn'>Avatar</a></li>
<li><a href='#fragment-2' class='btn'>Personal</a></li>
<li><a href='#fragment-3' class='btn'>Private Messages</a></li>
<li><a href='#fragment-4' class='btn'>Security</a></li>
<li><a href='#fragment-5' class='btn'>Signature</a></li>
<li><a href='#fragment-6' class='btn'>Torrents</a></li>
<li><a href='#fragment-7' class='btn'>Logout</a></li>
</ul>
");
print("<div>");
print("<div id='fragment-1' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=avatar'>
<table border='1' align='center' width='81%'>");
print("<tr>
<td class='colhead' align='center' height='18 'colspan='2' >Avatar Options</td>
</tr>");
if (get_user_class() >= UC_SYSOP)
{
print("<tr>
<td class='rowhead_form' align='right'><label for='title'>Title </label></td>
<td class='rowhead_form'>
<input type='text' name='title' id='title' size='50' value='".htmlspecialchars($CURUSER["title"])."' />
</td>
</tr>");
}
print("<tr>
<td class='rowhead_form' align='right'><label for='avatar'>Avatar URL </label></td>
<td class='rowhead_form'>
<input type='text' name='avatar' id='avatar' size='50' value='".htmlspecialchars($CURUSER["avatar"])."' /><br />
Width should be 250 pixels (will be resized if necessary)
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'><label for='show'>Show Avatars </label></td>
<td class='rowhead_form'>
<input type='checkbox' name='avatars' id='show' ".($CURUSER["avatars"] == "yes" ? " checked='checked'" : "")." value='yes' />
All (Low Bandwidth Users might want to turn this Off)<br />
</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr></table></form></div>");
print("<div id='fragment-2' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=personal'>
<table border='1' align='center' width='81%'>");
print("<tr>
<td class='colhead' align='center' height='18' colspan='2'>Personal Options</td>
</tr>");
$ss_r = sql_query("SELECT id, name
FROM stylesheets
ORDER BY id") or die;
$ss_sa = array();
while ($ss_a = mysql_fetch_array($ss_r))
{
$ss_id = $ss_a["id"];
$ss_name = $ss_a["name"];
$ss_sa[$ss_name] = $ss_id;
}
ksort($ss_sa);
reset($ss_sa);
while (list($ss_name, $ss_id) = each($ss_sa))
{
if ($ss_id == $CURUSER['stylesheet'])
{
$ss = " selected='selected'";
}
else
{
$ss = "";
}
$stylesheets .= "<option value='$ss_id'$ss>$ss_name</option>\n";
}
$countries = "<option value='0'>---- None Selected ----</option>\n";
$ct_r = sql_query("SELECT id,name
FROM countries
ORDER BY name") or sqlerr(__FILE__, __LINE__);
while ($ct_a = mysql_fetch_assoc($ct_r))
{
$countries .= "<option value='{$ct_a['id']}'".($CURUSER["country"] == $ct_a['id'] ? " selected='selected'" : "").">{$ct_a['name']}</option>\n";
}
print("<tr>
<td class='rowhead_form' align='right'>Stylesheet </td>
<td class='rowhead_form'><select name='stylesheet'>\n$stylesheets\n</select></td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Park Account </td>
<td class='rowhead'>
<input type='radio' name='parked'".($CURUSER["parked"] == "yes" ? " checked='checked'" : "")." value='yes' />Yes
<input type='radio' name='parked'".($CURUSER["parked"] == "no" ? " checked='checked'" : "")." value='no' />No<br />
You can Park your Account to prevent it from being Deleted
because of Inactivity if you go away on for example a vacation.
When the Account has been Parked limits are put on the account,
for example you cannot use the tracker and browse some of the pages.
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>PC on at Night </td>
<td class='rowhead'>
<input type='radio' name='pcoff'".($CURUSER["pcoff"] == "yes" ? " checked='checked'" : "")." value='yes' />Yes
<input type='radio' name='pcoff'".($CURUSER["pcoff"] == "no" ? " checked='checked'" : "")." value='no' />No
</td>
</tr>");
if ($CURUSER['menu'] == "2")
{
print("<tr>
<td class='rowhead_form' align='right'>Menu Selection</td>
<td class='rowhead' align='left'>
<select name='menu' id='input'>
<option value='2'>Standard</option>
<option value='1'>Dropdown</option>
</select>
</td>
</tr>");
}
else
{
print("<tr>
<td class='rowhead_form' align='right'>Menu Selection</td>
<td class='rowhead' align='left'>
<select name='menu' id='input'>
<option value='1'>Dropdown</option>
<option value='2'>Standard</option>
</select>
</td>
</tr>");
}
print("<tr>
<td class='rowhead_form' align='right'>Country </td>
<td class='rowhead_form'><select name='country'>\n$countries\n</select></td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Torrents Per Page </td>
<td class='rowhead_form'>
<input type='text' name='torrentsperpage' id='torrentsperpage' size='10' value='$CURUSER[torrentsperpage]' /> (0=Use Default Setting)
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Topics Per Page </td>
<td class='rowhead_form'>
<input type='text' name='topicsperpage' id='topicsperpage' size='10' value='$CURUSER[topicsperpage]' /> (0=Use Default Setting)
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Posts Per Page </td>
<td class='rowhead_form'>
<input type='text' name='postsperpage' id='postsperpage' size='10' value='$CURUSER[postsperpage]' /> (0=Use Default Setting)
</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr></table></form></div>");
print("<div id='fragment-3' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=pm'>
<table border='1' align='center' width='81%' >");
print("<tr>
<td class='colhead' align='center' height='18' colspan='2'>Private Message Options</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Accept PM's </td>
<td class='rowhead_form'>
<input type='radio' name='acceptpms'".($CURUSER["acceptpms"] == "yes" ? " checked='checked'" : "")." value='yes' />All (Except Blocks)
<input type='radio' name='acceptpms'".($CURUSER["acceptpms"] == "friends" ? " checked='checked'" : "")." value='friends' />Friends Only
<input type='radio' name='acceptpms'".($CURUSER["acceptpms"] == "no" ? " checked='checked'" : "")." value='no' />Staff Only
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Delete PM's </td>
<td class='rowhead_form'>
<input type='checkbox' name='deletepms'".($CURUSER["deletepms"] == "yes" ? " checked='checked'" : "")." />(Default value for 'Delete PM on Reply')
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Save PM's </td>
<td class='rowhead_form'>
<input type='checkbox' name='savepms'".($CURUSER["savepms"] == "yes" ? " checked='checked'" : "")." />(Default value for 'Save PM to Sentbox')
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Email Notification </td>
<td class='rowhead_form'> Select under Torrents Option.</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr>
</table></form></div>");
print("<div id='fragment-4' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=security'>
<table border='1' align='center' width='81%'>");
print("<tr>
<td class='colhead' align='center' height='18' colspan='2'>Security Options</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Reset Passkey </td>
<td class='rowhead_form'>
<input type='checkbox' name='resetpasskey' value='1' /><br />
<span style='font-size: x-small; '> Any Active Torrents MUST be Downloaded again to continue Leeching/Seeding.</span>
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Email Address </td>
<td class='rowhead_form'>
<input type='text' name='email' id='email' size='50' value='".htmlspecialchars($CURUSER["email"])."' />
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>*Note: </td>
<td align='left'> In order to change your email address, you will receive another<br /> Confirmation Email to your new address.</td>
</tr>\n");
print("<tr>
<td class='rowhead_form' align='right'>Change Password </td>
<td class='rowhead_form'>
<img src='{$image_dir}password/tooshort.gif' id='strength' width='240' height='27' border='0' alt='' title='' /><br />
<input type='password' name='chpassword' maxlength='15' onkeyup='updatestrength(this.value);' id='password' size='50' />
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Type Password Again </td>
<td class='rowhead_form'>
<input type='password' name='passagain' id='passagain' size='50' />
</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr></table></form></div>");
print("<div id='fragment-5' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=signature'>
<table border='1' align='center' width='81%'>");
print("<tr>
<td class='colhead' align='center' height='18' colspan='2'>Signature Options<br />".format_comment($CURUSER['signature'])."</td></tr>");
print("<tr>
<td class='rowhead_form' align='right'>Signature </td>
<td class='rowhead_form'>
<textarea name='signature' id='signature' cols='50' rows='4'>".htmlspecialchars($CURUSER['signature'])."</textarea><br />
<span style='font-size: x-small; '> Max 225 characters. Max Image Size 500x100.</span>\n<br /> May contain BB codes.
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>View Signatures </td>
<td class='rowhead_form'>
<input type='checkbox' name='signatures'".($CURUSER["signatures"] == "yes" ? " checked='checked'" : "")." /> (Low Bandwidth users might want to turn this Off)
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Info </td>
<td class='rowhead_form'>
<textarea name='info' id='info' cols='50' rows='4'>".$CURUSER["info"]."</textarea><br />
Displayed on your Public Page. May contain BB codes.
</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr></table></form></div>");
print("<div id='fragment-6' class='ui-tabs-panel'>
<form method='post' action='takeeditaltusercp.php?action=torrents'>
<table border='1' align='center' width='81%'>");
print("<tr>
<td class='colhead' align='center' height='18' colspan='2'>Torrents Options</td>
</tr>");
$r = sql_query("SELECT id,name
FROM categories
ORDER BY name") or sqlerr();
if (mysql_num_rows($r) > 0)
{
$categories = "<table><tr>\n";
$i = 0;
while ($a = mysql_fetch_assoc($r))
{
$categories .= ($i && $i % 2 == 0) ? "</tr><tr>" : "";
$categories .= "<td class='bottom' style='padding-right: 5px'>
<input name='cat$a[id]' type='checkbox'".(strpos($CURUSER['notifs'], "[cat$a[id]]") !== false ? " checked='checked'" : "")." value='yes' /> ".htmlspecialchars($a["name"])."
</td>\n";
++$i;
}
$categories .= "</tr></table>\n";
}
print("<tr>
<td class='rowhead_form' align='right'>Email Notification </td>
<td class='rowhead_form'>
<input type='checkbox' name='pmnotif'".(strpos($CURUSER['notifs'], "[pm]") !== false ? " checked='checked'" : "")." value='yes' /> Notify me when I receive a Private Message<br />\n
<input type='checkbox' name='emailnotif'".(strpos($CURUSER['notifs'], "[email]") !== false ? " checked='checked'" : "")." value='yes' /> Notify me when a torrent is Uploaded in one of my Default Browsing Categories.\n
</td>
</tr>");
print("<tr>
<td class='rowhead_form' align='right'>Browse Default <br />Categories </td>
<td class='rowhead_form'>$categories</td>
</tr>");
print("<tr>
<td class='std' align='center' height='30' colspan='2'>
<input type='reset' class='btn' value='Revert Changes!' />
<input type='submit' class='btn' value='Submit Changes!' />
</td>
</tr>
</table></form></div></div></div>");
print("<br />");
?>
<script type="text/javascript" src="js/jquery-1.8.2.js" ></script>
<script type="text/javascript" src="js/jquery-ui-1.9.0.custom.min.js" ></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>
<script type="text/javascript" src="js/password.js"></script>
<?php
site_footer();
?>