////////////////////////////////////////////////////////////////////////////
// SIDOR I MAIN
////////////////////////////////////////////////////////////////////////////
if (isset($_GET['sidaID'])) {
//Hämta från databasen
$sql = "SELECT * FROM program WHERE id = ".intval($_GET['sidaID']);
$result = mysql_query($sql);
// Om databasen är tom eller om del ID söks visas:
if (mysql_num_rows($result) == 0) { include 'page/errorpage404.php'; }
while ($row = mysql_fetch_assoc($result)) {
if ($row['bild']) { echo '

'; }
if ($row['text'] == '')
{
echo '';
include "admin/startinfo/config.php"; echo "$title - ";
echo ''.$row['title'].'';
echo ' ! Sidan är under uppbyggnad';
} else {
echo '';
include "admin/startinfo/config.php"; echo "$title - ";
echo ''.$row['title'].' '.$row['title'].''.$row['text'].'';
}
}
} else {
if(!isset($_GET[sida])) {
echo " $pagetitle - Christian Hedlund";
include("page/start.php");
}
switch($_GET[sida]) {
// LÄGG TILL MANUELLT SIDOR HÄR:
case start :
include("page/start.php");
break;
case gastbok :
include 'page/gastbok.php';
break;
case nyheter :
include 'page/nyheter.php';
break;
case links :
include 'page/links.php';
break;
}
}
?>
|