/Server/GenIndex/Common.php |
---|
1,8 → 1,8 |
<?php |
define('WEBSVNSCRIPT', '/WebSVN/listing.php', true); // Cesta k WebSVN skriptu |
define('WIKISERVER', 'wiki', true); // Jméno Wiki serveru (co se strčí místo jména stávajícího serveru) |
define('WEBSVNSCRIPT', '/WebSVN/listing.php'); // Cesta k WebSVN skriptu |
define('WIKISERVER', 'wiki'); // Jméno Wiki serveru (co se strčí místo jména stávajícího serveru) |
function Error($str) |
45,7 → 45,7 |
$Path = realpath($_SERVER['DOCUMENT_ROOT'].$Path); |
// Zkontroluj, zda jsme nevybočili z webu |
if ( 0 == strncmp($Path, $_SERVER['DOCUMENT_ROOT'], strlen($_SERVER['DOCUMENT_ROOT']) ) ) |
if ( str_starts_with($Path, $_SERVER['DOCUMENT_ROOT']) ) |
{ |
// Shoda - odstraň DOCUMENT_ROOT část cesty |
return substr( $Path, strlen($_SERVER['DOCUMENT_ROOT']) ); |
/Server/GenIndex/DirMetadata.php |
---|
46,11 → 46,11 |
// Vyhoď komentáře (po řádcích) |
foreach($File as $Key => $Line) |
if (substr(ltrim($Line), 0, 2) == '//') |
if (str_starts_with(ltrim($Line), '//')) |
unset($File[$Key]); |
// Sestav z pole jeden retězec |
$File = implode($File); |
$File = implode('', $File); |
// Vyhledej v souboru informace |
$PatternKey = '\[(?P<Key>[a-z,A-Z,0-9,\-\_\.]+)\]'; |
/Server/GenIndex/GenIndex.php |
---|
6,11 → 6,11 |
require_once('TemplateEngine.php'); // Stroj pro práci s templejty |
require_once('DirMetadata.php'); // Modul pro načítání informace o adresářích |
define('DIRINFO', 'DirInfo.txt', true); // Jméno souboru s informacemi o adresáři |
define('PRJINFO', 'PrjInfo.txt', true); // Jméno souboru s informacemi o projektu |
define('WRAP', 70, true); // Lámání řetězcových hodnot |
define('DIRINFO', 'DirInfo.txt'); // Jméno souboru s informacemi o adresáři |
define('PRJINFO', 'PrjInfo.txt'); // Jméno souboru s informacemi o projektu |
define('WRAP', 70); // Lámání řetězcových hodnot |
define('TEMPLATEPATH', 'Templates', true); // relativní cesta k templejtům |
define('TEMPLATEPATH', 'Templates'); // relativní cesta k templejtům |
$TemplateFile = 'Modules.ihtml'; // přípona jazyka se doplní sama |
/Server/GenIndex/TemplateEngine.php |
---|
73,7 → 73,7 |
return 'Unable Open Template File'; |
// Sestav z pole jeden retězec |
$this->Page = implode($this->Page); |
$this->Page = implode('', $this->Page); |
// Definice regulárních výrazů pro hledání |