Error: fout bij ophalen gegevens adverteerder.

'); $row_advertiser = mysql_fetch_assoc($qry_advertiser); // gegevens (db) $advertiser_id = $row_advertiser['id']; $advertiser_name = htmlentities($row_advertiser['name'], ENT_COMPAT, 'ISO-8859-1'); $advertiser_description = htmlentities($row_advertiser['description'], ENT_COMPAT, 'ISO-8859-1'); $advertiser_status = $row_advertiser['status_id']; // query - gegevens goede doel $sql_charity = "SELECT * FROM `charity` WHERE `url_name` = '".mysql_real_escape_string($_GET['charity'])."' LIMIT 1"; $qry_charity = mysql_query($sql_charity); // OR DIE ('

Error: fout bij ophalen gegevens goede doel.

'); $row_charity = mysql_fetch_assoc($qry_charity); // gegevens (db) $charity_id = $row_charity['id']; $charity_name = htmlentities($row_charity['name'], ENT_COMPAT, 'ISO-8859-1'); $charity_description = htmlentities($row_charity['description'], ENT_COMPAT, 'ISO-8859-1'); $charity_status = $row_charity['status_id']; // check if(($advertiser_status == 1) && ($charity_status == 1)) { // head $title = 'Winkel bij ' . $advertiser_name . ' en steun ' . $charity_name; $meta = 'Online shoppen bij ' . $advertiser_name . ' en tegelijkertijd gratis doneren aan ' . $charity_name . '. Dat kan veilig, eenvoudig en snel via '.BRAND_NAME.'!'; include_once 'head.php'; // query - hoogste fixed fee $sql_fixed_fee = sql_fixed_fee($advertiser_id); $qry_fixed_fee = mysql_query($sql_fixed_fee); $row_fixed_fee = mysql_fetch_array($qry_fixed_fee); // gegevens (sys) $count_fixed_fee = mysql_num_rows($qry_fixed_fee); // gegevens (db) $advertiser_url = $row_fixed_fee['url']; $link_id = $row_fixed_fee['link_id']; $fee_fixed = $row_fixed_fee['fee_fixed']; // tonen //echo "

Query 1: ".$sql_fixed_fee."

\n"; //echo "

Fixed fee: ".$count_fixed_fee."

\n"; //echo "

Fee fixed: ".$fee_fixed."

\n"; echo "\n"; echo "\t\t\t\t" . '

We sturen je zo door naar '. $advertiser_name . '

' . "\n"; // check if($count_fixed_fee == 0) { // query - hoogste procentuele fee $sql_percentage_fee = sql_percentage_fee($advertiser_id); $qry_percentage_fee = mysql_query($sql_percentage_fee); $row_percentage_fee = mysql_fetch_array($qry_percentage_fee); // gegevens (sys) $count_percentage_fee = mysql_num_rows($qry_percentage_fee); // gegevens (db) $advertiser_url = $row_percentage_fee['url']; $link_id = $row_percentage_fee['link_id']; $fee_percentage = $row_percentage_fee['fee_percentage']; // tonen /* echo "

Query 2: ".$sql_percentage_fee."

\n"; echo "

Procentuele fee: ".$count_percentage_fee."

\n"; echo "

Fee percentage: ".$fee_percentage."

\n"; */ if($count_percentage_fee == 0) { // query - gewone url $sql_advertiser_url = "SELECT `url` FROM `advertiser` WHERE `id` = " . (int) $advertiser_id . " AND `URL` IS NOT NULL LIMIT 1"; $qry_advertiser_url = mysql_query($sql_advertiser_url); $row_advertiser_url = mysql_fetch_array($qry_advertiser_url); // gegevens (sys) $count_advertiser_url = mysql_num_rows($qry_advertiser_url); // check if($count_advertiser_url == 0) { echo '

Error: geen website gevonden!

' . "\n"; // kritieke fout! // to do: mailen en loggen } else { // gegevens (db) $advertiser_url = $row_advertiser_url['url']; } } } // Calculate the amount to be donated to the charity itself if($fee_fixed) { $amount = 'minimaal '. $amount .= '€' . number_format($fee_fixed / 2, 2, ',', ' '); $amount .= ' per aankoop'; } elseif($fee_percentage) { $amount = 'minimaal '; $amount .= '' . number_format($fee_percentage / 2, 2, ',', ' '); $amount .= '% van het aankoopbedrag'; } // display echo "\t\t\t\t" . '

Je gaat winkelen bij '.$advertiser_name.''; // check - only if there is no affiliate link in our database if($charity_name && $amount) { echo ' en steunt daarmee '.$charity_name.' met ' . $amount . '.

' . "\n"; } else { echo '.

' . "\n"; } // test/temp if($_SERVER['REMOTE_ADDR'] == '83.84.146.241') { echo '

Vul je e-mailadres in. Binnen een kwartier na aankoop laten we je weten wat het exacte donatiebedrag was.

'; echo '
' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '
' . "\n"; } echo "\t\t\t\t" . '
'."\n"; echo "\t\t\t\t\t" . '

We sturen je zo door naar '. $advertiser_name . '.

' . "\n"; echo "\t\t\t\t" . '
'."\n"; echo "\n"; echo "\t\t\t\t" . '

Over ' . $advertiser_name . '

' . "\n"; echo "\t\t\t\t" . '

' . $advertiser_description . '

' . "\n"; echo "\n"; echo "\t\t\t\t" . '

Over ' . $charity_name . '

' . "\n"; echo "\t\t\t\t" . '

' . $charity_description . '

' . "\n"; // Uncomment this to see the target URL in the console echo ""; // gegevens $a_id = $_SERVER['QUERY_STRING']; $a_id = $_GET['advertiser']; ?>