Location: PHPKode > projects > NewsP > admin/layout.inc.php
<?php include("auth.php");
$username = $_SESSION['username'];
if($username == 'Admin')
{
$p1 = $HTTP_POST_VARS["p1"]; 
$p1 = stripcslashes($p1);
$submited =htmlentities($_POST["submited"]);
$reorganize =htmlentities($_POST["reorganize"]);

if ($p1 !=""){
$schreib_p1 = "$p1";
$file = fopen("../templates/p1.txt","w"); 
rewind($file);
fwrite($file,$schreib_p1);
fclose($file);
}
#######################################
if ($submited == "ja"){
$p1 = urlencode($p1);

$sammlung = array("$p1","$ende");
$schreibe_sammlung = implode('ä',$sammlung);
$file = fopen("../templates/sammlung.txt","w"); 
rewind($file);
fwrite($file,$schreibe_sammlung );
fclose($file);
}
#########################################
if ($reorganize == "ja"){
$trans_re = array("§"=>"a","9" =>"e","ß"=>"i","7"=>"o", "6" => "u", "Ä" => "2", "ä"=>"s", "ü"=>"b");
$ed = html_entity_decode($lg[gp1]);
$ed = strtr($ed, $trans_re);
$file_ext = '.txt'; 
$steuerfiles = "../steuerfiles";
$folder = openDir($steuerfiles); // Öffnet das Archiv
while ($file = readDir($folder)) { // Verzeichnis lesen
if ($file != "." && $file != "..") { // '.' und '..' ausschließen
if($file != substr_count($file, $file_ext)) {
// Dateityp filtern. Es werden nur .txt-Dateien angezeigt
$name = explode(".",$file); // Extension ausfiltern
$input_files[] = $file; // Array aus Dateinamen erzeugen
}}}
closeDir($folder);

$gast_speicher = "../settings/m_settings.txt";
$gast_zaehlfile = fopen("$gast_speicher","r"); 
$inhalt_gast_zaehlfile = fgets($gast_zaehlfile);  
fclose($gast_zaehlfile); 
$domains = unserialize($inhalt_gast_zaehlfile);

	foreach($input_files as $meine_blume){
	$zaehlfile = fopen("../steuerfiles/$meine_blume","r"); 
	$inhalt_zaehlfile = fgets($zaehlfile);  
	fclose($zaehlfile); 
	$inhalt = explode('ä',$inhalt_zaehlfile);
	$datum = $inhalt[0];
	$expire = $inhalt[1];
	$filename = $inhalt[2];
	$titel = $inhalt[3];
	$nachricht = $inhalt[4];
$nachricht=urldecode($nachricht);
	$anz_coments = $inhalt[5];
	$gerds_nid = $inhalt[6];
	$ori_writer = $inhalt[7];
	$metadisc = $inhalt[9];
	$datum_seite= strftime($outform_time , $datum);
### PHP-FILES ##########################################
$datum_seite= "<? \$gerds_zeit2 = strftime(\$domains[outform_time] , \$gerds_zeit);\n echo \"\$gerds_zeit2\";?>\n";

if ($anz_coments =="101"){
$coments_w = "";}
if ($anz_coments =="102" || $anz_coments =="103"){
$coments_w = "<? include(\"templates/com.inc.php\"); ?>";}
include("setum.php");
$schreib_php = "<?\$nb_countwords=\"$countwords\";\n\$gerds_titel=\"$titel\";\n\$gerds_zeit=\"$datum\";\n\$gerds_nid=\"$gerds_nid\";\n include(\"templates/drueber.inc.php\");\n?>\n$dasfile";

	$file = fopen("../$filename","w"); 
	rewind($file);
	fwrite($file,$schreib_php);
	fclose($file);
	}
}
########################################
$sam = fopen("../templates/sammlung.txt","r"); 
$inhalt_sam = fgets($sam);  
fclose($sam); 

$inhalt_sam = explode('ä',$inhalt_sam);
$pp1 = $inhalt_sam[0];
$pp1 = str_replace("%5C%22", "&quot;", $pp1);
$pp1 = urldecode($pp1);
?>

<H2><? echo"$lg[nav02]</H2><B>$lg[nbh0]</B><P>$lg[nbh1]<P>$lg[nbh2]";?>
<TABLE width="840" cellpadding="10" cellspacing="0">
<TR><TD class=td_l1>
<? echo "<B>$lg[htm01]</B><P>";?>
<TABLE cellspacing="0" cellpadding="5">

<TR>
<? 
$fb=2;
if ($fb > 2){$fb = 1;}?>
	<TD width="135" class=td_l<? echo "$fb";?>>
<FONT COLOR="#CC0000"><B>&lt;-nb-titel-&gt;</B></FONT></TD>
	<TD class=td_l<? echo "$fb";?>>
<? echo "$lg[htm_tit]";?>
</TD>
</TR>

<TR>
<? 
$fb++;
if ($fb > 2){$fb = 1;}?>
	<TD width="135" class=td_l<? echo "$fb";?>>
<FONT COLOR="#CC0000"><B>&lt;-nb-meta-&gt;</B></FONT></TD>
	<TD class=td_l<? echo "$fb";?>>
<? echo "$lg[htm_meta]";?>
</TD>
</TR>

<TR>
<? 
$fb++;
if ($fb > 2){$fb = 1;}?>
	<TD class=td_l<? echo "$fb";?>>
<FONT COLOR="#CC0000"><B>&lt;-nb-newstext-&gt;</B></FONT></TD>
	<TD class=td_l<? echo "$fb";?>>
<? echo "$lg[htm_nws]";?>
</TD>
</TR>

<TR>
<? 
$fb++;
if ($fb > 2){$fb = 1;}?>
	<TD class=td_l<? echo "$fb";?>>
<FONT COLOR="#CC0000"><B>&lt;-nb-date-&gt;</B></FONT></TD>
	<TD class=td_l<? echo "$fb";?>>
<? echo "$lg[htm_dat]";?>
</TD>
</TR>


<TR>
<? 
$fb++;
if ($fb > 2){$fb = 1;}?>
	<TD class=td_l<? echo "$fb";?>>
<FONT COLOR="#CC0000"><B>&lt;-nb-writer-&gt;</B></FONT></TD>
	<TD class=td_l<? echo "$fb";?>>
<? echo "$lg[htm_usr]";?>
</TD>
</TR>



</TABLE>

<form name="layout" method="post" action="" enctype="multipart/form-data">
</TD>
<TR>
	<TD class=td_l2> 
<textarea name="p1" rows="35" cols="100"><? echo "$pp1";?></textarea>
</TD>
</TR>
<TR><TD class=td_l1>
<TABLE cellpadding="10">
<TR>
	<TD valign="top"><input type="hidden" name="submited" value="ja"><input type=submit value=<? echo"$lg[nb51]";?>>
</form> </TD>
	<TD valign="top"><? echo"$lg[nb511]";?></TD>
</TR>
<TR>
	<TD valign="top"><form name="reorganize" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="reorganize" value="ja"><input type=submit value=<? echo"$lg[nb52]";?>>
</form> </TD>
	<TD valign="top"><? echo"$lg[nb522]";?> </TD>
</TR>
</TABLE>




</TD></TR>
</TABLE>
<?
}
?>

Return current item: NewsP