Zoek:
Code: Selecteer alles
$pag = isset ( $_GET['pag'] ) : addslashes ( $_GET['pag'] ) : "home";
Code: Selecteer alles
$pag = isset ( $_GET['pag'] ) ? addslashes ( $_GET['pag'] ) : "home";
En header.php en footer.php moeten wel bestaan
Code: Selecteer alles
$pag = isset ( $_GET['pag'] ) : addslashes ( $_GET['pag'] ) : "home";
Code: Selecteer alles
$pag = isset ( $_GET['pag'] ) ? addslashes ( $_GET['pag'] ) : "home";
Code: Selecteer alles
function add($path,$file,$nood,$text)
{
if (!file_exists($file))
{
// check from mainmap
$include = $path.$file;
error("Bestand bestaat niet! $include<br/>$text","1");
}
else
{
echo "<i>".$path.$file."</i><br>";
include($path.$file);
}
}
Code: Selecteer alles
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// basic startup
include "./start.php";
$path = "";
// file adding
add($path,"classes/template.class.php","1","bewerk bestand ontbreekt");//<-- deze werkt
add($path,"classes/engine.class.php","1","engine bestand ontbreekt");//<-- deze werkt
add($path,"classes/talen.class.php","0","taal bestand ontbreekt");//<-- deze werkt niet :-(
//include "classes/talen.class.php"; //<-- deze werkt
// knip knip code ;)
?>
$input == count($sites);
count()
telt 10 vars in de array, geen 9.$sites[10]
bestaat dus niet.Location: http://www.google.be
Location:
Location: http://www.janmarques.net
$sites = array(......);
eens:
Code: Selecteer alles
if ($input == count($sites) {
die("Oops!");
}
Code: Selecteer alles
if ($input == count($sites) - 1 {
die("Oops!");
}
Code: Selecteer alles
$random = $sites[array_rand(array_diff($sites, array($sites[$input], $sites["0"])))];
Code: Selecteer alles
$random = $sites[rand(0, sizeof($sites) - 1)];
Code: Selecteer alles
// Previous link
if ($input == "1")
{
$previous = array_pop($sites);
}
else
{
$number = $input - 1;
$previous = $sites[$number];
}
// Next link
if ($input == count($sites))
{
$next = $sites["1"];
}
else
{
$number = $input + 1;
$next = $sites[$number];
}
Code: Selecteer alles
// Previous link
$prev = $input - 1;
$next = $input + 1;
if (!isset($sites[$prev]))
{
$prev = 1;
}
$previous = $sites[$prev];
if (!isset($sites[$next]))
{
$next = sizeof($sites) - 1;
}
$next = $sites[$next];
}