<?php
## 1 = Textlink
## 2 = Flash
##3 = IMG
// ALS DE FORM GESUBMIT IS DAN VOER JE CODE UIT
if($_POST['Submit']) {
// CHECK INGEVULDE VELDEN ANDERS FOUTMELDING
if(!$_POST['id']) {
echo "<script languge='javascript'> alert('Vul AUB ProgrammaID in!');</script>"; }
// begin van de script wat niet herhaald wordt
$begin = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<adFeed adFeedVersion=\"1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"adfeeds1.xsd\">
<program programId=\"".$_POST['id']."\">";
// dit stukje output de begin en geeft kleur!
## QUERY 1 TEXTLINKS!
// NU CHECKEN WE DE SOORT BANNER ANDERS FOUTMELDING 1ST TEXTLINKS
$query1 = mysql_query("SELECT * FROM text WHERE soort = '1'") or
die("Textlink query werkt niet");
$string = "\n<text geId=\"\" geDelete=\"no\">
<generalSettings>
<title><![CDATA[".$record1['title']."]]></title>
<productUrl><![CDATA[".$record1['producturl']."]]></productUrl>
<productDescription><![CDATA[".$record1['description']."]]></productDescription>
<categories>
<category>
<categoryId>".$record1['catid']."</categoryId>
</category>
</categories>
<segments>
<segment>
<segmentId>".$record1['segementid']."</segmentId>
</segment>
</segments>
<keywords>
<keyword><![CDATA[".$record1['title']."]]></keyword>
</keywords>
</generalSettings>
<textLink><![CDATA[".$record1['textlink']."]]></textLink>
</text>";
}
## QUERY 2 FLASH BANNERS
// DE 2DE FLASH
$query2 = mysql_query("SELECT * FROM text WHERE soort = '2'") or
die("Flash query werkt niet");
// andere xml feed! VAN FLASH!!
$string1 = "\n<flash geId=\" geDelete=\"no\">
<generalSettings>
<title><![CDATA[".$record2['title']."]]></title>
<productUrl><![CDATA[".$record2['producturl']."]]></productUrl>
<productDescription><![CDATA[".$record2['description']."]]></productDescription>
<categories>
<category>
<categoryId>".$record2['catid']."</categoryId>
</category>
</categories>
<segments>
<segment>
<segmentId>".$record2['segementid']."</segmentId>
</segment>
</segments>
</generalSettings>
<flashVersion>".$record2['flashversion']."</flashVersion>
<flashWidth>".$record2['width']."</flashWidth>
<flashHeight>".$record2['height']."</flashHeight>
<flashUrl>".$record2['flashurl']."</flashUrl>
<flashBackupUrl>".$record2['flashbackup']."</flashBackupUrl>
<flashWindowMode>Window</flashWindowMode>
<flashSupportsPopunder>yes</flashSupportsPopunder>
<flashSupportsPopup>yes</flashSupportsPopup>
<flashSupportsIframe>yes</flashSupportsIframe>
<flashSupportsJavascript>yes</flashSupportsJavascript>
<flashDynamic>no</flashDynamic>
</flash>";
}
## QUERY 3 IMAGE BANNERS
// NU CHECKEN WE DE SOORT BANNER ANDERS FOUTMELDING
$query3 = mysql_query("SELECT * FROM text WHERE soort = '3'") or
die("IMG query werkt niet");
// VERVOLGENS DE XML FEED VAN IMG
$string2 = "\n<image geId=\"\" geDelete=\"no\">
<generalSettings>
<title><![CDATA[".$record3['title']."]]></title>
<productUrl><![CDATA[".$record3['producturl']."]]></productUrl>
<productDescription><![CDATA[".$record3['description']."]]></productDescription>
<categories>
<category>
<categoryId>".$record3['catid']."</categoryId>
</category>
</categories>
<segments>
<segment>
<segmentId>".$record3['segementid']."</segmentId>
</segment>
</segments>
<keywords>
<keyword><![CDATA[".$record3['title']."]]></keyword>
</keywords>
</generalSettings>
<imageWidth>".$record3['width']."</imageWidth>
<imageHeight>".$record3['height']."</imageHeight>
<imageUrl>".$record3['imageurl']."</imageUrl>
<imageSupportsPopunder>yes</imageSupportsPopunder>
<imageSupportsPopup>yes</imageSupportsPopup>
<imageSupportsIframe>yes</imageSupportsIframe>
<imageSupportsJavascript>yes</imageSupportsJavascript>
</image>";
}
}
// end script
?>