<?php require_once('../Connections/galleri.php'); ?>
<?php
mysql_select_db($database_galleri, $galleri);
$query_rsBilleder = "SELECT * FROM billeder ORDER BY billedeid DESC";
$rsBilleder = mysql_query($query_rsBilleder, $galleri) or die(mysql_error());
$row_rsBilleder = mysql_fetch_assoc($rsBilleder);
$totalRows_rsBilleder = mysql_num_rows($rsBilleder);
?><?php require_once('../Connections/galleri.php');
mysql_select_db($database_galleri, $galleri);
?>
<?php
if (isset($_FILES['filnavn'])) {
$query = "INSERT INTO billeder SET billedenavn='".$_FILES['filnavn']['name']."'";
$Result1=mysql_query($query, $galleri) or die(mysql_error());
}
if (isset($_FILES['filnavn'])){
$tempfile = $_FILES['filnavn']['tmp_name'];
$destination = "../billeder/{$_FILES['filnavn']['name']} ";
copy($tempfile, $destination);
header('Location: assetmaneger.php');
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Assetmaneger</title>
</head>
<body bgcolor="#EEEEEE" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
<form action="" method="post" enctype="multipart/form-data" name="upload" id="upload">
<span style="font-family: arial, verdana, helvetica; font-size: 11px; font-weight: bold;">Hent billede :</span>
<table width="380" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
<tr>
<td style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;"><input name="filnavn" type="file" id="filnavn" /> <input name="submit" type="submit" id="submit" style="font-size: 12px" value="Upload" /></td>
</tr>
</table>
<span style="font-family: arial, verdana, helvetica; font-size: 11px; font-weight: bold;">Galleri:</span>
<?php do { ?>
<table width="380" border="0" cellpadding="0" cellspacing="0" style="background-color: #F7F7F7; border: 2px solid #FFFFFF; padding: 5px;">
<tr style="padding-bottom: 2px; padding-top: 0px; font-family: arial, verdana, helvetica; font-size: 11px;">
<td width="30%" align="center"><?php echo '<img height="80" width="80" src="../billeder/'.$row_rsBilleder['billedenavn'].'">'; ?></td>
<td width="30%" align="center"><?php echo $row_rsBilleder['billedenavn']; ?></td>
<td width="20%" align="center"><a href="#" onClick="window.opener.location.reload();self.close()">Indsæt billede</a></td>
<td width="20%" align="center"><a href="delete_image.php?sletbilledeid=<?php echo $row_rsBilleder['billedeid']; ?>" onClick="java script: return confirm('Er du sikker på at du vil slette dette billede?');">Slet</a></td>
</tr>
</table>
<?php } while ($row_rsBilleder = mysql_fetch_assoc($rsBilleder)); ?></form>
</body>
</html>
<?php
mysql_free_result($rsBilleder);
?>