<?php
session_start();
include('com/sql_connect.php');
//------Neuer Eintrag------------------------------------------------
if(isset($_POST['titel']) && $_POST['titel'] != ''){
if(isset($_POST['new'])){
$sql = "SELECT * FROM `navigation`";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
if(strtolower($row['name']) == strtolower($_POST['titel'])){
$error = 'Name im Navigationsbaum schon vergeben, wählen sie einen Alternativen namen.';
$setup = 0;
break;
}elseif(strtolower($_POST['titel']) == 'galerie'){
$error = 'Der Eintrag Galerie wird für ein Modul verwendet! Wählen sie einen Alternativen namen.';
$setup = 0;
break;
}else{
$setup = 1;
}
}
if(empty($num)){
$setup = 1;
}
if(isset($setup) && $setup == 1){
$sql = "SELECT * FROM `navigation`
ORDER BY `pos` DESC
LIMIT 1
";
$num = mysql_num_rows(mysql_query($sql));
$row = mysql_fetch_array(mysql_query($sql));
if(!empty($num)){
$pos = $row['pos']+1;
}else{
$pos = 1;
}
$url = str_replace(' ', '_', $_POST['titel']);
$url = strtolower($url);
$url = $url.'.php';
$verz = opendir ( '../' );
while($file = readdir($verz)){
if($file != '.' && $file != '..'){
if($file == $url){
$error = 'Das System kann die datei '.$url.' nicht erstellen. Mögliches Problem: Datei schon vorhanden.<br>'
.'Verwenden Sie einen Alternativen Seitentitel';
$setup = 0;
break;
}else{
$setup = 1;
}
}
}
closedir($verz);
if(isset($setup) && $setup == 1){
//----str_replace----
$str = $_POST['titel'];
$str = trim($str);
$str = strip_tags($str);
$_POST['titel'] = $str;
//-------------------
$sql = "INSERT INTO `navigation`
SET
`pos` = '".mysql_real_escape_string($pos)."',
`processing` = 'yes',
`status` = 'visible',
`level` = 'free',
`source` = '".mysql_real_escape_string(time())."',
`name` = '".mysql_real_escape_string($_POST['titel'])."',
`url` = '".mysql_real_escape_string($url)."'
";
$result = mysql_query($sql);
copy('../_backup.php', '../'.$url);
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
}
}
}
//------Eintrag Löschen------------------------------------------------
if(isset($_GET['delete_page']) && $_GET['delete_page'] == 'true'){
$sql = "SELECT * FROM `navigation`
WHERE `id` = '".mysql_real_escape_string($_GET['range'])."'
LIMIT 1
";
$row = mysql_fetch_array(mysql_query($sql));
$sql = "DELETE FROM `navigation`
WHERE `id` = '".mysql_real_escape_string($_GET['range'])."'
LIMIT 1
";
$result = mysql_query($sql);
$sql = "SELECT * FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
for($i = 1; $i < $num+1; $i++){
$sql1 = "SELECT * FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
AND `pos` = '".mysql_real_escape_string($i)."'
LIMIT 1
";
$del = mysql_fetch_array(mysql_query($sql1));
if($del['img0'] != ''){
@unlink('../img_content/'.$del['img0']);
@unlink('../img_content/thumb_'.$del['img0']);
@unlink('../img_content/small_'.$del['img0']);
}
if($del['img1'] != ''){
@unlink('../img_content/'.$del['img1']);
@unlink('../img_content/thumb_'.$del['img1']);
@unlink('../img_content/small_'.$del['img1']);
}
if($del['img2'] != ''){
@unlink('../img_content/'.$del['img2']);
@unlink('../img_content/thumb_'.$del['img2']);
@unlink('../img_content/small_'.$del['img2']);
}
$sql = "DELETE FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
AND `pos` = '".mysql_real_escape_string($i)."'
LIMIT 1
";
$result = mysql_query($sql);
}
@unlink('../'.$row['url']);
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
//------Position verändern----------------------------------------------------------
if(isset($_GET['pos'])){
$sqlmax = "SELECT * FROM `navigation`
ORDER BY `pos` DESC
LIMIT 1
";
$result = mysql_query($sqlmax);
$max = mysql_fetch_array($result);
$max = $max['pos'];
if($_GET['action'] == 'up'){
if($_GET['pos'] > 1){
$new = $_GET['pos']-1;
}
}
if($_GET['action'] == 'down'){
if($_GET['pos'] < $max){
$new = $_GET['pos']+1;
}
}
if($new){
$sql001 = "UPDATE `navigation`
SET `pos` = '".mysql_real_escape_string('0')."'
WHERE `pos` = '".mysql_real_escape_string($new)."'
LIMIT 1
";
$result001 = mysql_query($sql001);
$sql002 = "UPDATE `navigation`
SET `pos` = '".mysql_real_escape_string($new)."'
WHERE `pos` = '".mysql_real_escape_string($_GET['pos'])."'
LIMIT 1
";
$result002 = mysql_query($sql002);
$sql003 = "UPDATE `navigation`
SET `pos` = '".mysql_real_escape_string($_GET['pos'])."'
WHERE `pos` = '".mysql_real_escape_string('0')."'
LIMIT 1
";
$result003 = mysql_query($sql003);
}
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
//------Neuer eintrag SUB-----------------------------------------------------------
if(isset($_POST['sub_titel']) && $_POST['sub_titel'] != ''){
if(isset($_POST['sub_new'])){
$sql = "SELECT * FROM `navigation_sub`";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
while($row = mysql_fetch_array($result)){
if(strtolower($row['titel']) == strtolower($_POST['sub_titel'])){
$error = 'Name im Untermenu von '.$_GET['sub'].' schon vergeben, wählen sie einen Alternativen namen.';
$setup = 0;
break;
}else{
$setup = 1;
}
}
if(empty($num)){
$setup = 1;
}
if(isset($setup) && $setup == 1){
$sql = "SELECT * FROM `navigation_sub`
WHERE `sub` = '".mysql_real_escape_string($_GET['sub'])."'
ORDER BY `pos` DESC
LIMIT 1
";
$num = mysql_num_rows(mysql_query($sql));
$row = mysql_fetch_array(mysql_query($sql));
if(!empty($num)){
$pos = $row['pos']+1;
}else{
$pos = 1;
}
$url = str_replace(' ', '_', $_POST['sub_titel']);
$url = strtolower($url);
$url = $url.'.php';
$verz = opendir ( '../' );
while($file = readdir($verz)){
if($file != '.' && $file != '..'){
if($file == $url){
$error = 'Das System kann die datei '.$url.' nicht erstellen. Mögliches Problem: Datei schon vorhanden.<br>'
.'Verwenden Sie einen Alternativen Seitentitel';
$setup = 0;
break;
}else{
$setup = 1;
}
}
}
closedir($verz);
if(isset($setup) && $setup == 1){
//----str_replace----
$str = $_POST['sub_titel'];
$str = trim($str);
$str = strip_tags($str);
$_POST['sub_titel'] = $str;
//-------------------
$sql = "INSERT INTO `navigation_sub`
SET
`pos` = '".mysql_real_escape_string($pos)."',
`status` = 'visible',
`processing` = 'yes',
`level` = 'free',
`source` = '".mysql_real_escape_string(time())."',
`name` = '".mysql_real_escape_string($_POST['sub_titel'])."',
`url` = '".mysql_real_escape_string($url)."',
`sub` = '".mysql_real_escape_string($_GET['sub'])."'
";
$result = mysql_query($sql);
copy('../_backup.php', '../'.$url);
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
}
}
}
//------Eintrag Löschen SUB---------------------------------------------
if(isset($_GET['delete_page_sub']) && $_GET['delete_page_sub'] == 'true'){
$sql = "SELECT * FROM `navigation_sub`
WHERE `id` = '".mysql_real_escape_string($_GET['range'])."'
LIMIT 1
";
$row = mysql_fetch_array(mysql_query($sql));
$sql = "DELETE FROM `navigation_sub`
WHERE `id` = '".mysql_real_escape_string($_GET['range'])."'
LIMIT 1
";
$result = mysql_query($sql);
$sql = "SELECT * FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
";
$result = mysql_query($sql);
$num = mysql_num_rows($result);
for($i = 1; $i < $num+1; $i++){
$sql1 = "SELECT * FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
AND `pos` = '".mysql_real_escape_string($i)."'
LIMIT 1
";
$del = mysql_fetch_array(mysql_query($sql1));
if($del['img0'] != ''){
@unlink('../img_content/'.$del['img0']);
@unlink('../img_content/thumb_'.$del['img0']);
@unlink('../img_content/small_'.$del['img0']);
}
if($del['img1'] != ''){
@unlink('../img_content/'.$del['img1']);
@unlink('../img_content/thumb_'.$del['img1']);
@unlink('../img_content/small_'.$del['img1']);
}
if($del['img2'] != ''){
@unlink('../img_content/'.$del['img2']);
@unlink('../img_content/thumb_'.$del['img2']);
@unlink('../img_content/small_'.$del['img2']);
}
$sql = "DELETE FROM `content`
WHERE `allocate` = '".mysql_real_escape_string($row['url'])."'
AND `pos` = '".mysql_real_escape_string($i)."'
LIMIT 1
";
$result = mysql_query($sql);
}
@unlink('../'.$row['url']);
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
//------Position verändern SUB------------------------------------------------------
if(isset($_GET['sub_pos'])){
$sqlmax = "SELECT * FROM `navigation_sub`
WHERE `sub` = '".mysql_real_escape_string($_GET['sub'])."'
ORDER BY `pos` DESC
LIMIT 1
";
$result = mysql_query($sqlmax);
$max = mysql_fetch_array($result);
$max = $max['pos'];
if($_GET['action'] == 'up'){
if($_GET['sub_pos'] > 1){
$new = $_GET['sub_pos']-1;
}
}
if($_GET['action'] == 'down'){
if($_GET['sub_pos'] < $max){
$new = $_GET['sub_pos']+1;
}
}
if($new){
$sql001 = "UPDATE `navigation_sub`
SET `pos` = '".mysql_real_escape_string('0')."'
WHERE `pos` = '".mysql_real_escape_string($new)."'
AND `sub` = '".mysql_real_escape_string($_GET['sub'])."'
LIMIT 1
";
$result001 = mysql_query($sql001);
$sql002 = "UPDATE `navigation_sub`
SET `pos` = '".mysql_real_escape_string($new)."'
WHERE `pos` = '".mysql_real_escape_string($_GET['sub_pos'])."'
AND `sub` = '".mysql_real_escape_string($_GET['sub'])."'
LIMIT 1
";
$result002 = mysql_query($sql002);
$sql003 = "UPDATE `navigation_sub`
SET `pos` = '".mysql_real_escape_string($_GET['sub_pos'])."'
WHERE `pos` = '".mysql_real_escape_string('0')."'
AND `sub` = '".mysql_real_escape_string($_GET['sub'])."'
LIMIT 1
";
$result003 = mysql_query($sql003);
}
header('Location: '.$_SERVER['PHP_SELF'].'?select='.$_GET['select']);
}
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
echo '<html>';
echo '<head>';
echo '<meta http-equiv="Author" content="Aurel Itin" />';
echo '<meta http-equiv="Title" content="Kleiderbörse - rund um Baby\'s und Kleinkinder" />';
echo '<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />';
echo '<meta http-equiv="content-language" content="de" />';
echo '<link href="./css/layout.css" rel="stylesheet" type="text/css" />';
echo '<title>Kleiderbörse - rund um Baby\'s und Kleinkinder</title>';
echo '</head>';
echo '<body>';
echo '<div id="holder">';
echo '<div class="top">';
echo ' ';
echo '</div>';
echo '<div class="ebene_0">';
$img = array('website', 'shop');
for($i = 0; $i < count($img); $i++){
echo '<div class="button_top">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$img[$i].'" ';
if($_GET['select'] == $img[$i]){
echo 'onMouseOut="document.'.$img[$i].'.src=\'./images/'.$img[$i].'_animated.gif\';">';
echo '<img src="./images/'.$img[$i].'_animated.gif" name="'.$img[$i].'" alt="test" border="0">';
}else{
echo 'onMouseOver="document.'.$img[$i].'.src=\'./images/top_'.$img[$i].'_over.jpg\';"';
echo 'onMouseOut="document.'.$img[$i].'.src=\'./images/top_'.$img[$i].'_out.jpg\';">';
echo '<img src="./images/top_'.$img[$i].'_out.jpg" name="'.$img[$i].'" alt="test" border="0">';
}
echo '</a>';
echo '</div>';
}
echo '</div>';
echo '<div class="ebene_1">';
if(isset($_GET['select']) && $_GET['select'] == 'shop'){
$cat = array('kategorie', 'produkt', 'bestellung', 'versand', 'kunden', 'einstellungen');
}elseif(isset($_GET['select']) && $_GET['select'] == 'website'){
$cat = array('seiten', 'galerie', 'downloads', 'links', 'mail', 'einstellungen');
}
for($i = 0; $i < count($cat); $i++){
echo '<div class="button">';
echo '<a href="'.$_GET['select'].'_'.$cat[$i].'.php?select='.$_GET['select'].'"
onMouseOver="document.'.$cat[$i].'.src=\'./images/button_'.$cat[$i].'_over.jpg\';"
onMouseOut="document.'.$cat[$i].'.src=\'./images/button_'.$cat[$i].'_out.jpg\';">';
echo '<img src="./images/button_'.$cat[$i].'_out.jpg" name="'.$cat[$i].'" alt="test" border="0">';
echo '</a>';
echo '</div>';
}
echo '</div>';
echo '<div class="ebene_2">';
//--copy for content
echo '<div class="navigation">';
if(isset($_GET['popup']) && $_GET['popup'] == 'newpage'){
echo '<form action="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&newpage=true" method="POST">';
echo '<div class="nav_box" style="border-bottom: 1px solid #000;margin: 0 0 20px 0;width: 280px;padding: 0 0 10px 0;">';
echo '<div class="nav_box_1" style="width: 161px;">';
echo '<input type="text" name="titel" class="input">';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<input type="submit" name="new" class="save" value=""><span>Speichern</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'" class="tooltip">';
echo '<img src="./ico/ico_abbort.jpg" border"0"><span>Abbrechen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2" style="width: 65px;"> </div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<img src="./ico/ico_help.jpg" border"0"><span>Hilfe anzeigen</span>';
echo '</a>';
echo '</div>';
echo '</div>';
echo '</form>';
}elseif(isset($_GET['popup']) && $_GET['popup'] == 'delete'){
echo '<div class="nav_box" style="border-bottom: 1px solid #000;margin: 0 0 20px 0;width: 280px;padding: 0 0 10px 0;">';
echo '<div class="nav_box_1" style="width: 215px;">';
echo 'Wollen Sie die Seite Löschen?';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&delete_page=true&range='.$_GET['range'].'" class="tooltip">';
echo '<img src="./ico/ico_delete.jpg" border"0"><span>Unwiederruflich mit allen Bildern und Inhalten Löschen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'" class="tooltip">';
echo '<img src="./ico/ico_abbort.jpg" border"0"><span>Abbrechen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2" style="width: 11px;"> </div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<img src="./ico/ico_help.jpg" border"0"><span>Hilfe anzeigen</span>';
echo '</a>';
echo '</div>';
echo '</div>';
}elseif(isset($_GET['popup']) && $_GET['popup'] == 'delete_sub'){
echo '<div class="nav_box" style="border-bottom: 1px solid #000;margin: 0 0 20px 0;width: 280px;padding: 0 0 10px 0;">';
echo '<div class="nav_box_1" style="width: 215px;">';
echo 'Wollen Sie die Seite Löschen?';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&delete_page_sub=true&range='.$_GET['range'].'" class="tooltip">';
echo '<img src="./ico/ico_delete.jpg" border"0"><span>Unwiederruflich mit allen Bildern und Inhalten Löschen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'" class="tooltip">';
echo '<img src="./ico/ico_abbort.jpg" border"0"><span>Abbrechen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2" style="width: 11px;"> </div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<img src="./ico/ico_help.jpg" border"0"><span>Hilfe anzeigen</span>';
echo '</a>';
echo '</div>';
echo '</div>';
}else{
echo '<div class="nav_box" style="border-bottom: 1px solid #000;margin: 0 0 20px 0;width: 280px;padding: 0 0 10px 0;">';
echo '<div class="nav_box_1" style="width: 161px;">';
echo 'Neue Seite hinzufügen.';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&popup=newpage" class="tooltip">';
echo '<img src="./ico/ico_new.jpg" border"0"><span>Neue Seite hinzufügen</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2" style="width: 83px;"> </div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<img src="./ico/ico_help.jpg" border"0"><span>Hilfe anzeigen</span>';
echo '</a>';
echo '</div>';
echo '</div>';
}
$sql = "SELECT * FROM `navigation`
ORDER BY `pos` ASC
LIMIT 1
";
$row = mysql_fetch_array(mysql_query($sql));
$min = $row['pos'];
$sql = "SELECT * FROM `navigation`
ORDER BY `pos` DESC
LIMIT 1
";
$row = mysql_fetch_array(mysql_query($sql));
$max = $row['pos'];
$sql = "SELECT * FROM `navigation`
ORDER BY `pos` ASC
";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
echo '<div class="nav_box">';
$sql1 = "SELECT * FROM `navigation_sub`
WHERE `sub` = '".mysql_real_escape_string($row['name'])."'
ORDER BY `pos` ASC
LIMIT 1
";
$row1 = mysql_fetch_array(mysql_query($sql1));
$min1 = $row1['pos'];
$sql1 = "SELECT * FROM `navigation_sub`
WHERE `sub` = '".mysql_real_escape_string($row['name'])."'
ORDER BY `pos` DESC
LIMIT 1
";
$row1 = mysql_fetch_array(mysql_query($sql1));
$max1 = $row1['pos'];
$sql1 = "SELECT * FROM `navigation_sub`
WHERE `sub` = '".mysql_real_escape_string($row['name'])."'
ORDER BY `pos` ASC
";
$result1 = mysql_query($sql1);
$num1 = mysql_numrows($result1);
echo '<div class="nav_box_2" style="width: 16px">';
if($num1 > 0){
echo '<a href="#" class="tooltip">';
echo '<img src="./ico/ico_maximize.jpg" border"0"><span>Unterseiten ansehen</span>';
echo '</a>';
}else{
echo '<img src="./ico/ico_empty.jpg" border"0">';
}
echo '</div>';
echo '<div class="nav_box_1" ';
if($row['status'] == 'hidden'){
echo 'style="color: #999999;"';
}
echo '>';
echo $row['name'];
echo '</div>';
echo '<div class="nav_box_2">';
if($row['processing'] == 'yes'){
echo '<a href="website_bearbeiten.php?select='.$_GET['select'].'&allocate='.$row['url'].'" class="tooltip">';
echo '<img src="./ico/ico_edit.jpg" border"0"><span>Bearbeiten</span>';
echo '</a>';
}else{
echo '<img src="./ico/ico_noedit.jpg" border"0">';
}
echo '</div>';
echo '<div class="nav_box_2">';
if($row['processing'] == 'yes'){
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&popup=delete&range='.$row['id'].'" class="tooltip">';
echo '<img src="./ico/ico_delete.jpg" border"0"><span>Löschen</span>';
echo '</a>';
}else{
echo '<img src="./ico/ico_nodelete.jpg" border"0">';
}
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&popup=newpage_sub&sub='.$row['name'].'" class="tooltip">';
echo '<img src="./ico/ico_new.jpg" border"0"><span>Neue Unterseite hinzufügen</span>';
echo '</a>';
echo '</div>';
if($row['pos'] == $min){
echo '<div class="nav_box_2">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=down&pos='.$row['pos'].'" class="tooltip">';
echo '<img src="./ico/ico_down.jpg" border"0"><span>Position runter</span>';
echo '</a>';
echo '</div>';
}elseif($row['pos'] == $max){
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=up&pos='.$row['pos'].'" class="tooltip">';
echo '<img src="./ico/ico_up.jpg" border"0"><span>Position hoch</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
}else{
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=up&pos='.$row['pos'].'" class="tooltip">';
echo '<img src="./ico/ico_up.jpg" border"0"><span>Position hoch</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=down&pos='.$row['pos'].'" class="tooltip">';
echo '<img src="./ico/ico_down.jpg" border"0"><span>Position runter</span>';
echo '</a>';
echo '</div>';
}
echo '</div>';
//------beginn unternavigation
if($_GET['popup'] == 'newpage_sub' && $_GET['sub'] == $row['name']){
echo '<div class="nav_box_sub">';
echo '<form action="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&newpage_sub=true&sub='.$row['name'].'" method="POST">';
echo '<div class="nav_box" style="width: 280px; margin: 0 auto;">';
echo '<div class="nav_box_2" style="width: 16px">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_2" style="width: 16px">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_1" style="width: 147px;">';
echo '<input type="text" name="sub_titel" class="input" style="width: 136px">';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="#" class="tooltip">';
echo '<input type="submit" name="sub_new" class="save" value=""><span>Speichern</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'" class="tooltip">';
echo '<img src="./ico/ico_abbort.jpg" border"0"><span>Abbrechen</span>';
echo '</a>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
}
if($num1 > 0){
echo '<div class="nav_box_sub">';
while($row1 = mysql_fetch_array($result1)){
echo '<div class="nav_box_2" style="width: 16px">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_2" style="width: 18px">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_1" ';
if($row1['status'] == 'hidden'){
echo 'style="color: #999999;"';
}
echo '>';
echo $row1['name'];
echo '</div>';
echo '<div class="nav_box_2">';
if($row1['processing'] == 'yes'){
echo '<a href="website_bearbeiten.php?select='.$_GET['select'].'&allocate='.$row1['url'].'" class="tooltip">';
echo '<img src="./ico/ico_edit.jpg" border"0"><span>Bearbeiten</span>';
echo '</a>';
}else{
echo '<img src="./ico/ico_noedit.jpg" border"0">';
}
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&popup=delete_sub&range='.$row1['id'].'" class="tooltip">';
echo '<img src="./ico/ico_delete.jpg" border"0"><span>Löschen</span>';
echo '</a>';
echo '</div>';
if($row1['pos'] == $min1){
echo '<div class="nav_box_2">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=down&sub_pos='.$row1['pos'].'&sub='.$row['name'].'" class="tooltip">';
echo '<img src="./ico/ico_down.jpg" border"0"><span>Position runter</span>';
echo '</a>';
echo '</div>';
}elseif($row1['pos'] == $max1){
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=up&sub_pos='.$row1['pos'].'&sub='.$row['name'].'" class="tooltip">';
echo '<img src="./ico/ico_up.jpg" border"0"><span>Position hoch</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<img src="./ico/ico_empty.jpg" border"0">';
echo '</div>';
}else{
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=up&sub_pos='.$row1['pos'].'&sub='.$row['name'].'" class="tooltip">';
echo '<img src="./ico/ico_up.jpg" border"0"><span>Position hoch</span>';
echo '</a>';
echo '</div>';
echo '<div class="nav_box_2">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?select='.$_GET['select'].'&action=down&sub_pos='.$row1['pos'].'&sub='.$row['name'].'" class="tooltip">';
echo '<img src="./ico/ico_down.jpg" border"0"><span>Position runter</span>';
echo '</a>';
echo '</div>';
}
}
echo '</div>';
}
//----------------------------
}
echo '</div>';
echo '<div class="content">';
echo '<div class="content_top">';
echo '<div style="width: 620px; float: left;">Seiten bearbeiten</div>';
echo '</div>';
echo '<div class="content_text">';
echo 'Wählen Sie aus der linken Navigation die zu bearbeitende Seite aus. Durch ein klick auf das da zu
passende Symbol <a href="#" class="tooltip"><img src="./ico/ico_edit_text.jpg" border"0"><span>Bearbeiten</span></a> gelangen Sie in den editier Modus.';
echo '</div>';
echo '<div class="content_text">';
echo 'Wählen Sie aus der linken Navigation die zu bearbeitende Seite aus. Durch ein klick auf das da zu
passende Symbol <a href="#" class="tooltip"><img src="./ico/ico_edit_text.jpg" border"0"><span>Bearbeiten</span></a> gelangen Sie in den editier Modus.';
echo '</div>';
echo '</div>';
//--end of copy for content
echo '</div>';
echo '</div>';
echo '</body>';
echo '</html>';
?>