diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-12-07 17:27:58 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-12-07 17:27:58 -0500 |
commit | 07aae7e8f8b752e6b37b338783a6d6fef290ee10 (patch) | |
tree | 1072b9822f7e52e7d28e92979c4e88a3e261ec55 /includes/functions.php | |
parent | bb736bb631788574137742f60dfaa2a808573af8 (diff) | |
download | fourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.tar.gz fourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.tar.bz2 fourisland-07aae7e8f8b752e6b37b338783a6d6fef290ee10.zip |
Removed comment rating system
Diffstat (limited to 'includes/functions.php')
-rwxr-xr-x | includes/functions.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/includes/functions.php b/includes/functions.php index ee19391..c71e69f 100755 --- a/includes/functions.php +++ b/includes/functions.php | |||
@@ -215,30 +215,4 @@ function verifyUser($username, $password) | |||
215 | return (($_POST['username'] != '') && ($getuser3['username'] == $_POST['username'])); | 215 | return (($_POST['username'] != '') && ($getuser3['username'] == $_POST['username'])); |
216 | } | 216 | } |
217 | 217 | ||
218 | function updateCommentPop($id, $plus=1) | ||
219 | { | ||
220 | $gettrack = "SELECT * FROM tracking_comments WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; | ||
221 | $gettrack2 = mysql_query($gettrack); | ||
222 | $gettrack3 = mysql_fetch_array($gettrack2); | ||
223 | |||
224 | $trackArr = explode(',',$gettrack3['comment_id']); | ||
225 | |||
226 | if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($id,$trackArr) === FALSE)) | ||
227 | { | ||
228 | $setcomment = "UPDATE comments SET rating = rating+" . $plus . " WHERE id = " . $id; | ||
229 | $setcomment2 = mysql_query($setcomment); | ||
230 | |||
231 | if ($gettrack3['ip'] == $_SERVER['REMOTE_ADDR']) | ||
232 | { | ||
233 | $settrack = "UPDATE tracking SET rating = \"" . $gettrack3['comment_id'] . "," . $id . "\" WHERE id = " . $gettrack3['id']; | ||
234 | } else { | ||
235 | $settrack = "INSERT INTO tracking (ip,rating) VALUES (\"" . $_SERVER['REMOTE_ADDR'] . "\",\"" . $id . "\")"; | ||
236 | } | ||
237 | $settrack2 = mysql_query($settrack) or die($settrack); | ||
238 | return 1; | ||
239 | } else { | ||
240 | return 0; | ||
241 | } | ||
242 | } | ||
243 | |||
244 | ?> | 218 | ?> |