<script>
function Klappen(id)
{
if(document.getElementById("hidden["+id+"]").style.display=="inline")
{
document.getElementById("beitrag_anzeigen["+id+"]").style.display="block";
document.getElementById("beitrag_ausblenden["+id+"]").style.display="none";
document.getElementById("hidden["+id+"]").style.display="none";
}
else
{
document.getElementById("beitrag_anzeigen["+id+"]").style.display="none";
document.getElementById("beitrag_ausblenden["+id+"]").style.display="block";
document.getElementById("hidden["+id+"]").style.display="inline";
}
}
function DeleteMarkieren(id)
{
if(!document.getElementsByName('delete['+id+']')[0].checked)
{
document.getElementById('delete_rahmen_['+id+']').style.backgroundColor="#FCFBFA";
}
else
{
document.getElementById('delete_rahmen_['+id+']').style.backgroundColor="#B43A3A";
}
}
function Hintergrund(id,maus)
{
if(!document.getElementsByName('delete['+id+']')[0].checked)
{
if(maus==1)
document.getElementById('delete_rahmen_['+id+']').style.backgroundColor="#E7E0D5";
else
document.getElementById('delete_rahmen_['+id+']').style.backgroundColor="#FCFBFA";
}
}
function Optionen()
{
if(document.getElementById('menuAllesAusblenden').style.display=="block")
{
document.getElementById('optionenSchliessen').style.display="none";
document.getElementById('optionenAnzeigen').style.display="block";
document.getElementById('menuAllesAusblenden').style.display="none";
document.getElementById('menuAllesEinblenden').style.display="block";
}
else
{
document.getElementById('optionenSchliessen').style.display="block";
document.getElementById('optionenAnzeigen').style.display="none";
document.getElementById('menuAllesEinblenden').style.display="none";
document.getElementById('menuAllesAusblenden').style.display="block";
}
}
function MehrereFunktionen(startid, endid, art)
{
/* ALLE LÖSCHEN MARKIEREN */
if(art==0)
{
for(var i=startid;i<endid;i++)
{
if(!document.getElementsByName("delete["+i+"]")[0].checked)
{
document.getElementsByName("delete["+i+"]")[0].checked=true;
DeleteMarkieren(i);
}
}
Optionen();
}
/* ALLE NICHT ZUM LÖSCHEN MARKIEREN */
if(art==4)
{
for(var i=startid;i<endid;i++)
{
if(document.getElementsByName("delete["+i+"]")[0].checked)
{
document.getElementsByName("delete["+i+"]")[0].checked=false;
DeleteMarkieren(i);
}
}
Optionen();
}
/* ALLE ENTSPERREN MARKIEREN */
if(art==1)
{
for(var i=startid;i<endid;i++)
{
document.getElementsByName("verwaltung["+i+"]")[0].checked=true;
}
Optionen();
}
/* ALLE SPERREN MARKIEREN */
if(art==2)
{
for(var i=startid;i<endid;i++)
{
document.getElementsByName("verwaltung["+i+"]")[1].checked=true;
}
Optionen();
}
/* ALLE ANZEIGEN */
if(art==3)
{
for(var i=startid;i<endid;i++)
{
if(document.getElementById("hidden["+i+"]").style.display=="none")
Klappen(i);
}
Optionen();
}
/* ALLE AUSBLENDEN */
if(art==5)
{
for(var i=startid;i<endid;i++)
{
if(document.getElementById("hidden["+i+"]").style.display=="inline")
Klappen(i);
}
Optionen();
}
/* ALLE AUSBLENDEN IM GÄSTEBUCH MARKIEREN */
if(art==6)
{
for(var i=startid;i<endid;i++)
{
document.getElementsByName("ausblenden["+i+"]")[1].checked=true;
}
Optionen();
}
/* ALLE AUSBLENDEN IM GÄSTEBUCH DEMARKIEREN */
if(art==7)
{
for(var i=startid;i<endid;i++)
{
document.getElementsByName("ausblenden["+i+"]")[0].checked=true;
}
Optionen();
}
}
</script>
<?php
if($session_id==$sess_id and $session_id!="" and $sess_id!="")
{
unset($_SESSION['backupVorschau']);
$do=$_GET['do'];
$start;
$ende;
$aktuelleSeite;
$gesamtAnzahl=anzahlBeitraege("..");
if($_GET['start']!="")
{
$start=$_GET['start'];
$ende=$_GET['ende'];
$aktuelleSeite=$_GET['aktuelleSeite'];
}
else
{
$start=0;
if($gesamtAnzahl<10)
$ende=$gesamtAnzahl;
else
$ende=10;
$aktuelleSeite=1;
}
function SeitenzahlenAusgebenVerwaltung($proSeite,$alleBeitraege,$aktuelleSeite)
{
$offset=2;
global $sess_id;
$ausgabe="";
if($alleBeitraege>0)
{
if($alleBeitraege>$proSeite)
{
$gesamtSeiten=ceil($alleBeitraege/$proSeite);
$start=0;
$ende=$proSeite;
if($gesamtSeiten>(($offset*2)+3))
{
if($aktuelleSeite>1)
{
if($aktuelleSeite>$offset+1 && $aktuelleSeite<($gesamtSeiten-$offset))
{
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=1&action=login&go=2&session_id=$sess_id\" class=\"links\">1</a> ]";
$ausgabe.=" ... ";
for($x=$aktuelleSeite-$offset;$x<=$aktuelleSeite+$offset;$x++)
{
$start=$proSeite*($x-1);
$ende=$proSeite*$x;
if($aktuelleSeite==$x)
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\"><u><b>$x</b></u></a> ] ";
else
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\">$x</a> ] ";
}
$start=$proSeite*($gesamtSeiten-1);
$ausgabe.="... ";
$ende=$gesamtSeiten-1;
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$alleBeitraege&aktuelleSeite=$gesamtSeiten&action=login&go=2&session_id=$sess_id\" class=\"links\">$gesamtSeiten</a> ]";
}
else
{
if($aktuelleSeite>($gesamtSeiten-$offset-1) || $aktuelleSeite<($gesamtSeiten-$offset) && $aktuelleSeite>$offset+1)
{
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=1&action=login&go=2&session_id=$sess_id\" class=\"links\">1</a> ]";
$ausgabe.=" ... ";
}
if($aktuelleSeite-$offset<=0)
$minus=(($aktuelleSeite-$offset)*(-1))+1;
else
$minus=0;
if(($aktuelleSeite+$offset)>$gesamtSeiten)
$bis=$gesamtSeiten;
else
$bis=$aktuelleSeite+$offset;
for($x=$aktuelleSeite-$offset+$minus;$x<=$bis;$x++)
{
$start=$proSeite*($x-1);
if(($ende+$proSeite)>$alleBeitraege)
$ende=$alleBeitraege;
else
$ende=$proSeite*$x;
if($aktuelleSeite==$x)
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\"><u><b>$x</b></u></a> ] ";
else
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\">$x</a> ] ";
}
if($aktuelleSeite<=$offset+1 || $aktuelleSeite<($gesamtSeiten-$offset) && $aktuelleSeite>$offset+1)
{
$start=$proSeite*($gesamtSeiten-1);
$ausgabe.="... ";
$ende=$gesamtSeiten-1;
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$alleBeitraege&aktuelleSeite=$gesamtSeiten&action=login&go=2&session_id=$sess_id\" class=\"links\">$gesamtSeiten</a> ]";
}
}
}
else
{
for($x=1;$x<=$aktuelleSeite+$offset;$x++)
{
if($aktuelleSeite==$x)
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\"><u><b>$x</b></u></a> ] ";
else
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\">$x</a> ] ";
$start=$start+$proSeite;
if(($ende+$proSeite)>$alleBeitraege)
$ende=$alleBeitraege;
else
$ende=$ende+$proSeite;
}
$start=$proSeite*($gesamtSeiten-1);
$ausgabe.="... ";
$ende=$gesamtSeiten-1;
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$alleBeitraege&aktuelleSeite=$gesamtSeiten&action=login&go=2&session_id=$sess_id\" class=\"links\">$gesamtSeiten</a> ]";
}
}
else
{
for($x=1;$x<=$gesamtSeiten;$x++)
{
if($aktuelleSeite==$x)
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\"><u><b>$x</b></u></a> ] ";
else
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=$start&ende=$ende&aktuelleSeite=$x&action=login&go=2&session_id=$sess_id\" class=\"links\">$x</a> ] ";
$start=$start+$proSeite;
if(($ende+$proSeite)>$alleBeitraege)
$ende=$alleBeitraege;
else
$ende=$ende+$proSeite;
}
}
}
else
$ausgabe.="[ <a href=\"$_SERVER[PHP_SELF]?start=0&ende=$alleBeitraege&aktuelleSeite=1&action=login&go=2&session_id=$sess_id\" class=\"links\">1</a> ]";
}
else
$ausgabe="";
return $ausgabe;
}
if($do=="")
{
$eintraege=dateiAuslesen("..");
$c=$start;
?>
<form name="form1" method="post" action="admin.php?action=login&go=2&session_id=<?php echo $sess_id ?>&do=save_verwaltung&start=<?php echo $start ?>&ende=<?php echo $ende ?>&aktuelleSeite=<?php echo $aktuelleSeite ?>" style="margin:0px;padding:0px">
<div id="grundeinstellungen" style="position:absolute;width:800px;margin:0px;margin-top:25px;padding:0px;overflow:auto;height:407px">
<?php
for($x=$start;$x<$ende;$x++)
{
if($x<$gesamtAnzahl)
{
$daten=$eintraege[$x];
$datenkopie=$daten;
switch($daten[13])
{
case 1:
$checked_ja="checked";
$checked_nein="";
$statuscolor="A73737";
$statuscolorBack="F2CACA";
$statustext=$sprache[157];
break;
case 0:
$checked_nein="checked";
$checked_ja="";
$statuscolor="44A11B";
$statuscolorBack="CDE8C1";
$statustext=$sprache[156];
break;
}
switch($daten[20])
{
case 1:
$checkedAusgeblendetJa="checked";
$checkedAusgeblendetNein="";
$statuscolor="E7952B";
$statuscolorBack="F5D8B2";
$statustext=$sprache[158];
break;
case 0:
$checkedAusgeblendetNein="checked";
$checkedAusgeblendetJa="";
break;
}
$daten[1]=str_replace("\\","",$daten[1]);
$nr=nummerAuffuellen(count($eintraege)-($c),count($eintraege));
?>
<div id="delete_rahmen_[<?php echo $c ?>]" OnMouseOver="Hintergrund('<?php echo $c ?>','1')" OnMouseOut="Hintergrund('<?php echo $c ?>','0')" style="float:left;padding:0px;margin:0px;padding-bottom:10px;border-bottom:1px solid #D5CDC4;background-color:#FCFBFA">
<div style="width:80px;float:left;">
<div id="nr_<?php echo"$c" ?>" class="dezenter_rahmen" style="margin-left:10px;margin-top:10px">
<p align="center" style="margin:10px">
<b><?php echo $nr ?></b>
</p>
</div>
</div>
<div id="<?php echo $c ?>" class="titeldiv" style="float:right;display:inline;width:670px;height:60px;margin-right:10px">
<div style="float:left;Width:188px;margin-right:20px">
<b><? echo trim($sprache[124]).":" ?></b> <br><?php echo StringKuerzen($daten[1],24) ?>
</div>
<div style="float:left;Width:110px">
<b><? echo trim($sprache[125]).":" ?></b> <br><?php echo $daten[2] ?><br><?php echo $daten[3] ?>
</div>
<div align="right" style="float:left;width:110px;margin-right:10px">
<p style="margin:0px;padding:0px;margin-bottom:6px;margin-top:3px">
<b><? echo trim($sprache[127])?></b>
</p>
<p style="margin:0px;padding:0px;margin-bottom:6px">
<b><? echo trim($sprache[155])?></b>
</p>
<p style="margin:0px;padding:0px;margin-bottom:6px">
<b><? echo trim($sprache[126])?></b>
</p>
</div>
<div style="float:left;width:120px">
<img src="images/images/verwaltung/sperren.gif" border="0"> <input type="radio" name="verwaltung[<?php echo $c ?>]" <?php echo $checked_nein ?> value="0"> <?php echo $sprache[11] ?> <input type="radio" name="verwaltung[<?php echo $c ?>]" value="1" <?php echo $checked_ja ?> > <?php echo $sprache[10] ?>
<br>
<img src="images/images/verwaltung/ausblenden.gif" border="0"> <input type="radio" name="ausblenden[<?php echo $c ?>]" id="3" <?php echo $checkedAusgeblendetNein ?> value="0"> <?php echo $sprache[11] ?> <input type="radio" id="4" name="ausblenden[<?php echo $c ?>]" <?php echo $checkedAusgeblendetJa ?> value="1"> <?php echo $sprache[10] ?>
<br>
<img src="images/images/verwaltung/delete.gif" border="0"> <input type="checkbox" value="1" OnClick="javascript:DeleteMarkieren('<?php echo $c ?>')" id="delete_<?php echo $c ?>" name="delete[<?php echo $c ?>]"> <?php echo $sprache[10] ?>
</div>
<div style="float:left;margin-left:5px">
<b><?php echo $sprache[128] ?></b><br><br>
<div align="center" style="width:100px;border:3px solid #<?php echo $statuscolor ?>;background-color:#<?php echo $statuscolorBack ?>">
<p style="margin:0px;padding:3px">
<font size="1"><?php echo $statustext ?></font>
</p>
</div>
</div>
</div>
<div align="right" id="<?php echo $c ?>" class="titeldiv" style="float:right;display:inline;width:670px;background-color:#F1F1F0;margin-top:2px;margin-right:10px">
<div id="beitrag_anzeigen[<?php echo $c ?>]" style="cursor:pointer;display:inline;width:670px;" OnClick="javascript:Klappen('<?php echo $c ?>')">
<b><?php echo $sprache[129] ?></b>
</div>
<div id="beitrag_ausblenden[<?php echo $c ?>]" style="cursor:pointer;display:none;width:670px;" OnClick="javascript:Klappen('<?php echo $c ?>')">
<b><?php echo $sprache[137] ?></b>
</div>
</div>
<div id="hidden[<?php echo $c ?>]" id="<?php echo $c ?>" class="titeldiv" style="display:none;float:right;width:670px;background-color:#FFFFFF;margin-top:2px;margin-right:10px">
<?php echo BeitragEditierenAnzeigenVerwaltung("..",$datenkopie,$c,"admin.php") ?>
</div>
</div>
<div style="clear:both;line-height:1%;height:0px"></div>
<?php
$c++;
}
}
?>
<br><br>
</div>
<div id="menuAllesAusblenden" style="position:absolute;display:none;width:783px;border-top:1px solid #000000;z-index:1;margin-top:350px;background-color:#DCBB85">
<div align="center" style="margin-top:3px">
<div id="optionenSchliessen" style="display:block">
<?php echo SeitenzahlenAusgebenVerwaltung(10,$gesamtAnzahl,$aktuelleSeite) ?> | <a href="javascript:Optionen()" class="einfach"><b><?php echo $sprache[154] ?></b></a>
</div>
</div>
<div style="clear:both"></div>
<div style="float:left;">
<p style="margin:3px">
<b><?php echo strtoupper($sprache[138]) ?>:</b><br>
</p>
</div>
<div style="clear:both"></div>
<div style="float:left;margin-left:3px;margin-bottom:2px"><img src="images/images/verwaltung/editierenAnzeigen.gif" border="0"></div>
<div style="float:left;margin-left:3px;margin-top:2px;margin-bottom:2px">
<b><?php echo $sprache[161] ?></b>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '3')" class="einfach"><?php echo $sprache[142] ?></a>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c?>', '5')" class="einfach"><?php echo $sprache[144] ?></a>
</div>
<div style="clear:both"></div>
<div style="float:left;margin-left:3px;margin-bottom:2px"><img src="images/images/verwaltung/sperren.gif" border="0"></div>
<div style="float:left;margin-left:3px;margin-top:2px;margin-bottom:2px">
<b><?php echo $sprache[141] ?></b>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '2')" class="einfach"><?php echo $sprache[159] ?></a>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '1')" class="einfach"><?php echo $sprache[160] ?></a>
</div>
<div style="clear:both"></div>
<div style="float:left;margin-left:3px;margin-bottom:2px"><img src="images/images/verwaltung/delete.gif" border="0"></div>
<div style="float:left;margin-left:3px;margin-top:2px;margin-bottom:2px">
<b><?php echo $sprache[140] ?></b>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '0')" class="einfach"><?php echo $sprache[159] ?></a>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '4')" class="einfach"><?php echo $sprache[160] ?></a>
</div>
<div style="clear:both"></div>
<div style="float:left;margin-left:3px"><img src="images/images/verwaltung/ausblenden.gif" border="0"></div>
<div style="float:left;margin-left:3px;margin-top:2px">
<b><?php echo $sprache[139] ?></b>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '6')" class="einfach"><?php echo $sprache[159] ?></a>
<a href="javascript:MehrereFunktionen('<?php echo $start ?>', '<?php echo $c ?>', '7')" class="einfach"><?php echo $sprache[160] ?></a>
</div>
<div style="clear:both"></div>
</div>
<div id="menuAllesEinblenden" style="position:absolute;display:block;width:800px;border-top:1px solid #000000;z-index:1;margin-top:432px;background-color:#DCBB85">
<div align="center" style="margin:0px;padding:3px">
<div id="optionenAnzeigen" style="display:block">
<?php echo SeitenzahlenAusgebenVerwaltung(10,$gesamtAnzahl,$aktuelleSeite) ?> | <a href="javascript:Optionen()" class="einfach"><b><?php echo $sprache[153] ?></b></a>
</div>
</div>
</div>
<div id="menu_unten" style="position:absolute;margin-top:0px;width:800px;height:25px;background-image:url('images/symbolleisten/menu_back_unten.jpg')">
<div style="float:right;height:25px;background-image:url('images/symbolleisten/menu_back_unten_button.jpg');border-left:1px solid #83ACCA">
<div style="margin-left:10px;margin-top:7px;margin-right:10px">
<a href="javascript:document.form1.submit()" class="menu"><?php echo $sprache[130] ?></a>
</div>
</form>
</div>
</div>
<?php
}
if($do=="save_verwaltung")
{
$file=file("../Data/gb.txt");
$gesamt=count($file);
$nl=chr(13).chr(10);
$a=0;
for($a=$_GET['start'];$a<$_GET['ende'];$a++)
{
$daten=explode("|||",$file[$a]);
if($_POST['delete'][$a]==1)
{
unset($file[$a]);
}
else
{
$message=$_POST['message'][$a];
$nick=$_POST['nick'][$a];
$id=$_GET['beitrags_id'][$a];
$mail=$_POST['mail'][$a];
$page=$_POST['page'][$a];
$icq=$_POST['icq'][$a];
$msn=$_POST['msn'][$a];
$aim=$_POST['aim'][$a];
$yahoo=$_POST['yahoo'][$a];
$kommentar=$_POST['kommentar'][$a];
$zusatzfeld_1=$_POST['zusatzfeld_1'][$a];
$zusatzfeld_2=$_POST['zusatzfeld_2'][$a];
$zusatzfeld_3=$_POST['zusatzfeld_3'][$a];
$zusatzfeld_4=$_POST['zusatzfeld_4'][$a];
$skype=$_POST['skype'][$a];
$googletalk=$_POST['googletalk'][$a];
$datum=$_POST['tag'][$a].".".$_POST['monat'][$a].".".$_POST['jahr'][$a];
$zeit=$_POST['stunde'][$a].":".$_POST['minute'][$a];
if($kommentar=="")
$kommentar="-";
if($page!="" && $page!="-")
{
if(!preg_match("/^http|http$/i", $page))
{
$page="http://$page";
}
}
$message=str_replace("\n","<br>",$message);
$kommentar=str_replace("\n","<br>",$kommentar);
$daten[1]=$nick;
$daten[2]=$datum;
$daten[3]=$zeit;
$daten[4]=$mail;
$daten[5]=$page;
$daten[6]=$icq;
$daten[7]=$aim;
$daten[8]=$msn;
$daten[9]=$yahoo;
$daten[10]=$message;
$daten[11]=$kommentar;
// $daten[12]=IP
$daten[13]=$_POST['verwaltung'][$a];
// $daten[14]= MAIL VERSTECKT
$daten[15]=$zusatzfeld_1;
$daten[16]=$zusatzfeld_2;
$daten[17]=$zusatzfeld_3;
$daten[18]=$zusatzfeld_4;
//$daten[19]=BEWERTUNG
$daten[20]=$_POST['ausblenden'][$a];
$daten[20]=trim($daten[20]);
$daten[21]=$skype;
$daten[22]=$googletalk;
$file[$a]=str_replace("$file[$a]","$daten[0]|||$daten[1]|||$daten[2]|||$daten[3]|||$daten[4]|||$daten[5]|||$daten[6]|||$daten[7]|||$daten[8]|||$daten[9]|||$daten[10]|||$daten[11]|||$daten[12]|||$daten[13]|||$daten[14]|||$daten[15]|||$daten[16]|||$daten[17]|||$daten[18]|||$daten[19]|||$daten[20]|||$daten[21]|||$daten[22]",$file[$a]);
}
}
$file_neu=array();
$b=0;
$fp=fopen("../Data/gb.txt","w");
$nl=chr(13).chr(10);
for($c=0;$c<count($file);$c++)
{
$file[$c]=trim($file[$c]);
if($file[$c]!="")
{
if($c==count($file)-1)
{
fputs($fp,$file[$c]);
}
else
{
fputs($fp,$file[$c]."$nl");
}
}
}
fclose($fp);
echo"<meta http-equiv=\"refresh\" content=\"0; URL=admin.php?action=login&go=2&session_id=$session_id&start=$_GET[start]&ende=$_GET[ende]&aktuelleSeite=$_GET[aktuelleSeite]\" target=\"_top\">";
}
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"0; URL=error.php\" target=\"_top\">";
}
?>