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
|
<?php /* $Id: misc.php,v 1.1.1.1 2002/10/28 19:13:47 pbaecher Exp $ */ /* ThWboard - PHP/MySQL Bulletin Board System ============================================== (c) 2000, 2001 by Paul Baecher <paul@thewall.de> Felix Gonschorek <funner@thewall.de>
download the latest version: http://www.thwboard.de
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
==============================================
*/
include './inc/header.inc.php';
if( $action == 'unsubscribe' ) { if( $g_user['userid'] == 0 ) { message('Fehler', 'Bitte loggen Sie sich erst ein!'); } else { if( !$thread['threadid'] ) { message('Fehler', 'Ungültiger Thread!'); } else { thwb_query("UPDATE ".$pref."post SET postemailnotify=0 WHERE threadid='$thread[threadid]' AND userid='$g_user[userid]'"); message('Hinweis', 'Ihre Abbestellung wurde erfolgreich durchgeführt!'); } } } elseif( $action == 'getemail' ) { if( !$g_user['userisadmin'] ) { message('Fehler', 'Sie haben keine Berechtigung diese Seite einzusehen.'); } else { $r_user = thwb_query("SELECT useremail FROM ".$pref."user WHERE userid='".intval($userid)."'"); $user = mysql_fetch_array($r_user); message('Info', 'Die Email-Adresse dieses Benutzers ist: ' . $user['useremail']); } }
elseif( $action == 'getpostcount' ) { if( !$g_user['userisadmin'] ) { message('Fehler', 'Sie haben keine Berechtigung diese Seite einzusehen.'); } else { $r_user = thwb_query("SELECT userposts FROM ".$pref."user WHERE userid='".addslashes($userid)."'"); $user = mysql_fetch_array($r_user); message('Info', 'Dieser Benutzer hat ' . $user['userposts'] . ' Posts.'); } }
elseif( $action == 'getlastpost' ) { $r_post = thwb_query("SELECT threadid, postid FROM $pref"."post WHERE userid='$userid' ORDER BY posttime DESC LIMIT 1"); if( mysql_num_rows($r_post) > 0 ) { $post = mysql_fetch_array($r_post); $postid = $post['postid']; $threadid= $post['threadid'];
/* which page? */ $postnum = 0; $r_post = thwb_query("SELECT postid FROM $pref"."post WHERE threadid='$post[threadid]' ORDER BY posttime ASC"); while( $post = mysql_fetch_array($r_post) ) { $postnum++; if( $post['postid'] == $postid ) break; }
$pagenum = ceil($postnum / $config['vars_m_amount']); header('Location: showtopic.php?threadid='.$threadid.'&pagenum='.$pagenum.'#'.$postid); } else { message('Fehler', 'Dieser Benutzer hat noch keinen Beitrag verfasst.'); } }
elseif( $action == 'clearboards' ) { thwb_query("UPDATE $pref"."lastvisited SET lastvisitedtime='".time()."' WHERE userid='$g_user[userid]'"); header('Location: index.php'); } ?>
|