Location: PHPKode > projects > PhpMyContent > phpMyContent-0.1/dokumentation.php3
<?
	require 'inc/config.php3';			// Variablen Deklaration
	require "$inc_path/db_connect.php3";	// Datenbank Verbindung
	require "$inc_path/auth.php3";		// Authentifizierung
	require "$inc_path/header.php3";		// HTML Header (Layout)
	require "$inc_path/user_track.php3";	// User Logging

        if (!($file)) {
                $file = basename($HTTP_REFERER);
	        $file = explode("?", $file);
	        $file = $file[0];
        }
	$filename = eregi_replace('.php3', '.txt', $file);
	if ($filename == 'dokumentation.txt') {
		include "docu/$spracheFlag/index.txt";
	} else {
		if (is_readable("docu/$spracheFlag/$filename")) {
                        include "docu/$spracheFlag/$filename";

                        $content = file("docu/$spracheFlag/$filename");
                        $context = trim(ereg_replace('<!--', '', ereg_replace('-->', '', $content[0])));

                        if (is_readable("docu/images/$spracheFlag/" . ereg_replace(".txt", ".png", $filename))) {
?>                              <ul><li><a href="docu/images/<?echo $spracheFlag?>/<?echo ereg_replace(".txt", ".png", $filename)?>">Bild</a></li></ul>
<?                      }

                        $seeAlsoLeiste = "";
                        $dir = opendir("docu/$spracheFlag");
                        while($file = readdir($dir)) {
                                if ((substr($file, 0, strlen($context)) == $context) && ((substr($file, strlen($context), 1) == ".") || (substr($file, strlen($context), 1) == "_"))) {
                                        $seeAlso = file("docu/$spracheFlag/$file");
                                        $seeAlsoLeiste = $seeAlsoLeiste . '<a href="dokumentation.php3?file='.$file.'">' . trim(ereg_replace('<!--', '', ereg_replace('-->', '', $seeAlso[1]))) . '</a> | ';
                                }
                        }
                        closedir($dir);
                        $seeAlsoLeiste = substr($seeAlsoLeiste, 0, strlen($seeAlsoLeiste) - 2);
                        echo $seeAlsoLeiste;
                } else {
?>
                        <p>Hilfe zum Thema <b><?echo $filename?></b> noch nicht verf&uuml;gbar.</p>
<?                      include "docu/$spracheFlag/index.txt";
                }
	}
	require 'inc/db_disconnect.php3';
	require 'inc/footer.php3';
?>
Return current item: PhpMyContent