diff options
Diffstat (limited to 'includes/footer.php')
-rwxr-xr-x | includes/footer.php | 65 |
1 files changed, 26 insertions, 39 deletions
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(*)']); |