Connect($DBHost, $DBUser, $DBPass, $DBName)) {echo "connection failed";} $strSQL = "SELECT * FROM menuitems"; $strSQL .= " WHERE BLN_ACTIEF='1'"; $strSQL .= " ORDER BY INT_VOLGORDE"; $recordset =$conn->Execute($strSQL); if ($recordset == false) die("SELECT failed".$strSQL); if ($recordset->recordCount() > 0 ) { while (!$recordset->EOF) { $PKY_MENUOID[] = $recordset->Fields("PKY_MENUOID"); $STR_MENUNAAM[] = stripslashes($recordset->Fields("STR_MENUNAAM")); $STR_SOORT[] = stripslashes($recordset->Fields("STR_SOORT")); $STR_MAPTXT[] = stripslashes($recordset->Fields("STR_MAPTXT")); $recordset->MoveNext(); } } $aantalmenuitems=count($PKY_MENUOID); $m = (isset($_REQUEST["m"]) && $_REQUEST["m"]) ? $_REQUEST["m"] : $PKY_MENUOID[0]; // if (!isset($m) || $m == "") { // $m = $PKY_MENUOID[0]; // } $strSQL2 = "SELECT * FROM plaatjes"; $strSQL2 .= " WHERE FKY_MENUOID='$m'"; $strSQL2 .= " AND BLN_ACTIEF='1'"; $strSQL2 .= " ORDER BY INT_VOLGORDE"; $recordset =$conn->Execute($strSQL2); if ($recordset == false) die("SELECT failed".$strSQL2); if ($recordset->recordCount() > 0 ) { while (!$recordset->EOF) { $PKY_PICOID[] = $recordset->Fields("PKY_PICOID"); $STR_PIC[] = stripslashes($recordset->Fields("STR_PIC")); $STR_PICTXT[] = urldecode($recordset->Fields("STR_PICTXT")); $recordset->MoveNext(); } $aantalplaatjes = count($STR_PIC); } if (isset($PKY_PICOID)){ $PICOID = $PKY_PICOID[$p]; $strSQL3 = "SELECT * FROM subitems WHERE FKY_PICOID='$PICOID' ORDER BY INT_SUBVOLGORDE"; $recordset =$conn->Execute($strSQL3); if ($recordset == false) die("SELECT failed".$strSQL3); if ($recordset->recordCount() > 0 ) { while (!$recordset->EOF) { $PKY_SUBITEMOID[] = $recordset->Fields("PKY_SUBITEMOID"); $FKY_PICOID[] = $recordset->Fields("FKY_PICOID"); $STR_SUBPIC[] = $recordset->Fields("STR_SUBPIC"); $STR_SUBTXT[] = $recordset->Fields("STR_SUBTXT"); $STR_SSOORT[] = $recordset->Fields("STR_SSOORT"); $INT_SUBVOLGORDE[] = $recordset->Fields("INT_SUBVOLGORDE"); $recordset->MoveNext(); } } $aantalsubitems = count($PKY_SUBITEMOID); ////// for ($i=0;$i<$aantalsubitems;$i++){ if ($STR_SSOORT[$i] == "tekst"){ $SUBTXT = $STR_SUBTXT[$i]; } if ($STR_SSOORT[$i] == "plaatje"){ $SUBITEMOID[] = $PKY_SUBITEMOID[$i]; $SPICOID[] = $FKY_PICOID[$i]; $SUBPIC[] = $STR_SUBPIC[$i]; } } $aantalsubpics = count($SUBITEMOID); } $conn->Close(); function strstrb($h,$n){ return array_shift(explode($n,$h,2)); } if (isset($p) && isset($STR_PICTXT)){ $titel = preg_replace("/
/", " /", $STR_PICTXT[$p], 1); $titel = strstrb($titel,'
'); } else { for($i = 0; $i < $aantalmenuitems; $i++) { if ($m == $PKY_MENUOID[$i]) { $titel = $STR_MENUNAAM[$i]; } } } ?> rtbooks - <? echo $titel; ?>
rtbooks / ".$STR_PICTXT[$i]."

"; if ($p != "" && $p == $i){ echo "".$STR_PICTXT[$i].""; } else { echo $STR_PICTXT[$i]; } echo "

"; } } ?>
"; echo ""; } else { $this_s = ($s+1); echo "&s=".$this_s."'/>"; } echo "rtbooks - ".$titel."/".$s.""; echo "
"; echo "
"; echo "

"; if (isset($SUBTXT)){ echo $SUBTXT."ff
"; } if ((isset($bestel)) && $bestel == 1) { echo "bestel dit boek

"; } if ($aantalsubpics > 0) { if ($s == $aantalsubpics-1){ echo " < < < "; } else { echo " meer pagina's > > >"; } } echo "

"; } else { $pic_size = getimagesize("pix/".$STR_PIC[$p]); echo "
"; if ($aantalsubpics > 0) { echo "rtbooks - ".$titel.""; } else { echo "rtbooks - ".$titel.""; } echo "
"; echo "

"; if ($SUBTXT != "") { echo $SUBTXT."
"; } if ($bestel == 1) { echo "bestel dit boek

"; } if ($aantalsubpics > 0) { if ($s == $aantalsubpics){ echo "<<"; } else { echo " meer pagina's > > >"; } } echo "

"; } } else { echo "
"; echo "";} else { echo ($p+1)."'/>";} echo "

".$STR_PICTXT[$p]; echo "
"; } } else { //echo "geen p: ".$p." maar tekst:
"; echo $TEKST; } ?>