Jeg kan ikke afprøve scriptet, da jeg ikke har databasen osv. men prøv denne her kode. Der har jeg sat den kode ind, som indsætter billedet:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta name="generator" content="Namo WebEditor v5.0(Trial)">
</head>
<body>
<table border="1" width="391" bordercolor="white" bordercolordark="white" bordercolorlight="white">
<tr>
<td width="377" bordercolor="white" bordercolordark="white" bordercolorlight="white"><?php
include('inc.config.php');
$query = mysql_query("SELECT *,DATE_FORMAT(date,'%e/%c-%y %T') AS date FROM news WHERE id=".$_GET['id']."");
$row = mysql_fetch_assoc($query);
echo '<h1>'.$row['title'].'</h1>';
echo empty($row['image']) ? '' : '<img src="files/'.$row['image" class="image">';
echo '<p><b>'.$row['synopsis'].'</b></p>';
echo '<p>'.$row['author'].' - '.$row['date'].'</p>';
echo nl2br($row['text']);
echo '<div class="hr"></div>';
$query = mysql_query("SELECT *,DATE_FORMAT(date,'%e/%c-%y %T') AS date FROM comments WHERE parent=".$_GET['id']." ORDER BY id ASC");
if (mysql_num_rows($query) > 0) {
echo '<h2>Kommentarer</h2>';
while ($row = mysql_fetch_assoc($query)) {
echo empty($row['email']) ? htmlspecialchars($row['name']) : '<a href="mailto:'.$row['email'].'">'.htmlspecialchars($row['name']).'</a>';
echo ' ('.$row['date'].')<br><br>';
echo nl2br(htmlspecialchars($row['text']));
echo '<div class="hr"></div>';
}
}
?>
<h2>Kommenter Artikel</h2>
<form method="post" action="form.handle.php">
<input type="hidden" name="referer" value="comment">
<input type="hidden" name="parent" value="<?php echo $_GET['id']; ?>">
Navn: <input type="text" name="name" style="width: 120px">
Email: <input type="text" name="email" style="width: 120px"><br>
<textarea name="text" rows="7" cols="0" style="width: 328px"></textarea><br><br>
<input type="submit" value="Send">
</form>
<hr>
<p> | <a href="index.php">Nyeste</a> | <a href="news.search.php">Søg efter artikel</a> |</p>
</td>
</tr>
</table>
<p> </p>
</body>
</html>
<SCRIPT language=JavaScript1.2>
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit
http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</SCRIPT>
<script language="javascript">
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>