Hallo,
Ik heb een script zowat in me nieuwe lay-out werkend alleen nog 1 stukje niet.
Dat is de homepage die random resultaten weergeeft. Deze geeft alleen maar 1 resultaat weer i.p.v 90
Ik heb een script zowat in me nieuwe lay-out werkend alleen nog 1 stukje niet.
Dat is de homepage die random resultaten weergeeft. Deze geeft alleen maar 1 resultaat weer i.p.v 90
function printLijstRandom(){
$sql = "select titel, omschrijving from foppen ORDER BY RAND() LIMIT 10";
$resultaat=mysql_query($sql);
if (!$resultaat)
{ //print("product could not be added to the basket");
echo "<p>" . mysql_errno() . ": " . mysql_error() . "
" . $sql . "</p>";
}
while ($selectie=mysql_fetch_array($resultaat))
{
$titel = $selectie[titel];
$omschrijving = $selectie[omschrijving];
echo "$titel - $omschrijving<br>";
}
}
function printIndex(){
$berOnline = VraagInstellingOp(berOnline);
$l = 0;
$wi = 1;
//echo "<!-- print index $berOnline -->";
$w = "where bestelcode not in (";
for ($i=0; $i < $berOnline; $i++){
$j = $i+1;
$v = VraagInstellingOp(ber.$j);
if ($v == ){
$l = $i;
//echo "l: $l <br>";
break;
}else{
$pre[$i] = GetFop($v);
if($wi == 1){
$w .= "".$pre[$i][0]."";
$wi = 2;
}else{
$w .= ",".$pre[$i][0]."";
}
//echo "=>".$b[$i][0]." - ".$b[$i][1]." - ".$b[$i][2]." - ".$b[$i][3]."<br>";
}
}
$w .= ")";
shuffle($pre);
$b = $pre;
//Zijn er nog ontbrekende die opgevuld moeten worden??
if ($l > 0){
$sql = "select bestelcode from foppen $w ORDER BY RAND() LIMIT " . ($berOnline - $l);
//echo "<!-- $sql -->";
$resultaat=mysql_query($sql);
if (!$resultaat)
{ //print("product could not be added to the basket");
echo "<p>" . mysql_errno() . ": " . mysql_error() . "
" . $sql . "</p>";
}
while ($selectie=mysql_fetch_array($resultaat))
{
$b[$l] = GetFop($selectie[bestelcode]);
$l++;
}
}
/*
* Vanaf 14 andere background image
Auto in brand => 3 woorden
1/ controle titel langer dan 15
2/ indien langer,
*/
for ($i=0; $i < $berOnline; $i++){
$css = css(VerkortTekst($b[$i][1]));
if ($tr == 0) {
$linksinhoud1 .= "<div class=cSmal>
<h4><a href=subpagina.php?id=".$b[$i][0].">".VerkortTekst($b[$i][1])."</a></h4>
<p>".$b[$i][2]."</p>
<a href=subpagina.php?id=".$b[$i][0]." class=belnu>BEL NU!</a>
<span class=code>Code: ".$b[$i][0]."</span>
</div>
<div class=cSmalFtr></div>";
$b=1;
$tr = 1;
}
else {
$rechtsinhoud1 .= "<div class=cSmal>
<h4><a href=subpagina.php?id=".$b[$i][0].">".VerkortTekst($b[$i][1])."</a></h4>
<p>".$b[$i][2]."</p>
<a href=subpagina.php?id=".$b[$i][0]." class=belnu>BEL NU!</a>
<span class=code>Code: ".$b[$i][0]."</span>
</div>
<div class=cSmalFtr></div>";
$tr = 0;
}
$i++;
}
echo <div class="links">
.$linksinhoud1.
</div>
<div class="rechts">
.$rechtsinhoud1.
</div>;
}