$value) {
$computer[$key] = mysql_real_escape_string(htmlentities($value));
if(strlen($value) > 0) {
$query = mysql_query("SELECT * FROM computers WHERE $key='$value' LIMIT 1");
$count = mysql_num_rows($query);
if ($count != 1) {
if ($key != "line" && $value != "none") {
$computer[$key] = ""; //unset computer var that doesnt exist
}
}
}
}
//check to make sure tracking variables exist
foreach($tracking as $key=>$value) {
$tracking[$key] = mysql_real_escape_string(htmlentities($value));
if(strlen($value) > 0) {
$query = mysql_query("SELECT * FROM tracker WHERE $key='$value' LIMIT 1");
$count = mysql_num_rows($query);
if ($count != 1) {
$tracking[$key] = ""; //unset tracking var that doesnt exist
}
}
}
foreach($tracking1 as $key=>$value) {
$tracking1[$key] = mysql_real_escape_string(htmlentities($value));
if(strlen($value) > 0) {
$query = mysql_query("SELECT * FROM tracker1 WHERE $key='$value' LIMIT 1");
$count = mysql_num_rows($query);
if ($count != 1) {
$tracking1[$key] = ""; //unset tracking var that doesnt exist
}
}
}
if ($os != "Search Bot") {
$insert = "INSERT INTO log (mfr,line,model,os,ip,date,productid,eng,lan,src,kw,mat,ad) VALUES ('$computer[mfr]','$computer[line]','$computer[model]','$os','$ip','$date','$pid','$tracking[eng]','$tracking[lan]','$tracking[src]','$tracking1[kw]','$tracking1[mat]','$tracking1[ad]')";
$query = mysql_query($insert) or die(mysql_error());
}
//debugging variables:
//print_r($computer);
//echo '
';
//print_r($tracking);
$tvar .= 'dd';
foreach($tracking as $var) {
$tvar .= $var; //create the tracking variable (ex:ddenggsh)
}
$select = mysql_query("SELECT id FROM log WHERE date='$date' AND ip='$ip'");
$log_id = mysql_fetch_array($select);
$log_id = $log_id['id'];
echo '
Grazie per aver scaricato DriverDoc!
CLICCA QUI se utilizzi Firefox