25 |
. " AND element_id = " |
. " AND element_id = " |
26 |
. $element_id; |
. $element_id; |
27 |
|
|
28 |
$rs = mysql_query($sql, $con); |
$rs = mysql_tryquery($sql); |
29 |
$row = mysql_fetch_array($rs); |
$row = mysql_fetch_array($rs, MYSQL_ASSOC); |
30 |
|
|
31 |
// Resource |
// Resource |
32 |
$resource_id = $row["resource_id"]; |
$resource_id = $row["resource_id"]; |
100 |
. ", now(), '" |
. ", now(), '" |
101 |
. $user_ip |
. $user_ip |
102 |
. "')"; |
. "')"; |
103 |
|
mysql_tryquery($sql); |
|
if (!mysql_query($sql, $con)){ |
|
|
sql_err($con); |
|
|
mysql_query ("UNLOCK TABLES", $con); |
|
|
bailout(); |
|
|
} // bad write |
|
|
else { |
|
|
mysql_query("UNLOCK TABLES", $con); |
|
|
|
|
|
} // good write to the stats table |
|
|
|
|
104 |
|
|
105 |
// Redirect the user |
// Redirect the user |
106 |
header("Location: " . $redirect_url); |
header("Location: " . $redirect_url); |
108 |
|
|
109 |
else printf("Resource not found..."); |
else printf("Resource not found..."); |
110 |
|
|
111 |
?> |
?> |