okey her kommer de så...
--Action.php--
<?php
ob_start();
Echo"<head>";
Echo"<style type='text/css'>";
Echo"a:link {";
Echo" color: black;";
Echo" font-weight: bolder;";
Echo" text-decoration: none;";
Echo"}";
Echo"a:visited {";
Echo" color: black;";
Echo" text-decoration:none;";
Echo" font-weight: bold;";
Echo"}";
Echo"a:active {";
Echo" color: black;";
Echo" text-decoration:none;";
Echo" font-weight: bold;";
Echo"}";
Echo"a:hover {";
Echo" color: black;";
Echo" text-decoration:none";;
Echo" font-weight: bold;";
Echo"}";
Echo"#Menu1 {";
Echo" position:absolute;";
Echo" top:100px;";
Echo" left:50px;";
Echo"}";
Echo"#Menu2 {";
Echo" position:absolute;";
Echo" top:225px;";
Echo" left:50px;";
Echo"}";
Echo"#Main {";
Echo" position:absolute;";
Echo" top:100px;";
Echo" left:200px;";
Echo"}";
Echo"</style>";
Echo"<title>Kanin Administration</title>";
Echo"</head>";
Echo"<html>";
//Menu Start
Echo"<div id='Menu1'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=1'>Marked</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=2'>Tekst</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=3'>Link</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=4'>Markeds Galleri</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=5'>Personale Galleri</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
//Menu Slut
//Menu Funktionen Start
If($Menu == "1")
{
Echo"<div id='Menu2'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=1-1'>Nyt Marked</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=1-2'>Ret Marked</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=1-4'>Slet Marked</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
}
If($Menu == "2")
{
Echo"<div id='Menu2'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=2-1'>Ny Tekst Side</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=2-2'>Ret Tekst Side</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=2-4'>Slet Tekst Side</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
}
If($Menu == "3")
{
Echo"<div id='Menu2'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=3-1'>Nyt Link</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=3-2'>Ret Link</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=3-4'>Slet Link</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
}
If($Menu == "4")
{
Echo"<div id='Menu2'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=4-1'>Opret Galleri</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=4-1'>Ret Galleri</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=4-1'>Slet Galleri</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=4-1'>Tillad Billed</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=4-2'>Slet Billed</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
}
If($Menu == "5")
{
Echo"<div id='Menu2'>";
Echo"<table style='border: solid #000000 1px;' width='140' cellpadding='0' cellspacing='0'>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=5-1'>Tilføj Gruppe</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=5-2'>Ret Gruppe</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=5-4'>Slet Gruppe</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=5-5'>Nyt Billed</a></b></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;'> <b><a href='?Menu=$Menu&Main=5-6'>Slet Billed</a></b></td>";
Echo"</tr>";
Echo"</table>";
Echo"</div>";
}
//Menu Funktionen Slut
//Main Funktionen Start
If($Main == "1-1")
{
Echo"<div id='Main'>";
Echo"<form method='post' action='Insert.php?Form=Opret_M' enctype='multipart/form-data'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Markeds Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Markeds Kort :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='file' name='file' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Markeds Beskrivelse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><textarea cols='60' name='Markeds_Beskrivelse' rows='10' style='border: solid #FFFFFF 1px;'></textarea></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Tilføj Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table><input type='hidden' name='Form' Value='Opret_M'>";
Echo"</form>";
Echo"</div>";
}
If($Main == "1-2")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Marked' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<li><a href='?Menu=$Menu&Main=1-3&ID=$Udskriv[Kaninen_ID]'>$Udskriv[Kaninen_Navn]</a></li>";
}
Echo"</ul>";
Echo"</div>";
}
If($Main == "1-3")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
$query = mysql_query("select * from $Database where Kaninen_ID = '$ID'") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<div id='Main'>";
Echo"<form method='post' action='Insert.php?Form=Ret_M&ID=$Udskriv[Kaninen_ID]&File2=$Udskriv[Kaninen_Markedskort]' method='post' enctype='multipart/form-data'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Markeds Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61' value='$Udskriv[Kaninen_Navn]'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Markeds Kort :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='file' name='Markeds_kort' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Markeds Beskrivelse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><textarea cols='60' name='Markeds_Beskrivelse' rows='10' style='border: solid #FFFFFF 1px;'>$Udskriv[Kaninen_Indhold]</textarea></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Ret Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table><input type='hidden' name='Update' value='$ID'><input type='hidden' name='Form' Value='Ret_M'>";
Echo"<b><i>!! OBS !! OBS !! Udfyld kun Markeds kort hvis nyt Ønskes !! OBS !! OBS !!</i></b>";
Echo"</form>";
}
Echo"</div>";
}
If($Main == "1-4")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Marked' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<li><a href='Insert.php?Form=Slet_M&ID=$Udskriv[Kaninen_ID]&File=$Udskriv[Kaninen_Markedskort]' onclick=\\"return confirm('Er du sikker på du vil slette $Udskriv[Kaninen_Navn]?')\\">$Udskriv[Kaninen_Navn]</a></li>";
}
Echo"</ul>";
if($Delete == "Yes")
{
Echo"<b><i>Markedet + Markedskortet er nu slettet</i></b>";
}
Echo"</div>";
}
If($Main == "2-1")
{
Echo"<div id='Main'>";
Echo"<form method='post' action='Insert.php?Form=Opret_T'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Side Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Side Beskrivelse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><textarea cols='60' name='Markeds_Beskrivelse' rows='10' style='border: solid #FFFFFF 1px;'></textarea></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Tilføj Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table>";
Echo"</form>";
Echo"</div>";
}
If($Main == "2-2")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Tekst' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<li><a href='?Menu=$Menu&Main=2-3&ID=$Udskriv[Kaninen_ID]'>$Udskriv[Kaninen_Navn]</a></li>";
}
Echo"</ul>";
Echo"</div>";
}
If($Main == "2-3")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
$query = mysql_query("select * from $Database where Kaninen_ID = '$ID'") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<div id='Main'>";
Echo"<form method='post' action='Insert.php?Form=Ret_T&Update=$Udskriv[Kaninen_ID]'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Side Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61' value='$Udskriv[Kaninen_Navn]'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Side Beskrivelse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><textarea cols='60' name='Markeds_Beskrivelse' rows='10' style='border: solid #FFFFFF 1px;'>$Udskriv[Kaninen_Indhold]</textarea></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Ret Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table>";
Echo"</form>";
}
Echo"</div>";
}
If($Main == "2-4")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Tekst' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
If($Udskriv[Kaninen_ID] == "1")
{
}
elseIf($Udskriv[Kaninen_ID] == "2")
{
}
else
{
Echo"<li><a href='Insert.php?Form=Slet_T&ID=$Udskriv[Kaninen_ID]' onclick=\\"return confirm('Er du sikker på du vil slette $Udskriv[Kaninen_Navn]?')\\">$Udskriv[Kaninen_Navn]</a></li>";
}
}
Echo"</ul>";
if($Delete == "Yes")
{
Echo"<b><i>Markedet + Markedskortet er nu slettet</i></b>";
}
Echo"</div>";
}
If($Main == "3-1")
{
Echo"<div id='Main'>";
Echo"<form method='post' action='Insert.php?Form=Opret_L'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Link Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Link Adresse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Link' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Kort om linket :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Beskrivelse' style='border: solid #FFFFFF 1px;' size='61'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Tilføj Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table>";
Echo"</form>";
Echo"</div>";
}
If($Main == "3-2")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Link' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<li><a href='?Menu=$Menu&Main=3-3&ID=$Udskriv[Kaninen_ID]'>$Udskriv[Kaninen_Navn]</a> (Beskrivelse : <i>$Udskriv[Kaninen_Indhold]</i>)</li>";
}
Echo"</ul>";
Echo"</div>";
}
If($Main == "3-3")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
$query = mysql_query("select * from $Database where Kaninen_ID = '$ID'") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<form method='post' action='Insert.php?Form=Ret_L&Update=$Udskriv[Kaninen_ID]'>";
Echo"<table style='border: solid #000000 1px;' cellspacing='0' cellpadding='0'>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;'> <b>Link Navn :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Navn' style='border: solid #FFFFFF 1px;' size='61' value='$Udskriv[Kaninen_Navn]'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Link Adresse :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Link' style='border: solid #FFFFFF 1px;' size='61' value='$Udskriv[Kaninen_Link]'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td width='170' style='border: solid #000000 1px;' valign='top'> <b>Kort om linket :</b></td>";
Echo"<td width='300' style='border: solid #000000 1px;'><input type='text' name='Markeds_Beskrivelse' style='border: solid #FFFFFF 1px;' size='61' value='$Udskriv[Kaninen_Indhold]'></td>";
Echo"</tr>";
Echo"<tr>";
Echo"<td style='border: solid #000000 1px;' colspan='2' align='center'><input type='submit' name='Tilføj' value='Tilføj Marked' style='border: solid #FFFFFF 1px;'></td>";
Echo"</tr>";
Echo"</table>";
Echo"</form>";
}
Echo"</div>";
}
If($Main == "3-4")
{
Echo"<div id='Main'>";
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
Echo"<ul type='circle'>";
$query = mysql_query("select * from $Database where Kaninen_Type = 'Link' ORDER BY Kaninen_Navn") or die (mysql_error());
while($Udskriv = mysql_fetch_array($query))
{
Echo"<li><a href='Insert.php?Form=Slet_L&ID=$Udskriv[Kaninen_ID]' onclick=\\"return confirm('Er du sikker på du vil slette $Udskriv[Kaninen_Navn]?')\\">$Udskriv[Kaninen_Navn]</a></li>";
}
Echo"</ul>";
if($Delete == "Yes")
{
Echo"<b><i>Markedet + Markedskortet er nu slettet</i></b>";
}
Echo"</div>";
}
If($Main == "4-1")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "4-2")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-1")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-2")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-3")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-4")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-5")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
If($Main == "5-6")
{
Echo"<div id='Main'>";
Echo"$Main";
Echo"</div>";
}
//Main Funktionen Slut
Echo"</html>";
ob_flush();
?>
--Insert
<?php
ob_start();
IF($Form == "Opret_M")
{
IF($file == "")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("insert into $Database (
`Kaninen_Navn` , `Kaninen_Indhold` , `Kaninen_Aktiv` , `Kaninen_Type`
) values (
'$Markeds_Navn', '$Markeds_Beskrivelse' , 'Yes' , 'Marked'
)") or die(mysql_error());
Echo"<b><i>Markedet er Oprettet</i></b>";
}
Else
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
$konfiguration["upload_bibliotek"] = "../Kort";
$konfiguration["max_stoerrelse"] = "10000000";
/* Hvor flytter vi fra og til */
$fra = $_FILES["file"]["tmp_name"];
$til = $konfiguration["upload_bibliotek"] . "/" . $_FILES["file"]["name"];
/* Accepterer vi filens stoerrelse? */
$fil_stoerrelse = filesize($fra)/1024;
if($fil_stoerrelse > $konfiguration["max_stoerrelse"]) {
die("Desværre - filen er for stor. Jeg accepterer kun " .
$konfiguration["max_stoerrelse"] . "kb, og din fil fylder " .
ceil($fil_stoerrelse, 1) . " kb");
}
/* Saa koerer vi */
if(function_exists("move_uploaded_file")) {
move_uploaded_file($fra, $til)or die("Erro");
} else {
copy($fra, $til)or die("Erro");
}
mysql_query("insert into $Database (
`Kaninen_Navn` , `Kaninen_Indhold` , `Kaninen_Aktiv` , `Kaninen_Type` , `Kaninen_Markedskort`
) values (
'$Markeds_Navn', '$Markeds_Beskrivelse' , 'Yes' , 'Marked' , '$fra'
)") or die(mysql_error());
Echo"<b><i>Markedet er Oprettet</i></b>";
}
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=1&Main=1-1");
}
IF($Form == "Ret_M")
{
IF($Markeds_kort == "")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("update $Database SET
Kaninen_Navn ='$Markeds_Navn'
, Kaninen_Indhold ='$Markeds_Beskrivelse'
WHERE Kaninen_ID = $Update") or die(mysql_error());
}
Else
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
if($File2== "")
{
}
Else
{
unlink ("../Kort/$File2");
}
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
$konfiguration["upload_bibliotek"] = "../Kort";
$konfiguration["max_stoerrelse"] = "100000000000";
/* Hvor flytter vi fra og til */
$fra = $_FILES["Markeds_kort"]["tmp_name"];
$til = $konfiguration["upload_bibliotek"] . "/" . $_FILES["Markeds_kort"]["name"];
/* Accepterer vi filens stoerrelse? */
$fil_stoerrelse = filesize($fra)/1024;
if($fil_stoerrelse > $konfiguration["max_stoerrelse"]) {
die("Desværre - filen er for stor. Jeg accepterer kun " .
$konfiguration["max_stoerrelse"] . "kb, og din fil fylder " .
ceil($fil_stoerrelse, 1) . " kb");
}
/* Saa koerer vi */
if(function_exists("move_uploaded_file")) {
move_uploaded_file($fra, $til);
} else {
copy($fra, $til);
}
mysql_query("update $Database SET
Kaninen_Navn =$Markeds_Navn
, Kaninen_Indhold =$Markeds_Beskrivelse
, Kaninen_Markedskort =$til
WHERE Kaninen_ID = $Update") or die(mysql_error());
}
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=1&Main=1-2");
}
IF($Form == "Slet_M")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
If($File == "")
{
}
Else
{
unlink ("../Kort/$File");
}
mysql_query("delete from $Database where Kaninen_ID = '$ID'");
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=1&Main=1-4&Delete=Yes");
}
IF($Form == "Opret_T")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("insert into $Database (
`Kaninen_Navn` , `Kaninen_Indhold` , `Kaninen_Aktiv` , `Kaninen_Type`
) values (
'$Markeds_Navn', '$Markeds_Beskrivelse' , 'Yes' , 'Tekst'
)") or die(mysql_error());
Echo"<b><i>Siden er Oprettet</i></b>";
header("http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=1&Main=2-1");
}
IF($Form == "Ret_T")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("update $Database SET
Kaninen_Navn ='$Markeds_Navn'
, Kaninen_Indhold ='$Markeds_Beskrivelse'
WHERE Kaninen_ID = $Update") or die(mysql_error());
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=2&Main=2-2");
}
IF($Form == "Slet_T")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("delete from $Database where Kaninen_ID = '$ID'");
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=2&Main=2-4&Delete=Yes");
}
IF($Form == "Opret_L")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("insert into $Database (
`Kaninen_Navn` , `Kaninen_Indhold` , `Kaninen_Link` , `Kaninen_Aktiv` , `Kaninen_Type`
) values (
'$Markeds_Navn', '$Markeds_Beskrivelse' , '$Markeds_Link' , 'Yes' , 'Link'
)") or die(mysql_error());
Echo"<b><i>Siden er Oprettet</i></b>";
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=3&Main=3-1");
}
IF($Form == "Ret_L")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("update $Database SET
Kaninen_Navn ='$Markeds_Navn'
, Kaninen_Indhold ='$Markeds_Beskrivelse'
, Kaninen_Link ='$Markeds_Link'
WHERE Kaninen_ID = $Update") or die(mysql_error());
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=3&Main=3-2");
}
IF($Form == "Slet_L")
{
$Allow_Database = "Yes";
require "../System/Config.php";
mysql_connect($BrugerHost,$BrugerId,$Kodeord);
mysql_select_db($BrugerDatabase);
mysql_query("delete from $Database where Kaninen_ID = '$ID'");
header("Location: http://www.generationx.dk/Kaninen2/admin/Action.php?Menu=3&Main=3-4&Delete=Yes");
}
ob_flush();
?>
-----------------------------------------------------------------------------
»»Mark S. Johansen