diff options
Diffstat (limited to 'includes')
-rwxr-xr-x | includes/comments.php | 13 | ||||
-rwxr-xr-x | includes/footer.php | 65 |
2 files changed, 33 insertions, 45 deletions
diff --git a/includes/comments.php b/includes/comments.php index d405279..f1b8228 100755 --- a/includes/comments.php +++ b/includes/comments.php | |||
@@ -43,16 +43,17 @@ $getcomments2 = mysql_query($getcomments) or die($getcomments); | |||
43 | $i=0; | 43 | $i=0; |
44 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | 44 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) |
45 | { | 45 | { |
46 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 46 | if ($getcomments3[$i]['is_anon'] == 0) |
47 | $getuser2 = mysql_query($getuser); | ||
48 | $getuser3 = mysql_fetch_array($getuser2); | ||
49 | |||
50 | if ($getuser3['username'] == $getcomments3[$i]['username']) | ||
51 | { | 47 | { |
48 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | ||
49 | $getuser2 = mysql_query($getuser); | ||
50 | $getuser3 = mysql_fetch_array($getuser2); | ||
51 | |||
52 | $username = $getuser3['username']; | 52 | $username = $getuser3['username']; |
53 | $email = $getuser3['user_email']; | 53 | $email = $getuser3['user_email']; |
54 | $website = $getuser3['user_website']; | 54 | $website = $getuser3['user_website']; |
55 | } else { | 55 | } else if ($getcomments3[$i]['is_anon'] == 1) |
56 | { | ||
56 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 57 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
57 | $getanon2 = mysql_query($getanon); | 58 | $getanon2 = mysql_query($getanon); |
58 | $getanon3 = mysql_fetch_array($getanon2); | 59 | $getanon3 = mysql_fetch_array($getanon2); |
diff --git a/includes/footer.php b/includes/footer.php index 0a93ae9..77d161b 100755 --- a/includes/footer.php +++ b/includes/footer.php | |||
@@ -93,26 +93,26 @@ if (!isset($noRightbar)) | |||
93 | $i=0; | 93 | $i=0; |
94 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | 94 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) |
95 | { | 95 | { |
96 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 96 | if ($getcomments3[$i]['is_anon'] == 0) |
97 | $getuser2 = mysql_query($getuser); | 97 | { |
98 | $getuser3 = mysql_fetch_array($getuser2); | 98 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
99 | 99 | $getuser2 = mysql_query($getuser); | |
100 | if ($getuser3['username'] == $getcomments3[$i]['username']) | 100 | $getuser3 = mysql_fetch_array($getuser2); |
101 | { | 101 | |
102 | $username = $getuser3['username']; | 102 | $username = $getuser3['username']; |
103 | $website = $getuser3['user_website']; | 103 | $website = $getuser3['user_website']; |
104 | } else { | 104 | } else if ($getcomments3[$i]['is_anon'] == 1) |
105 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 105 | { |
106 | $getanon2 = mysql_query($getanon); | 106 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
107 | $getanon3 = mysql_fetch_array($getanon2); | 107 | $getanon2 = mysql_query($getanon); |
108 | 108 | $getanon3 = mysql_fetch_array($getanon2); | |
109 | if ($getanon3['username'] == $getcomments3[$i]['username']) | 109 | |
110 | { | 110 | if ($getanon3['username'] == $getcomments3[$i]['username']) |
111 | $username = $getanon3['username'] . ' (Guest)'; | 111 | { |
112 | $website = $getanon3['website']; | 112 | $username = $getanon3['username'] . ' (Guest)'; |
113 | } | 113 | $website = $getanon3['website']; |
114 | } | 114 | } |
115 | 115 | } | |
116 | 116 | ||
117 | if (strpos($getcomments3[$i]['page_id'], 'updates') !== FALSE) | 117 | if (strpos($getcomments3[$i]['page_id'], 'updates') !== FALSE) |
118 | { | 118 | { |
@@ -142,7 +142,7 @@ if (!isset($noRightbar)) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | $users = array(); | 144 | $users = array(); |
145 | $getusers = "SELECT DISTINCT username FROM comments"; | 145 | $getusers = "SELECT DISTINCT username FROM comments WHERE is_anon = 0"; |
146 | $getusers2 = mysql_query($getusers); | 146 | $getusers2 = mysql_query($getusers); |
147 | $i=0; | 147 | $i=0; |
148 | while ($getusers3[$i] = mysql_fetch_array($getusers2)) | 148 | while ($getusers3[$i] = mysql_fetch_array($getusers2)) |
@@ -151,25 +151,12 @@ if (!isset($noRightbar)) | |||
151 | $getcount2 = mysql_query($getcount); | 151 | $getcount2 = mysql_query($getcount); |
152 | $getcount3 = mysql_fetch_array($getcount2); | 152 | $getcount3 = mysql_fetch_array($getcount2); |
153 | 153 | ||
154 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getusers3[$i]['username'] . "\""; | 154 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getusers3[$i]['username'] . "\""; |
155 | $getuser2 = mysql_query($getuser); | 155 | $getuser2 = mysql_query($getuser); |
156 | $getuser3 = mysql_fetch_array($getuser2); | 156 | $getuser3 = mysql_fetch_array($getuser2); |
157 | |||
158 | if ($getuser3['username'] == $getusers3[$i]['username']) | ||
159 | { | ||
160 | $username = $getuser3['username']; | ||
161 | $website = $getuser3['user_website']; | ||
162 | } else { | ||
163 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getusers3[$i]['username'] . "\""; | ||
164 | $getanon2 = mysql_query($getanon); | ||
165 | $getanon3 = mysql_fetch_array($getanon2); | ||
166 | 157 | ||
167 | if ($getanon3['username'] == $getusers3[$i]['username']) | 158 | $username = $getuser3['username']; |
168 | { | 159 | $website = $getuser3['user_website']; |
169 | $username = $getanon3['username'] . ' (Guest)'; | ||
170 | $website = $getanon3['website']; | ||
171 | } | ||
172 | } | ||
173 | 160 | ||
174 | $name = (($website != '') ? '<A HREF="' . $website . '">' . $username . '</A>' : $username); | 161 | $name = (($website != '') ? '<A HREF="' . $website . '">' . $username . '</A>' : $username); |
175 | $users[] = array('name' => $name, 'count' => $getcount3['COUNT(*)']); | 162 | $users[] = array('name' => $name, 'count' => $getcount3['COUNT(*)']); |