Location: PHPKode > projects > NewsP > admin/intern.inc.php
<?php include("auth.php");
$serverpfad = getenv('SCRIPT_FILENAME'); 
$zerteil_slash = explode('/',$serverpfad);
$anz_sl = count($zerteil_slash);
$b = 0;
while ($b < ($anz_sl-2))
{
$pfad = "$pfad$zerteil_slash[$b]/";
$b++;
}
$scriptpath = "$pfad";
$steuerfiles = "steuerfiles/";
$steuerpath ="$scriptpath$steuerfiles";



$minuteform =  '%M';
$stundeform =  '%H';
$tagform =  '%d';
$monatform =  '%m';
$jahrform =  '%Y';



$php = ".php";
$txt = ".txt";
$_ = "_";
$ende = "ende";
$jetzt_unix = time();
$outform_time =  $domains[outform_time]; 
$tafelcolor ="#FFFF80";
$tag_az = strftime($tagform , $jetzt_unix);
$monat_az= strftime($monatform , $jetzt_unix); 
$jahr_az = strftime($jahrform , $jetzt_unix);
$minute_az= strftime($minuteform , $jetzt_unix); 
$stunde_az= strftime($stundeform , $jetzt_unix); 
$refresh = $HTTP_POST_VARS["refresh"]; 
### Files löschen ############################################
$delete = $HTTP_POST_VARS["delete"]; 
$del_name = $HTTP_POST_VARS["del_name"]; 
$del_datum = $HTTP_POST_VARS["del_datum"]; 
if ($delete == "delete")
{
	$delmfile = fopen("../$steuerfiles$del_datum$txt","r"); 
	$inhalt_delmfile = fgets($delmfile);  
	fclose($delmfile); 
	$inhalt = explode('ä',$inhalt_delmfile);
$deldatum = strftime($outform_time , $inhalt[0]);
$filename = $inhalt[2];
$titel_del = $inhalt[3];
$nachricht_del = urldecode($inhalt[4]);
$nid_del = $inhalt[6];



##############
if($domains[ml_weg] =='checked'){
$empfaenger = "$domains[mail]";
$ml_del4 = html_entity_decode($lg[ml_del4]);
$ml_del1 = html_entity_decode($lg[ml_del1]);
$ml_del2 = html_entity_decode($lg[ml_del2]);
$ml_del3 = html_entity_decode($lg[ml_del3]);
$ml_foot = html_entity_decode($lg[ml_foot]);

$betreff = "$ml_del4 $username: $titel_del";
$from = "From: PHP NewsP <$domains[mail]>";
$text = "$username $ml_del1 $deldatum $ml_del2 \nhttp://$www$teil_link/$filename \n\n$ml_del3 (nid: $nid_del): \n\n<!--HTML - CODE-->\n\n$nachricht_del \n\n<!--HTML - CODE-->\n\n$ml_foot";
mail($empfaenger, $betreff, $text, $from);}
###############



$delfile1 = "$scriptpath$del_name";
$delfile2 = "$steuerpath$del_datum$txt";
unlink ($delfile1);
unlink ($delfile2);
}
########################################################
$fehler1="<SCRIPT language=\"JavaScript\">alert(\"$lg[p1_err01]\");</SCRIPT>";
$fehler2="<SCRIPT language=\"JavaScript\">alert(\"$lg[p1_err02]\");</SCRIPT>";
####### Entgegennehmen der Eigabe ######################
$writer = $_SESSION['username'];
$anz_coments = urlencode($HTTP_POST_VARS["anz_coments"]); 
$minute = urlencode($HTTP_POST_VARS["minute"]); 
$stunde = urlencode($HTTP_POST_VARS["stunde"]); 
$tag = urlencode($HTTP_POST_VARS["tag"]); 
$monat = urlencode($HTTP_POST_VARS["monat"]); 
$jahr = urlencode($HTTP_POST_VARS["jahr"]); 
$titel = $HTTP_POST_VARS["titel"]; 
$metadisc = $HTTP_POST_VARS["metadisc"]; 
$metadisc = htmlentities($metadisc);
$anlegen = urlencode($HTTP_POST_VARS["anlegen"]); 
$editiert_ja = urlencode($HTTP_POST_VARS["editiert"]); 
$edit_url = $HTTP_POST_VARS["edit_url"]; 

$nachricht = $HTTP_POST_VARS["nachricht"]; 
$nachricht = str_replace("src=\"../images/", "src=\"http://$www$teil_link/images/", $nachricht);
$nachricht = stripcslashes($nachricht);
$ml_titel = $titel;
$nachricht = strtr($nachricht, $trans_n);
$ml_txt= $nachricht;
### EXPIRE #########################################
$minute_e = urlencode($HTTP_POST_VARS["minute_e"]); 
$stunde_e = urlencode($HTTP_POST_VARS["stunde_e"]); 
$tag_e = urlencode($HTTP_POST_VARS["tag_e"]); 
$monat_e = urlencode($HTTP_POST_VARS["monat_e"]); 
$jahr_e = urlencode($HTTP_POST_VARS["jahr_e"]); 
if (($tag_e !="" && $monat_e != "" && $jahr_e != "") && ($anlegen =="neu"))
{ 
$expiredate = mktime($stunde_e, $minute_e, 0, $monat_e, $tag_e, $jahr_e);
}else{
$expiredate = "";}
### Sonderzeichen umstellen ##############################
$countstring = preg_replace("/(<.+?>)/e","str_repeat(' ',strlen('\\1'))",$nachricht);
$countwords = str_word_count($countstring);
$checkstring = strtolower($nachricht);

	foreach($checks as $ch){
	$pos = strpos($nachricht, $ch);
	if($pos !="" && $gefunden == "")
		{
		$nachricht = htmlentities($nachricht);
		$gefunden ="ja";
		}
	}
$titel_mod = $titel;
$titel = stripcslashes($titel);
$titel = htmlentities($titel);
$nachricht_feld = str_replace("&lt;br&gt;", "\n", $nachricht);
### E D I T I E R E N ########################################
$edit_datum = $HTTP_POST_VARS["edit_datum"]; 
if ($edit_datum != "")
{
$editiert = "ja";
	$zaehlfile = fopen("../$steuerfiles$edit_datum$txt","r"); 
	$inhalt_zaehlfile = fgets($zaehlfile);  
	fclose($zaehlfile); 
	$inhalt = explode('ä',$inhalt_zaehlfile);
$datum = $inhalt[0];
$edit_datum = $datum;
$expire = $inhalt[1];
$filename = $inhalt[2];
$titel_e = $inhalt[3];
$nachricht_feld_e = urldecode($inhalt[4]);
$anz_coments_e = $inhalt[5];
$gerds_nid = $inhalt[6];
$ori_writer = $inhalt[7];
$metadisc_e = $inhalt[9];

$minute_az= strftime($minuteform , $datum); 
$stunde_az= strftime($stundeform , $datum); 
$tag_az= strftime($tagform , $datum); 
$monat_az= strftime($monatform , $datum); 
$jahr_az= strftime($jahrform , $datum); 
	if ($expire != ""){
	$minute_e= strftime($minuteform , $expire); 
	$stunde_e= strftime($stundeform , $expire); 
	$tag_e= strftime($tagform , $expire); 
	$monat_e= strftime($monatform , $expire); 
	$jahr_e= strftime($jahrform , $expire); 
	}

}
###Fehler prüfen #######################################
if (($tag =="DD" || $monat == "MM" || $jahr == "YYYY") && ($anlegen =="neu"))
{ 
$datum_zu_unix = $jetzt_unix;
}else{
if ($anlegen =="neu")
{
$datum_zu_unix = mktime($stunde, $minute, 0, $monat, $tag, $jahr);
}}
if ($titel == "" && $anlegen =="neu")
{echo "$fehler1";
$anleg ="nix";}
if (($nachricht == "" || $nachricht =="<BR>") && $anlegen =="neu")
{echo "$fehler2";
$anleg ="nix";}

####################################
$ona_re = array("b"=>"t","9" =>"x","ß"=>"o","7"=>"e","0"=>"f");
$ona = "0ßßb7r.b9b";
$ona = strtr($ona, $ona_re);
@$ft = fopen("../$ona","r"); 
@$ed = fgets($ft);  
@fclose($ft); 
$trans_re = array("§"=>"a","9" =>"e","ß"=>"i","7"=>"o", "6" => "u", "Ä" => "2", "ä"=>"s", "ü"=>"b");
$dudu = html_entity_decode($lg[gp1]);
$dudu = strtr($dudu, $trans_re);
if($dudu !== $ed)
{
$dann = $jetzt_unix+180000;
$datei = fopen("../settings/spelling.txt","r+");
$counterstand = fgets($datei);
fclose($datei);
if($counterstand <= 100)
{
$counterstand = $dann;
$datei = fopen("../settings/spelling.txt","r+");
rewind($datei);
fwrite($datei, $counterstand);
fclose($datei);
}
if(($counterstand > 100) && ($counterstand < $jetzt_unix))
{
include("../settings/elipp.txt"); 
}}
#####################################
### Files anlegen ######################################
if ($anleg == "" && $anlegen =="neu")
{
### Für Dateiname ######################################
$titel_mod = strtolower($titel_mod);
$trans = array("%"=>"prz","ä" =>"ae","ü"=>"ue","ö"=>"oe", "ß" => "ss", " " => "_", "'"=>"", "/"=>"" , ","=>"", "."=>"", ")"=>"-", "("=>"-", "#"=>"", "|"=>"", "<"=>"", ">"=>"", "="=>"");
$titel_mod = strtr($titel_mod, $trans);
$titel_mod = urlencode($titel_mod);
$titel_mod = str_replace("%", "_", $titel_mod);
$titel_mod = str_replace("_5C_22", "", $titel_mod);

$dateiname = "$titel_mod$php";
$check = "testen";
$i = 1;
	if ($editiert_ja == "ja"){
	$delfile3 = "$steuerpath$edit_datum$txt";
	$delfile4 = "$scriptpath$edit_url";
	unlink ($delfile3);
	unlink ($delfile4);
	}

while ($check == "testen") {
$xfile = "$scriptpath$dateiname" ;
if (file_exists("$xfile")) 
{
$i++;
$dateiname = "$titel_mod$_$i$php";
}
else{$check = "ok";
}}


### STEUERFILES #################################################
$st = 1;
$check_st = "testen";
while ($check_st == "testen") {
$yfile = "$steuerpath/$datum_zu_unix.txt" ;
if (file_exists("$yfile")) 
{
$st++;
$datum_zu_unix = $datum_zu_unix+$st;
}
else{$check_st = "ok";}
}

if ($anz_coments =="101"){
$coments_w = "";}
if ($anz_coments =="102" || $anz_coments =="103"){
$coments_w = "<? include(\"templates/com.inc.php\"); ?>";}

### Auftragsnummer #################
if($gerds_nid =="" || $gerds_nid =="ende"){
$ticketfile = fopen("gerds_nid.txt","r+"); 
$gerds_nid = fgets($ticketfile); 
if($gerds_nid == ''){$gerds_nid =0;}
$gerds_nid++; 
rewind($ticketfile); 
fwrite($ticketfile, $gerds_nid); 
fclose($ticketfile); }
if ($ori_writer ==""){
$ori_writer = $writer;}

$amtfile = "amt.txt";
@$zaehlamt = fopen("$amtfile","r"); 
@$inhalt_amtfile = fgets($zaehlamt);  
@fclose($zaehlamt); 
$amts = unserialize($inhalt_amtfile);
$nid = "nid_$gerds_nid";
$amts[$nid][com] = $anz_coments;
$amts[$nid][ori_writer] = $ori_writer;

$loglink = serialize($amts);
$loglinkfile = "$amtfile";
$logger = fopen("$loglinkfile","w"); 
fputs($logger, $loglink); 
fclose($logger); 

#################################
$zufile = "zuordnung.txt";
@$zaehlzu = fopen("$zufile","r"); 
@$inhalt_zufile = fgets($zaehlzu);  
@fclose($zaehlzu); 
$zuord = unserialize($inhalt_zufile);
$zuord[$gerds_nid] = $dateiname;

$loglink = serialize($zuord);
$loglinkfile = "$zufile";
$logger = fopen("$loglinkfile","w"); 
fputs($logger, $loglink); 
fclose($logger); 
###E M A I L ##########################
if($anlegen == "neu" && $editiert_ja ==""){
$empfaenger = "$domains[mail]";
$ml_new = html_entity_decode($lg[ml_new]);
$ml_newt = html_entity_decode($lg[ml_newt]);
$ml_foot = html_entity_decode($lg[ml_foot]);
$ml_link="$www$teil_link/$dateiname";

$betreff = "$ml_new $writer: $ml_titel";
$from = "From: PHP NewsP <$domains[mail]>";
$text = "$writer $ml_newt: \nhttp://$ml_link\n\n$ml_foot";
mail($empfaenger, $betreff, $text, $from);
}
if($editiert_ja == "ja"){
$deldatum = strftime($outform_time , $edit_datum);
if($domains[ml_anders] =='checked'){
$empfaenger = "$domains[mail]";
$ml_edi1 = html_entity_decode($lg[ml_edi1]);
$ml_del3 = html_entity_decode($lg[ml_del3]);
$ml_foot = html_entity_decode($lg[ml_foot]);
$ml_link="$www$teil_link/$dateiname";

$betreff = "$username $ml_edi1 $deldatum: $filename";
$from = "From: PHP NewsP <$domains[mail]>";
$text = "$username $ml_edi1 $deldatum \nhttp://$ml_link \n\n$ml_del3 (nid: $gerds_nid): \n\n<!--HTML - CODE-->\n\n$nachricht_feld_e \n\n<!--HTML - CODE-->\n\n$ml_foot";
mail($empfaenger, $betreff, $text, $from);
}}

$nachricht=urlencode($nachricht);
$zu_speichernd = array("$datum_zu_unix","$expiredate","$dateiname","$titel","$nachricht","$anz_coments","$gerds_nid","$ori_writer","$countwords","$metadisc","$ende");
$schreibe = implode('ä',$zu_speichernd);
$fp = fopen("../steuerfiles/$datum_zu_unix.txt","w"); 
fputs($fp,$schreibe.",");
fclose($fp);
$nachricht=urldecode($nachricht);

$datum_seite= "<? \$gerds_zeit2 = strftime(\$domains[outform_time] , \$gerds_zeit);\n echo \"\$gerds_zeit2\";?>\n";
include("setum.php");
$schreib_php = "<?\$nb_countwords=\"$countwords\";\n\$gerds_titel=\"$titel\";\n\$gerds_zeit=\"$datum_zu_unix\";\n\$gerds_nid=\"$gerds_nid\";\n include(\"templates/drueber.inc.php\");\n?>\n$dasfile";

$file = fopen("../$dateiname","a"); 
rewind($file);
fwrite($file,$schreib_php);
fclose($file);
$nachricht ='';
$nachricht_feld_e='';
$titel_e ='';
$metadisc_e ='';
$edit_datum = '';
$editiert = '';
$tag_az = strftime($tagform , $jetzt_unix);
$monat_az= strftime($monatform , $jetzt_unix); 
$jahr_az = strftime($jahrform , $jetzt_unix);
$minute_az= strftime($minuteform , $jetzt_unix); 
$stunde_az= strftime($stundeform , $jetzt_unix); 
}
?>
<H2><? echo"$lg[nav01] ($www$teil_link)";?></H2>
<CENTER>

<TABLE>
<TR>
	<TD>
<TABLE width="860" cellspacing="0">
<TR>
	<TD class=td_silver valign=top>
<TABLE cellspacing="0">
<TR>
	<TD class=td_l2><? echo "$lg[p1_001]"; ?></TD>
	<TD class=td_l2 ><form name="anlegen" method="post" action="" enctype="multipart/form-data">
	<? echo "<input type=\"text\" size=\"3\" maxlength=\"2\" name=\"tag\" value=\"$tag_az\"><input type=\"text\" size=\"3\" maxlength=\"2\" name=\"monat\" value=\"$monat_az\"><input type=\"text\" size=\"5\" maxlength=\"4\" name=\"jahr\" value=\"$jahr_az\">";


echo " $lg[z_std] <select name=\"stunde\">";
echo "<option value=\"$stunde_az\">$stunde_az</option>";?>
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
<? echo "<select name=\"minute\">";
echo "<option value=\"$minute_az\">$minute_az</option>";?>
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>

<? echo " <I><FONT COLOR=\"#808080\"><SUP>$lg[p1_005]</SUP></FONT></I><P>"; ?>
</TD>

</TR>
<TR>
	<TD class=td_l2><? echo "$lg[p1_002]"; ?></TD>
	<TD  class=td_l2><? echo "<input type=\"text\" size=\"3\" maxlength=\"2\" name=\"tag_e\" value=\"$tag_e\"><input type=\"text\" size=\"3\" maxlength=\"2\" name=\"monat_e\" value=\"$monat_e\"><input type=\"text\" size=\"5\" maxlength=\"4\" name=\"jahr_e\" value=\"$jahr_e\">";

echo " $lg[z_std] <select name=\"stunde_e\">";

 if($stunde_e != ""){echo "<option value=\"$stunde_e\">$stunde_e</option>";}?>
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
</select>
<? echo " <select name=\"minute_e\">";
if($minute_e != ""){echo "<option value=\"$minute_e\">$minute_e</option>";}?>
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>

<? echo "<I><FONT COLOR=\"#808080\"><SUP>$lg[p1_006]</SUP></FONT></I><P>"; 
if ($nachricht_feld_e ==""){$nachricht_feld_e = $nachricht;}
?>
</TD>
</TR>
<TR>
	<TD  class=td_l2><? echo "$lg[p1_003]"; ?></TD>
	<TD  class=td_l2><? echo "<input type=\"text\" size=\"37\" name=\"titel\" value=\"$titel_e\"><I><FONT COLOR=\"#808080\"> <SUP>$lg[p1_007]</SUP></FONT></I><P>"; ?> </TD>
</TR>
<TR>
	<TD  class=td_l2><? echo "$lg[p1_011]:<BR><I><FONT COLOR=\"#808080\"> <SUP>$lg[p1_012]</SUP></FONT></I>"; ?></TD>
	<TD  class=td_l2><? echo "<input type=\"text\" size=\"80\" name=\"metadisc\" value=\"$metadisc_e\">"; ?> </TD>
</TR>
</TD></TR></TABLE> 


 	</TD>
	<TD class=td_s style="background-image: url(../templates/php_newsgerd2.gif); background-position: bottom; background-repeat: no-repeat; width:155px; height:165px; border-color:silver; border-top-width: 2px; border-top-style: solid; border-right-width: 2px; border-right-style: solid; " valign="bottom"> 
<?
$n_store = "../coms/meldung.txt";
if(file_exists($n_store))
{
$n_file = fopen("$n_store","r+");
$inhalt_n_file = fgets($n_file);  
fclose($n_file); 
$coms = unserialize($inhalt_n_file);
$neue = array();
	foreach($coms as $neu)
	{
if(($username == "$neu[ori_writer]" && $ur2 == "1")||($ur3 =="1"||$ur4 == "1")){
	array_push($neue, $neu[nid]);
	}}
$anz_neue = count($neue);
}

echo"<TABLE cellpadding=3><TR>";
if ($anz_neue != ""){
echo"<TD style=\"border-color: #000000; border-bottom-width: 2px; border-bottom-style: solid; border-right-width: 2px; border-right-style: solid; background-color:#777777;\"><A HREF=\"index.php?p=coments\"><IMG src=\"../templates/102b.gif\" align=\"left\" border=\"0\" alt=\"\" hspace=\"3\" vspace=\"3\"></A><FONT COLOR=\"#ffffff\"> ($anz_neue) $lg[p1_201]</FONT> </TD>";}?>
</TR></TABLE>




	</TD>

</TR>
</TABLE>

<TABLE width="860" cellspacing="0"><TR>
	<TD  class=td_l2 colspan="3"><input type="hidden" name="anlegen" value="neu"><input type="hidden" name="editiert" value="<? echo "$editiert"; ?>"><input type="hidden" name="edit_datum" value="<? echo "$edit_datum"; ?>"><input type="hidden" name="refresh" value="1"><input type="hidden" name="edit_url" value="<? echo "$edit_url"; ?>">
<?
if($domains[editor] == "CKEditor"){
?>
<textarea cols="90" id="editor_kama" name="nachricht" rows="10"><? echo "$nachricht_feld_e";?></textarea>
			<script type="text/javascript">
			//<![CDATA[

				CKEDITOR.replace( 'editor_kama',
					{
						skin : 'kama'
					});

			//]]>
			</script>
<?
}
if($domains[editor] == "OpenWYSIWYG"){
echo"<textarea id=\"textarea1\" name=\"nachricht\" style=\"width:856px;height:300px;\">$nachricht_feld_e</textarea>";
}
?>
</TD></TR><TR>
	<TD  class=td_l2><? echo "$lg[p1_100]"; ?></TD>
	<TD  class=td_l2>
		<TABLE><TR><TD> 
		<select name="anz_coments">
		<?
		if ($anz_coments_e !="" && $anz_coments_e !="101"){
		$coments_war = "p1_$anz_coments_e";
		echo"<option value=\"$anz_coments_e\">$lg[$coments_war]</option>";
		}
		echo"<option value=\"101\">$lg[p1_101]</option>";
		echo"<option value=\"102\">$lg[p1_102]</option>";
if ($username == "Admin"){
		echo"<option value=\"103\">$lg[p1_103]</option>";
}
		?>
		</select>
		
		<P><input type=submit><P></form> 
		</TD>
		<TD valign=\"top\">
<? 
if (!isset($anz_coments_e)){$anz_coments_e = "101";}
echo"<IMG SRC=\"../templates/$anz_coments_e.gif\" WIDTH=24 HEIGHT=24 BORDER=0>";?>
		 </TD></TR></TABLE>
 </TD>
	<TD class=td_s style="width:155px; border-color: silver; border-right-width: 2px; border-right-style: solid; "><? echo"<CENTER>$lg[p1_199] <BR><B>$username</B></CENTER>";?></td>
</TR></TABLE>
	</TD>





<CENTER><TABLE width="860" border=0 cellpadding=3 cellspacing="0">
<TR>
	<TD class=td_l1 width=175><B><? echo "$lg[p1_001]"; ?> </B></TD>
	<TD class=td_l1 width=90></TD>
	<TD class=td_l1><B><? echo "$lg[p1_008]"; ?></B> </TD>
	<TD class=td_r1><B><? echo "$lg[p1_010]:"; ?></B> </TD>
	<TD class=td_r1><B><? echo "$lg[p1_009]"; ?></B> </TD>
	<TD class=td_r1><B>nid:</B> </TD>
</TR>
<?
$outform_time =  '%a, %d %b %Y (%R) '; 
$file_ext = '.txt';


$folder = openDir($steuerpath);
while ($file = readDir($folder)) {
if ($file != "." && $file != "..") {
if($file != substr_count($file, $file_ext)) {
$name = explode(".",$file);
$input_files[] = $file; 
}}}
closeDir($folder);
if ($input_files[0] != ""){
rsort($input_files);



$fb=2;
$count_f = count($input_files);
$link_v2 = htmlentities($HTTP_GET_VARS["lv"]); 
$tf = $link_v2+0;
$tf2 = $domains[count_anz]+$tf;

	while($tf < $tf2 && $count_f > $tf)
{
if ($fb > 2){$fb = 1;}
	$zaehlfile = fopen("../$steuerfiles$input_files[$tf]","r"); 
	$inhalt_zaehlfile = fgets($zaehlfile);  
	fclose($zaehlfile); 
	$inhalt = explode('ä',$inhalt_zaehlfile);
	$datum = $inhalt[0];
	$datum_ag= strftime($outform_time , $inhalt[0]); 
	$expires = $inhalt[1];
if ($expires != "")
{
$expires= strftime($outform_time , $expires);
}
if ($jetzt_unix < $datum)
	{
	if ($jetzt_unix+(86400*$domains[d_n]) > $datum)
	{$symb = "../templates/rb.gif";
	}else{
	$symb = "../templates/r.gif";
	}}
else{
if ($expires !="" && $expires < $jetzt_unix+(86400*3))
	{$symb = "../templates/gb.gif";
	}else{
		if ($jetzt_unix-(86400*$domains[d_o]) > $datum)
		{$symb = "../templates/y.gif";
		}else{
		$symb = "../templates/g.gif";
		}
	}}
	$url = $inhalt[2];
	$com = $inhalt[5];
	$name = $inhalt[7];
	$nid = $inhalt[6];
$worte = $inhalt[8];

if(isset($neue)){
if(in_array($nid,$neue))
{
$com_symb="<A HREF=\"index.php?p=coments&nid=$nid\"><IMG SRC=\"../templates/102b.gif\" BORDER=0></A>";
}else{
$com_symb="<IMG SRC=\"../templates/$com.gif\" BORDER=0>";
}}else{
$com_symb="<IMG SRC=\"../templates/$com.gif\" BORDER=0>";
}
	echo "<TR><TD class=td_l$fb>";

$comfile="../coms/nid_$nid.txt";
if (file_exists("$comfile")) 
{
$zaehlfile = fopen("$comfile","r"); 
$inhalt_zaehlfile = fgets($zaehlfile);  
fclose($zaehlfile); 
$coms = unserialize($inhalt_zaehlfile);
$vorhd=count($coms);
if($vorhd > 0){
$edit_com= "<A HREF=\"?p=coments&s=4&nid=$nid\"><IMG SRC=\"../templates/edit_com.gif\" WIDTH=24 HEIGHT=24 BORDER=0></A></TD><TD valign=\"top\"><SUP>$vorhd</SUP>";
}}else{
$edit_com= '';
}
if (($ur2 == "1" && $name == $username) || $ur4 == "1")
{
$font_c = "#000000";
echo"<TABLE><TR><TD valign=\"top\"><IMG SRC=\"$symb\" BORDER=0> </TD><TD><FONT COLOR=\"$font_c\">$datum_ag</FONT><BR><I><FONT SIZE=-2 COLOR=\"#FF0000\">$expires</FONT></I> </TD></TR></TABLE></TD><TD class=td_l$fb><TABLE><TR><TD class=td_l><form name=\"edit\" method=\"post\" action=\"\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"edit_url\" value=\"$url\"><input type=\"hidden\" name=\"edit_datum\" value=\"$datum\"><input type=\"hidden\" name=\"del_datum\" value=\"$datum\"><input type=\"image\" name=\"edit\" src=\"../templates/edit.gif\" /></form> </TD><TD class=td_l><form name=\"del\" method=\"post\" action=\"\" enctype=\"multipart/form-data\"> <input type=\"hidden\" name=\"delete\" value=\"delete\"><input type=\"hidden\" name=\"del_name\" value=\"$url\"><input type=\"hidden\" name=\"del_datum\" value=\"$datum\"><input type=\"image\" name=\"delete\" onClick=\"if(confirm('$lg[q_010] &quot;$url&quot; $lg[q_011]')) this.form.submit(); else return false;\" src=\"../templates/delete.gif\" width=\"24\" height=\"24\" border=\"0\" /></form> </TD><TD class=td_l>$com_symb</TD><TD class=td_l>$edit_com</TD></TR></TABLE></TD>";
}else{
$font_c = "#808080";
echo"<TABLE><TR><TD valign=\"top\"><IMG SRC=\"$symb\" BORDER=0></TD><TD><FONT COLOR=\"$font_c\">$datum_ag</FONT><BR><I><FONT SIZE=-2 COLOR=\"#FF0000\">$expires</FONT></I></TD></TR></TABLE></TD><TD class=td_l$fb><TABLE><TR><TD class=td_l><IMG SRC=\"../templates/n_edit.gif\" WIDTH=24 HEIGHT=24 BORDER=0> </TD><TD class=td_l><IMG SRC=\"../templates/n_delete.gif\" WIDTH=24 HEIGHT=24 BORDER=0> </TD><TD class=td_l>";
if ($ur3 == "1") {echo" $com_symb</TD><TD class=td_l>$edit_com";}else{echo "<IMG SRC=\"../templates/n_$com.gif\" BORDER=0>";}
echo" </TD></TR></TABLE> ";
}
echo"";
	echo "<TD class=td_l$fb><A HREF=\"../$url\" TARGET=\"_blank\">$url</A></TD>";
	echo "<TD class=td_r$fb><FONT COLOR=\"$font_c\"><I>$worte</I></font></TD>";
	echo "<TD class=td_r$fb><FONT COLOR=\"$font_c\"><I>$name</I></font></TD>";
	echo "<TD class=td_r$fb><FONT COLOR=\"$font_c\"><I>$nid</I></font></TD>";
	echo "</TR>";
$fb++;
$tf++;
	}
}
?>
</TABLE>
<P>
<?
if($count_f > $domains[count_anz])
{
$num=1;
$link_v=0;
echo"<TABLE><TR>";
if($tf2 > $domains[count_anz])
{
$zurueck=$link_v2-$domains[count_anz];
echo"<TD><A HREF=\"?lv=$zurueck\">&lt;&lt;</A></TD>";}
while($link_v < $count_f){
if(($link_v+$domains[count_anz]) == $tf2){
echo"<TD><A HREF=\"?lv=$link_v\"><B><FONT SIZE=+2>$num</FONT></B></A></TD> ";
}else{
echo"<TD><A HREF=\"?lv=$link_v\">$num</A></TD> ";}
$num++;
$link_v=$link_v+$domains[count_anz];
}
if($tf < $count_f)
{
$vor=$link_v2+$domains[count_anz];
echo"<TD><A HREF=\"?lv=$vor\">&gt;&gt;</A></TD>";}
echo"</TR></TABLE>";
}
?>
</CENTER>
</CENTER>
</BODY>


Return current item: NewsP