// +----------------------------------------------------------------------+ // | INCLUDES | // +----------------------------------------------------------------------+ header('Content-Type: text/html; charset=utf-8'); set_include_path('../../' . PATH_SEPARATOR . get_include_path()); require_once('VWM/VWM.php'); $path = realpath(dirname(__FILE__) . '/../'); $configfile = '../../../vwm_config.xml'; $environment = VWM::getEnvironmentByHostAndPath($configfile, $path); $vwm = VWM::getInstance($configfile, null, $environment); require_once("vwm3/settings.php"); require_once('DJO/DJO_Destination.class.php'); dbase_ro(); settype($offset, "integer"); $bestemcode = sprintf("%04d", (int) $_REQUEST['bestemcode']); $DCODE = $_REQUEST['DCODE']; $offset = $_REQUEST['offset']; $autoplay = $_REQUEST['autoplay']; $destination = new DJO_Destination(); $destination->setid((int)$_REQUEST['bestemcode']); if ($destination->find(true)) { $dest_array = $destination->getContentArray(); $regiocode = $dest_array['region']['region_id']; $regionaam = $dest_array['region']['title']; $bestemnaam = $dest_array['title']; } $sql_query = " SELECT DNAAM,DDIR" . " FROM djo_diashows" . " WHERE DCODE='$DCODE'" . " LIMIT 1" ; $sql_result = mysql_query($sql_query); while ($sql_show = mysql_fetch_array($sql_result)) { $DNAAM = $sql_show[DNAAM]; $DDIR = $sql_show[DDIR]; } mysql_free_result($sql_result); $sql_query = " SELECT *" . " FROM djo_dias" . " WHERE DCODE='$DCODE'" . " AND ACT='1'" . " ORDER BY VNR" . " LIMIT $offset,1" ; $sql_result = mysql_query($sql_query); while ($sql_show = mysql_fetch_array($sql_result)) { $ID = $sql_show[ID]; $KFILE = $sql_show[KFILE]; $DFILE = $sql_show[DFILE]; $HEADER = $sql_show[HEADER]; $TITEL = $sql_show[TITEL]; $TEKST = nl2br($sql_show[TEKST]); $ACT = $sql_show[ACT]; } if (empty($DFILE)) { $DFILE = ""; } else if (preg_match("/.swf/i", $DFILE)) { $DFILE = ""; } else { $DFILE = ""; } mysql_free_result($sql_result); $sql_query = " SELECT count(*)" . " FROM djo_dias" . " WHERE DCODE='$DCODE'" . " AND ACT='1'" ; $sql_result = mysql_query($sql_query); list($dia_totaal) = mysql_fetch_row($sql_result); $next = $offset + 1; $next_count = $offset + 1; if ($next >= $dia_totaal) { $next = 0; } $previous = $offset - 1; if ($previous <= 0) { $previous = 0; } ?>