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_MENUPIC[] = stripslashes($recordset->Fields("STR_PIC")); $STR_MENUBG[] = stripslashes($recordset->Fields("STR_BG")); $STR_SOORT[] = stripslashes($recordset->Fields("STR_SOORT")); $STR_MAPTXT[] = stripslashes($recordset->Fields("STR_MAPTXT")); $recordset->MoveNext(); } } $aantalmenuitems=count($PKY_MENUOID); 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(); } } $PICOID = $PKY_PICOID[$p]; $strSQL3 = "SELECT * FROM subitems WHERE FKY_PICOID='$PICOID' ORDER BY INT_SUBVOLGORDE"; //echo "PKY_PICOID[p]: ".$PKY_PICOID[$p]; $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); //echo "aantalsubpics: ".$aantalsubpics; ////// //echo "aantalsubitems voor dit submenu: ".$aantalsubitems; $conn->Close(); function strstrb($h,$n){ return array_shift(explode($n,$h,2)); } if (isset($p)){ $titel = preg_replace("/
/", " /", $STR_PICTXT[$p], 1); //$titel = preg_replace("/
/", " /", $SUBTXT, 1); $titel = strstrb($titel,'
'); } else { for($i = 0; $i < $aantalmenuitems; $i++) { if ($m == $PKY_MENUOID[$i]) { $titel = $STR_MENUNAAM[$i]; $PIC = $STR_MENUPIC[$i]; } } } $navtxt = ""; for($i = 0; $i < $aantalmenuitems; $i++) { if ($m == $PKY_MENUOID[$i]) { $BG = $STR_MENUBG[$i]; $navtxt .= "
  • ".$STR_MENUNAAM[$i]."
  • "; $SOORT = $STR_SOORT[$i]; $TEKST = $STR_MAPTXT[$i]; // returns omzetten: $TEKST=str_replace("\n\n","

    ",$TEKST); $TEKST=str_replace("\n","
    ",$TEKST); // } else { $navtxt .= "

  • ".$STR_MENUNAAM[$i]."
  • "; } } ?> <? echo $sitenaam." - ".$titel; ?>
    0) { for($i = 0; $i < $aantalplaatjes; $i++) { $thumb_size = getimagesize("pix/tn_".$STR_PIC[$i]); echo "
    ".$sitenaam." / ".$STR_PICTXT[$i]."

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

    "; // echo "

    ".$STR_PICTXT[$i]."

    "; } } ?>
    "; // //echo "subtext: ".$SUBTXT; if (isset($s)) { //echo "wel s:
    "; $pic_size = getimagesize("pix/".$PICOID."/".$SUBPIC[$s]); echo " "; echo "
    "; echo "

    "; if ($SUBTXT != "") { echo $SUBTXT."
    "; } //echo "".($this_s+1)." van ".$aantalsubpics." > > >

    "; if ($bestel == 1) { echo "bestel dit boek

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

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

    "; if ($SUBTXT != "") { echo $SUBTXT."
    "; } //echo " > 1 van ".$aantalsubpics."

    "; if ($bestel == 1) { echo "bestel dit boek

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

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

    ".$STR_PICTXT[$p]; echo "
    "; } } else { if ($PIC != ""){ // echo "STR_MENUPIC: ".$PIC."
    "; echo "

    "; } echo "
    "; echo $TEKST; echo "
    "; } // echo "m: ".$m."
    "; // echo "p: ".$p."
    "; ?>