diff options
Diffstat (limited to 'includes/comments.php')
-rwxr-xr-x | includes/comments.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/comments.php b/includes/comments.php index 15e9fc8..d405279 100755 --- a/includes/comments.php +++ b/includes/comments.php | |||
@@ -30,7 +30,7 @@ $curID = 0; | |||
30 | 30 | ||
31 | $template = new FITemplate('comments'); | 31 | $template = new FITemplate('comments'); |
32 | $template->add('PAGEID',$page_id); | 32 | $template->add('PAGEID',$page_id); |
33 | $template->add('USERNAME',(isLoggedIn() ? sess_get('uname') : 'Anonymous')); | 33 | $template->add('USERNAME',(isLoggedIn() ? getSessionUsername() : 'Anonymous')); |
34 | 34 | ||
35 | if (!isLoggedIn()) | 35 | if (!isLoggedIn()) |
36 | { | 36 | { |
@@ -43,7 +43,7 @@ $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 users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 46 | $getuser = "SELECT * FROM phpbb_users WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
47 | $getuser2 = mysql_query($getuser); | 47 | $getuser2 = mysql_query($getuser); |
48 | $getuser3 = mysql_fetch_array($getuser2); | 48 | $getuser3 = mysql_fetch_array($getuser2); |
49 | 49 | ||
@@ -51,7 +51,7 @@ while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | |||
51 | { | 51 | { |
52 | $username = $getuser3['username']; | 52 | $username = $getuser3['username']; |
53 | $email = $getuser3['user_email']; | 53 | $email = $getuser3['user_email']; |
54 | $website = $getuser3['website']; | 54 | $website = $getuser3['user_website']; |
55 | } else { | 55 | } else { |
56 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; | 56 | $getanon = "SELECT * FROM anon_commenters WHERE username = \"" . $getcomments3[$i]['username'] . "\""; |
57 | $getanon2 = mysql_query($getanon); | 57 | $getanon2 = mysql_query($getanon); |
@@ -68,7 +68,7 @@ while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | |||
68 | if (isset($username)) | 68 | if (isset($username)) |
69 | { | 69 | { |
70 | $template->add_ref($curID, 'COMMENTS', array( 'CODEDEMAIL' => md5(strtolower($email)), | 70 | $template->add_ref($curID, 'COMMENTS', array( 'CODEDEMAIL' => md5(strtolower($email)), |
71 | 'USERNAME' => (($website != '') ? '<A HREF="http://' . $website . '">' . $username . '</A>' : $username), | 71 | 'USERNAME' => (($website != '') ? '<A HREF="' . $website . '">' . $username . '</A>' : $username), |
72 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), | 72 | 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getcomments3[$i]['posttime'])), |
73 | 'ID' => $getcomments3[$i]['id'], | 73 | 'ID' => $getcomments3[$i]['id'], |
74 | 'TEXT' => parseText($getcomments3[$i]['comment']))); | 74 | 'TEXT' => parseText($getcomments3[$i]['comment']))); |