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.

451 lines
12 KiB
PHP

<?php
//
// Anfang: Start Session und Inits
//
session_start();
include "include/get_umsetzen_inc.php";
include "include/sysvariable_inc.php";
include "include/funktions_inc.php";
if (!isset($_SESSION["lastedit"])){
$_SESSION["lastedit"] = array();
}
if (!isset($_SESSION["deledit"])){
$_SESSION["deledit"] = array();
}
// Firstswitch
if (!isset($_SESSION["firstrun"])){
$_SESSION["firstrun"] = true;
if ($_COOKIE[$sys_projektname."LastVisited"] != ''){
$renavpos = $_COOKIE[$sys_projektname."LastVisited"];
}
}
// Cookies
include "include/sprache_inc.php";
if ($_css != ""){
$sys_css = $_css;
setcookie($sys_projektname.$sys_browser[browser]."Css",$sys_css,time()+ 40000000,"/");
}
else if( !$_COOKIE[$sys_projektname.$sys_browser[browser]."Css" ] ){
$sys_css = $sys_browser[css];
setcookie($sys_projektname.$sys_browser[browser]."Css",$sys_css,time()+ 40000000,"/");
}
else {
$sys_css = $_COOKIE[$sys_projektname.$sys_browser[browser]."Css"];
}
if ($_admin == "deaktivieren"){
$sys_admin = false;
setcookie($sys_projektname."Admin",$sys_admin,time()- 4200,"/"); //Cookie löschen
}
else{
$sys_admin = $_COOKIE[$sys_projektname."Admin"];
}
// Umstellen von Admin auf Noadmin via href
if ($_noadmin=='j' and $sys_admin){
$sys_admin = false;
$sys_doku_gen = false;
}
else{
if ($sys_admin) {
if ($_COOKIE[$sys_projektname."DokuGen"] == 'aktiv'){
$sys_doku_gen = true;
}
else{
$sys_doku_gen = false;
}
if ($_doku_gen == "aktivieren"){
setcookie($sys_projektname."DokuGen",'aktiv',time()+ 40000000,"/");
$sys_doku_gen = true;
}
if ($_doku_gen == "deaktivieren"){
setcookie($sys_projektname."DokuGen",'',time() - 4200,"/");
$sys_doku_gen = false;
}
}
}
// Löst in Htmlcode auf
if (!$sys_doku_gen) {
include "sys/printhtml.php";
}
// Menuetexte je nach Sprache holen
include "include/navigation_data.php";
include "include/geteditor_inc.php";
include "include/setnavcookie_inc.php";
// Neue Einträge markieren
if (!isset($_SESSION["letzter_besuch"])){
if($_COOKIE[$sys_projektname."letzter_besuch"]){
$_SESSION["letzter_besuch"] = true;
$timeaktdate = $_COOKIE[$sys_projektname."letzter_besuch"];
if ($fudir = opendir($verz_html)){
$i = 0;
while (false !== ($file = readdir($fudir))){
// echo $file."--".date('Y:z',filemtime($sys_path.$verz_html.'/'.$file))."<br>\n";
if (date('Y:z',filemtime($sys_path.$verz_html.'/'.$file)) > $timeaktdate){
reset($navigation);
while (list ($nKey,list($ntxt,$nhtml,$ninfo)) = each ($navigation)) {
if ($file == $nhtml){
$neue_files[$i++] = $nKey;
}
}
}
}
closedir($fudir);
$_SESSION["neue_files"] = $neue_files;
// print_r($neue_files);
}
}
$_SESSION["letzter_besuch"] = true;
$timest = time() - (24*60*60*7); // (- 7 Tage)
$timestamp = getdate($timest);
$timeaktdate = $timestamp["year"].':'.$timestamp["yday"];
// $timeaktdate = "2006:193";
// echo $timeaktdate;
setcookie($sys_projektname."letzter_besuch",$timeaktdate,time()+ 40000000,"/");
}
// Aktuelle Menuposition holen
if ($renavpos =='') {
$navpos = $_ap;
}
else{
$navpos = $renavpos;
}
// wenn $nav_pos leer oder ungültig ist auf default setzten (ersten Key)
if ($navigation[$navpos] == ''){
$navpos = array_shift(array_keys($navigation));
}
list($navtext,$navhtml,$navinfo,$navfunkt) = $navigation[$navpos];
setcookie($sys_projektname."LastVisited",$navpos,time()+ 40000000,"/");
//
// Ende: Start Session und Inits
//
//<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
// "http://www.w3.org/TR/html4/loose.dtd">
//<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
// "http://www.w3.org/TR/html4/strict.dtd">
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> <?php PrintTitle(); ?> </title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
<meta name="author" content=<?php PrintAuthor();?> >
<link rel="stylesheet" href="css/default.css" type="text/css">
<link rel="stylesheet" href="<?php echo "css/".$sys_css; ?>" type="text/css">
<link rel="stylesheet" href="css/buttons.css" type="text/css">
<link rel="stylesheet" href="<?php echo $sys_browser[verz]."/".$sys_css; ?>" type="text/css">
<?php
// Counter aktivieren
include "include/counter_inc.php";
// Anker array für diese seite füllen und CSS für entsprechende RTFs aktivieren
global $anker;
Get_Anker_Styles_HX($verz_html . "/" . $navhtml,'b');
?>
<script language="JavaScript" type="text/javascript" >
function popup(html,titel,w,h,text) {
x = screen.availWidth/2-w/2;
y = screen.availHeight/2-h/2;
var popupWindow = window.open( html, // Hmtlref
'', // Tragetname
'width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
if (html != ''){
popupWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+titel+'</title>');
popupWindow.document.write('<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"></head><body><pre>');
popupWindow.document.write(text);
popupWindow.document.write('</pre></body></html>');
}
}
</script>
<a href="javascript:popup(Html_link,Fenstername,Breite,Höhe,'htmltext')">Popuptext</a>
<script language="JavaScript" type="text/javascript" >
function Check_Abflug() {
if (document.menueform.feldenabled.value !='' && /* Edit aktiv */
document.menueform.nfunkt.value !='' &&
document.menueform.nfunkt.value !='closemenu' &&
document.menueform.nfunkt.value !='link' &&
document.menueform.nfunkt.value !='dummy' &&
document.menueform.nfunkt.value !='infofile' &&
document.menueform.nfunkt.value !='htmlfile' &&
document.menueform.nfunkt.value !='neueeintr') {
alert('Bitte eine gültige Funktion eingeben(BLANK,closemenu,link,dummy,infofile,htmlfile oder neueintr.');
document.menueform.nfunkt.focus();
}
else{
document.menueform.submit();
}
}
</script>
<script language="JavaScript" type="text/javascript" >
/*
name - name of the cookie
value - value of the cookie
[expires] - expiration date of the cookie
(defaults to end of current session)
[path] - path for which the cookie is valid
(defaults to path of calling document)
[domain] - domain for which the cookie is valid
(defaults to domain of calling document)
[secure] - Boolean value indicating if the cookie transmission requires
a secure transmission
* an argument defaults when it is assigned null as a placeholder
* a null placeholder is not required for trailing omitted arguments
*/
// expire.setTime(today.getTime() + 3600000*24*nDays);
//function setCookie(name, value, expires, path, domain, secure)
function setCookie(name, value, expDays, path, domain, secure) {
var today = new Date();
var expires = new Date();
if (expDays==null || expDays==0) expDays=1;
expires.setTime(today.getTime() + 3600000*24*expDays);
var curCookie = name + "=" + escape(value) +
";expires=" + expires.toGMTString() +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
// alert(curCookie);
}
/*
name - name of the desired cookie
return string containing value of specified cookie or null
if cookie does not exist
*/
function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
/*
name - name of the cookie
[path] - path of the cookie (must be same as path used to create cookie)
[domain] - domain of the cookie (must be same as domain used to
create cookie)
path and domain default if assigned null or omitted if no explicit
argument proceeds
*/
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
</SCRIPT>
<script language="JavaScript1.2" type="text/javascript" >
var menue = new Array();
var cookie_basis = '<?php echo $sys_projektname."menue".$sys_sprache?>';
<?php
reset($navigation);
$i = 0;
while (list ($nKey,list($ntxt,$nhtml,$ninfo,$nfunkt,$nmenue)) = each ($navigation)){
echo "menue[".$i."] = new Object();\n";
echo "menue[".$i."]['nKey'] = '".$nKey."';\n";
echo "menue[".$i."]['ntxt'] = '".$ntxt."';\n";
echo "menue[".$i."]['nhtml'] = '".$nhtml."';\n";
echo "menue[".$i."]['ninfo'] = '".$ninfo."';\n";
echo "menue[".$i."]['nfunkt'] = '".$nfunkt."';\n";
echo "menue[".$i."]['nmenue'] = ".$nmenue.";\n\n";
$i++;
}
?>
function PrintMenu(){
for (i=0; i < menue.length; ++i){
nKey = menue[i]['nKey'];
ntxt = menue[i]['ntxt'];
nhtml = menue[i]['nhtml'];
ninfo = menue[i]['ninfo'];
nfunkt = menue[i]['nfunkt'];
nmenue = menue[i]['nmenue'];
if (i ==9){
div_tag = '<div id="Menukey-'+nKey+'" style="display:none;position:absolute;height:0em;">';
}else{
div_tag = '<div id="Menukey-'+nKey+'" style="position:relative;">';
}
// div_tag = '<div id="Menukey-'+nKey+'" style="visibility:visible;position:relative;left:10;top:'+i*12+';">';
// div_tag = '<div id="Menukey-'+nKey+'" style="visibility:visible;position:absolute;left:10;top:'+i*12+';">';
document.write(div_tag+ntxt+'</div>');
// setCookie(name, value, expires, path, domain, secure)
// setCookie(cookie_basis+nKey,Boolean(true), Thu, 01-Jan-99 00:00:01 GMT, '', 'localhost', secure);
// setCookie(cookie_basis+nKey,'DASISTNUE', 55);
}
}
function KlappMenu(){
}
</script>
</head>
<?php
if ($_an != ''){
echo "<body onload=\"location.hash='".$_an."'\">";
}
else{
echo '<body>';
}
?>
<?php if ($_popup!='j'){?>
<h1><?php PrintTitle(); ?></h1>
<?php if ($_nonav!='j') {?>
<div id="Nav">
<div class="o" >
<div class="l" >
<div class="r" >
<div class="u" >
<div class="ro">
<div class="lo">
<div class="ru">
<div class="lu">
<script language="JavaScript1.2" type="text/javascript" >
PrintMenu();
</script>
<?php
// include "include/navigation_inc.php";
// eine leerzeile wegen IE Fehler, bei css padding für background
echo "<br><br>\n";
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php } ?>
<?php
if ($_navonly == "j"){
include "include/ausgabe_navigation_inc.php";
}
else if ($_sucheaktiv == "j"){
include "include/ausgabe_suchbereich_inc.php";
}
else if ($_neueeintraege == "j"){
include "include/ausgabe_neuebereich_inc.php";
}
else if ($_supportanfrage == "j"){
include "include/ausgabe_supportanfrage_inc.php";
}
else{
include "include/ausgabe_mainbereich_inc.php";
}
?>
<?php if ($_popup!='j'){?>
<p id="Fusszeile"><?php PrintTitle();PrintBrowser(); ?></p>
<?php
if ($sys_admin) {
ListCss($sys_browser[verz],".css",$sys_css);
}
// include "include/display_neocounter.php";
?>
<!--
// <p>
// <script language="javascript" src="http://neocounter.neoworx-blog-tools.net/premium_trial.php?user_counter=39792_1"></script>
// </p>
-->
<p>
<a href="http://validator.w3.org/check?uri=offen">
<img src="wc3/valid-xhtml10.png" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
<p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
</p>
<?php } ?>
</body>
</html>