|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: |
<?php
$db_host = "";
$db_name = "";
$db_user = "";
$db_word = "";
$offerid = $_COOKIE["offerid"];
$userid = $_COOKIE["userid_for_tracking"];
$img = imagecreatefromgif('trans.gif');
$ref = getenv("HTTP_REFERER");
//if ($ref == "" || $ref =="null")
//{
// die();
//}
if (!$db_connection = mysql_connect("$db_host", "$db_user", "$db_word")) {
header('Content-Type: image/gif');
imagegif($img);
exit;
}
if (!$db_sel = mysql_select_db($db_name, $db_connection)) {
header('Content-Type: image/gif');
imagegif($img);
exit;
}
date_default_timezone_set('CST');
// Begin status update code
$query = "SELECT status FROM ptsu_log WHERE username='$userid' and ptsu_id='$offerid' LIMIT 1";
if (!($result=mysql_query($query))) {
header('Content-Type: image/gif');
imagegif($img);
exit;
}
if (!($row=mysql_fetch_assoc($result))) {
header('Content-Type: image/gif');
imagegif($img);
exit;
}
$status=$row['status'];
$updatestatus = mysql_query("UPDATE ptsu_log SET status = 1 WHERE username='$userid' and ptsu_id='$offerid' LIMIT 1");
if ($status == 1) {
header('Content-Type: image/gif');
imagegif($img);
die();
}
if ($status == 0) {
$updatestatus;
$ip = $_SERVER['REMOTE_ADDR'];
$result = mysql_query("SELECT pamount FROM ptsuads WHERE id='$cookieid'");
$a_add_amt = mysql_fetch_array($result);
$add_amt = $a_add_amt['pamount'];
$sql = mysql_query("INSERT INTO `cookies` ('userid',`ip`,`offerid`,`referral`) VALUES ('$userid','$ip','$offerid','$ref');");
$rql = mysql_query("update user set balance = balance + $add_amt where username = '$userid'");
$result = mysql_query($sql);
// First error here
if (mysql_errno())
echo "MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$sql\n<br>";
$result = mysql_query($rql);
// Second error here
if (mysql_errno())
echo "MySQL error ".mysql_errno().": ".mysql_error()."\n<br>When executing:<br>\n$rql\n<br>";
header('Content-Type: image/gif');
imagegif($img);
die();
}
// End status update code
?>
|
Advertisement
| Hall of Fame |