You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
252 lines
9.8 KiB
PHP
252 lines
9.8 KiB
PHP
<?php
|
|
//
|
|
// Anfang: Start Session und Inits
|
|
//
|
|
|
|
session_start();
|
|
|
|
include "include/funktions_inc.php";
|
|
include "include/sysvariable_inc.php";
|
|
|
|
if( !$_COOKIE[$sys_projektname."Admin"] ){
|
|
echo '<head>';
|
|
echo '<meta http-equiv="refresh" content="0; URL=index.php">';
|
|
echo "</head>";
|
|
exit;
|
|
}
|
|
$sys_admin = $_COOKIE[$sys_projektname."Sprache"];
|
|
|
|
if( !$_COOKIE[$sys_projektname."Admin"] ){
|
|
echo '<head>';
|
|
echo '<meta http-equiv="refresh" content="0; URL=index.php">';
|
|
echo "</head>";
|
|
exit;
|
|
}
|
|
$sys_sprache = $_COOKIE[$sys_projektname."Sprache"];
|
|
|
|
include "include/navigation_data.php";
|
|
include "include/geteditor_inc.php";
|
|
include "include/setnavcookie_inc.php";
|
|
|
|
if ($sys_path_editor == '' and $sys_path_xmleditor == ''){
|
|
echo '<head>';
|
|
echo '<meta http-equiv="refresh" content="2; URL=index.php">';
|
|
echo "</head>";
|
|
echo "<big><b> Kein Editor gefunden </b></big>";
|
|
exit;
|
|
}
|
|
?>
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>XmlEditor</title>
|
|
<style type="text/css">
|
|
a:link { text-decoration:underline; font-weight:bold; color:#200000; }
|
|
a:visited { text-decoration:underline; font-weight:bold; color:#200000; }
|
|
a:hover { text-decoration:underline; font-weight:bold; background-color:#fff; }
|
|
a:active { text-decoration:underline; font-weight:bold; background-color:#fff; }
|
|
a:focus { text-decoration:underline; font-weight:bold; background-color:#fff; }
|
|
</style>
|
|
</head>
|
|
<?php
|
|
if ($_an != ''){
|
|
echo "<body onload=\"location.hash='".$_an."'\">";
|
|
}
|
|
else{
|
|
echo '<body>';
|
|
}
|
|
?>
|
|
<center>
|
|
<?php
|
|
echo '<br><a href="';
|
|
HtmlHref(sprintf($edit_string,$sys_path_editor,'',$sys_path.'include/navigation_data.php',$sys_path_batch,'','',''));
|
|
echo '">'."Edit Navigations Menü</a><br>\n";
|
|
echo '<br><a href="';
|
|
HtmlHref(sprintf($edit_string,'explorer','',$sys_path_html,$sys_path_batch,'','',''));
|
|
echo '">Verzeichniss <i>'.$sys_path_html."</i> öffen</a><br>\n";
|
|
echo '<br><a href="';
|
|
HtmlHref(sprintf($edit_string,'explorer','',$sys_path_info,$sys_path_batch,'','',''));
|
|
echo '">Verzeichniss <i>'.$sys_path_info."</i> öffen</a><br>\n";
|
|
echo '<br><a href="';
|
|
HtmlHref(sprintf($edit_string,'explorer','',$sys_path_xml,$sys_path_batch,'','',''));
|
|
echo '">Verzeichniss <i>'.$sys_path_xml."</i> öffen</a><br><br>\n";
|
|
|
|
/*
|
|
$array_count = count($_SESSION["lastedit"]);
|
|
echo ":a:".$array_count.":a:<br>\n";
|
|
for($y=0; $y<$array_count; $y++) {
|
|
echo"::".$_SESSION["lastedit"][$y]."::<br>\n";
|
|
echo"::".$_SESSION["deledit"][$y]."::<br>\n";
|
|
}
|
|
*/
|
|
|
|
?>
|
|
|
|
|
|
<a href="index.php">Zurück zur Doku</a><br><br>
|
|
<p><span <?php echo GetEditColour('','','gruen'); ?>>Grün</span> unterlegete Felder sind Filenamen, die es als Files noch nicht gibt,<br>
|
|
aber im Menü (navigations_data) schon eingetragen sind.</p>
|
|
<p><span <?php echo GetEditColour('','','rot'); ?>>Rot</span> unterlegete Felder sind Filenamen, die es als Files nicht gegeben hat,<br>
|
|
aber durch Edit neu erstellt worden sind.</p>
|
|
<p><p><span <?php echo GetEditColour('','','blau'); ?>>Blau</span> unterlegete Felder sind Filenamen, die es als Files schon gegeben hat,<br>
|
|
und durch Edit neu geändert worden sind.</p><br>
|
|
|
|
<p><p><span style="background-color: rgb(255,20,20); color: rgb(255, 255, 255);">Achtung, durch <i>Restart Session</i> werden alle Farben dieser Liste resetet.</span></p><br>
|
|
<br>
|
|
<big><b>
|
|
<a href="indexx.php?oa=o">Alle Untermenüs öffnen<a> -
|
|
<a href="indexx.php?oa=c">Alle Untermenüs schießen<a>
|
|
</big></b>
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<table style= "text-align: center; width: 80%;" border="5">
|
|
<tr style="background-color: rgb(110, 110, 110);">
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Keyname</span></big></big></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Menüname</span></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Htmfile</span></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Xmlfiles</span></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Rtffiles</span></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">Infofile</span></th>
|
|
<th><big><big><span style="color: rgb(255, 255, 255);">JumpToButton</span></th>
|
|
</tr>
|
|
<?php
|
|
$ank = 0;
|
|
$ankername = "top";
|
|
reset($navigation);
|
|
while (list ($nKey,list($ntxt,$nhtml,$ninfo,$nfunkt)) = each ($navigation)) {
|
|
if( $nKey[0] == '*' or $nKey[0] == '$'){
|
|
$ankername = "anker".$ank++;
|
|
echo '<tr style="background-color: rgb(160, 160, 160);"'.">\n<th>".$nKey.'<a name="'.$ankername.'"></a>'.'</th><th>'.
|
|
'<a href="' . HtmlHref($_self . '?an=' . $ankername . '&mu=' . $nKey) . '">' . HtmlText($ntxt) .
|
|
"</th><th>"."</th><th>"."</th><th>"."</th><th>"."</th><th>"."</th>\n</tr>\n";
|
|
$last_nKey = $nKey;
|
|
}
|
|
// Wenn Überschrift dann auf entsprechenede Seite verweisen
|
|
else if ($aufklapp[$last_nKey] or $last_nKey == ''){
|
|
if ($nKey[0] != "*"){
|
|
if ($nfunkt == ''){
|
|
echo "<tr>\n".'<th style="background-color: rgb(200, 200, 200);">'.HtmlText($nKey)."</th>".
|
|
'<th style="background-color: rgb(210, 210, 210);">'.HtmlText($ntxt)."</th><th";
|
|
if ($nhtml != '' and $sys_path_editor != ''){
|
|
echo GetEditColour($sys_path_html,$nhtml,'').'><a href="';
|
|
HtmlHref(sprintf($edit_string,$sys_path_editor,'',$sys_path_html."/".$nhtml,$sys_path_batch,$ankername,$nhtml,GetExists($sys_path_html,$nhtml)));
|
|
echo '">' . HtmlText($nhtml) . "</a>";
|
|
}
|
|
else{
|
|
echo '>';
|
|
}
|
|
echo "</th>\n<th";
|
|
// xml files anbieten
|
|
if ($nhtml != '' and $sys_path_xmleditor != '' and file_exists($verz_html.'/'.$nhtml)){
|
|
if ($lfile = fopen($verz_html.'/'.$nhtml, 'r')){
|
|
echo '><table style="text-align: center; width: 450px;" border = "8"';
|
|
while (!feof ($lfile)){
|
|
$line = trim(fgets ($lfile, 4096));
|
|
$i = 0;
|
|
while ((strpos($line,'<!xml=') !== false )){
|
|
// auf erstes Zeichen und letztes Zeichen positionieren
|
|
$param_start_pos = strpos($line,'<!xml=') + 6;
|
|
$param_ende_pos = strpos($line,'>',$param_start_pos);
|
|
|
|
// kompletten block bis abschliessendem '>' ausschneiden
|
|
$param_block = substr($line, $param_start_pos, $param_ende_pos - $param_start_pos);
|
|
$line = str_replace("<!xml=$param_block>", '', $line);
|
|
|
|
// Parameter splitten
|
|
list($xml_filename, $xsl_filename) = split(',',$param_block);
|
|
|
|
// Parameter 1 = Filename zum XML file, extension wird geadded wenn fehlt
|
|
if( strpos($xml_filename,".xml") == FALSE )
|
|
$xml_filename .= ".xml";
|
|
|
|
// Parameter 2 = Filename XSL File, wenn fehlt, dann aus XML Filenamen generieren
|
|
if ($xsl_filename == ''){
|
|
$xsl_filename = str_replace( ".xml", ".xsl", $xml_filename);
|
|
}
|
|
|
|
// Extention test , für xsl
|
|
if( strpos($xsl_filename,".xsl") == FALSE )
|
|
$xsl_filename .= ".xsl";
|
|
|
|
echo '><tr><th '.substr(GetEditColour($sys_path_xml,$xml_filename,''),0,-1). ' width: 50%;"><a href="'.
|
|
HtmlHref(sprintf($edit_string,$sys_path_xmleditor,$navpos,$sys_path_xml."/".$xml_filename,$sys_path_batch,$ankername,$xml_filename,GetExists($sys_path_xml,$xml_filename))).
|
|
'">'.HtmlText($xml_filename).'</a> '."\n".
|
|
'</th><th '.GetEditColour($sys_path_xml,$xsl_filename,''). '>'.
|
|
'<a href="'.
|
|
HtmlHref(sprintf($edit_string,$sys_path_xmleditor,$navpos,$sys_path_xml."/".$xsl_filename,$sys_path_batch,$ankername,$xsl_filename,GetExists($sys_path_xml,$xsl_filename))).
|
|
'">'.HtmlText($xsl_filename).'</a> '."\n".
|
|
'</th></tr';
|
|
if ($i++ > 10){
|
|
echo "ACHTUNG TAGFEHLER STELLE xml\n";
|
|
exit; // Notaustieg bei falschem tag
|
|
}
|
|
}
|
|
}
|
|
echo '></table';
|
|
}
|
|
}
|
|
echo "></th>\n<th";
|
|
// rtf files anbieten
|
|
if ($nhtml != '' and $sys_path_rtfeditor != '' and file_exists($verz_html.'/'.$nhtml)){
|
|
if ($lfile = fopen($verz_html.'/'.$nhtml, 'r')){
|
|
echo '><table style="text-align: center; width: 250px;" border = "8"';
|
|
while (!feof ($lfile)){
|
|
$line = trim(fgets ($lfile, 4096));
|
|
$i = 0;
|
|
while ((strpos($line,'<!rtf=') !== false )){
|
|
// auf erstes Zeichen und letztes Zeichen positionieren
|
|
$param_start_pos = strpos($line,'<!rtf=') + 6;
|
|
$param_ende_pos = strpos($line,'>',$param_start_pos);
|
|
|
|
// kompletten block bis abschliessendem '>' ausschneiden
|
|
$param_block = substr($line, $param_start_pos, $param_ende_pos - $param_start_pos);
|
|
$line = str_replace("<!rtf=$param_block>", '', $line);
|
|
|
|
// Parameter splitten
|
|
$rtf_filename = $param_block;
|
|
|
|
// Extension wird geadded wenn fehlt
|
|
if( strpos($rtf_filename,".rtf") == FALSE ){
|
|
$rtf_filename .= ".rtf";
|
|
}
|
|
|
|
echo '><tr><th '.substr(GetEditColour($sys_path_rtf,$rtf_filename,''),0,-1). ' width: 50%;"><a href="'.
|
|
HtmlHref(sprintf($edit_string,$sys_path_rtfeditor,$navpos,$sys_path_rtf."/".$rtf_filename,$sys_path_batch,$ankername,$rtf_filename,GetExists($sys_path_rtf,$rtf_filename))).
|
|
'">'.HtmlText($rtf_filename).'</a> '."\n".
|
|
'</th></tr';
|
|
if ($i++ > 10){
|
|
echo "ACHTUNG TAGFEHLER STELLE rtf\n";
|
|
exit; // Notaustieg bei falschem tag
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
echo '></table';
|
|
}
|
|
|
|
echo "></th>\n<th";
|
|
if ($ninfo != '' and $sys_path_editor != ''){
|
|
echo GetEditColour($sys_path_info,$ninfo,'').'><a href="';
|
|
HtmlHref(sprintf($edit_string,$sys_path_editor,'',$sys_path_info."/".$ninfo,$sys_path_batch,$ankername,$ninfo,GetExists($sys_path_info,$ninfo)));
|
|
echo '">' . HtmlText($ninfo) . "</a>";
|
|
}
|
|
else{
|
|
echo '>';
|
|
}
|
|
echo "</th>\n<th>";
|
|
echo '<a href="index.php?ap=' . $nKey . '" target = "_blank">' . HtmlText($ntxt) . "</a>\n";
|
|
echo "</th>\n</tr>\n";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|