diff options
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 | ?> |
