LoGD Standardrelease steht hier zum Download zur Verfügung!
<?php
/**
*
* Kevz presents, badnav ~fix.
*
* @package Badnavfixer
* @author Kevz <Godecker@gmx.net>
* @version 1.0.0
* @copyright 2007 Kevz
* @link http://www.lotgd.dyndns.biz/
*
* @desc With this file those user examined
* whether it an incorrect navigation
* to have if necessary whether the
* user a new day has.
*
*/
// include important files
require_once('common.php');
// Now we examine whether from the
// user the Login session are active
if ( $session['user']['loggedin'] && $session['loggedin'] )
{
// Examine whether in expenditure for
// contents a new day before is located
if ( strpos($session['output'], '<!--CheckNewDay()-->') ) {
checkday();
}
// Permitted user navigation from
// the array filters and removing
// * Permitted files in array list
$allowedNav = array('motd.php', 'mail.php');
foreach ( $session['allowednavs'] as $key => $value ) {
if ( trim($key) == '' // Expenditure of $key is empty?
|| $key === 0 // Expenditure of $key is false?
|| in_array(substr($key, 0, 8), $allowedNav) // Expenditure of $key is present in the array?
) unset($session['allowednavs'][$key]);
}
// Examine whether "allowednavs" an
// array is, elements contains or
// an expenditure is present
if ( !is_array($session['allowednavs'] ) // "allowednavs" is no array?
|| !count($session['allowednavs']) // "allowednavs" is an array, has however no elements?
|| empty($session['output']) // "output" is not empty and contains expenditure?
) {
// "allowednavs" assign an array, so
// that navigation can be made available.
$session['allowednavs'] = array();
// A navigation back to the village square make availab
echo '<a href="village.php">Deine erlaubten Navs waren beschädigt. <br />Zurück zum Dorfplatz</a>.';
addnav('', 'village.php');
}
// Debug expenditure empty and the user
// the values from the dynamic provide
// navigation (if made available) handed over
$session['debug'] = '';
$session['user']['allowednavs'] = $session['allowednavs'];
// Expenditure of outputs, if one is present.
// Subsequently, the current account values in
// the data base store
echo $session['output'];
saveuser();
}
else{
// The variable assign session an
// array, if user Login is not asset
$session = array();
// The user without session Login again
// back to the starting side pass on
redirect('index.php');
}
?>