Til dem ger gider at læse det kommer her hele indholdet af de relevante sider:
index.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
$connection = mysql_connect("localhost","root","*****");
mysql_select_db("dropdeadnow", $connection);
?>
<html>
<head>
<title>DDN Productions</title>
<meta name="description" content="Short movies and video games.">
<meta name="keywords" content="games, movies, short, amateur, ddn, productions, production, drop, dead, now, denmark, danish">
<meta name="robots" content="noindex,nofollow">
<meta name="author" content="DDN productions">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<?php
$page_name = $_GET['page'];
$page_path = "";
$page_source = "ny_side.php";
$page_hits = 0;
$page_date = "";
$page_layout = "standard";
if($page_name) {
$query=mysql_query("SELECT path,source,hits,date,layout FROM pages WHERE name='$page_name'");
if(mysql_num_rows($query)>0) {
$r = mysql_fetch_array($query);
$page_path = $r['path'];
$page_source = $r['source'];
$page_hits = $r['hits']+1;
$page_date = $r['date'];
$page_layout = $r['layout'];
mysql_query("UPDATE pages SET hits=$page_hits WHERE name='$page_name' LIMIT 1");
} else echo "<div style=\\"border:1px solid #ff0000;color:#000000;background:#ffaaaa;\\">Siden blev ikke fundet - indlæser standard side.</div>";
}
?>
<?php include "c:/php/www/ddn/layout_before.php";
if($page_layout=="standard") include "c:/php/www/ddn/layout_leftpanel.php";
else include "c:/php/www/ddn/layout_wide_toppanel.php";
include "c:/php/www/ddn/".$page_source;
if($page_layout=="standard") include "c:/php/www/ddn/layout_rightpanel.php";
else include "c:/php/www/ddn/layout_wide_bottompanel.php";
if($page_layout=="standard") include "c:/php/www/ddn/layout_after.php";
else include "c:/php/www/ddn/layout_wide_after.php";
?>
</body>
</html>
layout_leftpanel.php
<table cellspacing="0" cellpadding="0" width="700px">
<tr>
<td width="200px" align="right">
<table cellspacing="0" cellpadding="0" >
<tr>
<td height="180px" style="background:url('img/navbg.gif');">
<img src="img/navbg_before.gif"><br>
<div style="position:relative;left:60px;top:-5px;">
<a href="/ddn?page=forside"><img border="0" src="img/menu_forside.gif" title="Forside"></a><br>
<a href="/ddn?page=film"><img border="0" src="img/menu_film.gif" title="Film"></a><br>
<a href="/ddn?page=spil"><img border="0" src="img/menu_spil.gif" title="Spil"></a><br>
<a href="/ddn?page=diverse"><img border="0" src="img/menu_diverse.gif" title="Diverse"></a><br>
<a href="/ddn?page=information"><img border="0" src="img/menu_information.gif" title="Information"></a><br>
<a href="/ddn?page=kontakt"><img border="0" src="img/menu_kontakt.gif" title="Kontakt DDN"></a><br>
</div>
</td>
</tr>
<tr>
<td>
<img src="img/navbg_after.gif"><br>
<p style="position:relative;left:37px;top:-20px;">
<a href="#"><img src="img/dropdeadshow.gif" border="0" width="140px" height="120px"></a><br>
<a href="#"><img src="img/games.gif" border="0" width="140px" height="120px"></a><br>
<a href="#"><img src="img/merchandise.gif" border="0" width="140px" height="120px"></a><br>
</p>
</td>
</tr>
</table>
</td>
<td width="400px" background="img/contentbg.png">
<img src="img/contentbg_before.png"><br>
<div style="text-align:justify;background:url('img/contentbg.png') repeat-y;padding:7px;">
sidst men ikke mindst, kontakt.php
<?php
if(isset($_POST["skriv_besked"])) {
$navn= nl2br(htmlentities($_POST["besked_navn"]));
$mail= nl2br(htmlentities($_POST["besked_mail"]));
$tekst= nl2br(htmlentities($_POST["besked_tekst"]));
$dato= date("j/n - Y");
//undgaa fusk
if(!get_magic_quotes_gpc()) {
$navn=addslashes($navn);
$mail=addslashes($mail);
$tekst=addslashes($tekst);
}
//mysql_query("INSERT INTO beskeder (navn,mail,tekst,dato,svaret) VALUES ('$navn','$mail','$tekst','$dato','0')");
echo "Tak for din besked.";
} else {
?>
<h3>Kontakt DDN Productions</h3>
<p>
Hvis du har noget at sige så kan du bruge denne formular til at sende en besked til en af os
som så læser den og svarer hurtigst muligt hvis svar ønskes og hvis du skriver en e-mail adresse.
</p>
<p>
<form action="/ddn?page=kontakt" method="post">
Navn:<br>
<input type="text" name="besked_navn" class="forms"><br>
E-mail:<br>
<input type="text" name="besked_mail" class="forms"><br>
Besked:<br>
<textarea name="besked_tekst" cols="40" rows="5" class="forms"></textarea><br>
<input type="submit" name="skriv_besked" value=" - oK - " class="button" style="background:#000000;color:#999999;border:1px solid #666666;"><br>
</form>
</p>
<?php
}
?>
Indlæg senest redigeret d. 29.09.2006 16:19 af Bruger #10608