Format code from krk-litvinov.cz

This commit is contained in:
2022-01-14 03:30:26 +01:00
parent ef87fd0ae6
commit 88e5499192
20 changed files with 1028 additions and 1012 deletions

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="leden";
$CMS["%february%"]="únor";
$CMS["%march%"]="březen";
$CMS["%april%"]="duben";
$CMS["%may%"]="květen";
$CMS["%june%"]="červen";
$CMS["%july%"]="červenec";
$CMS["%august%"]="srpen";
$CMS["%september%"]="září";
$CMS["%october%"]="říjen";
$CMS["%november%"]="listopad";
$CMS["%december%"]="prosinec";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Zadejte zprávu";
$CMS["%messages:%"]="Vzkazy:";
$CMS["%name:%"]="Jméno:";
$CMS["%message:%"]="Vzkaz:";
$CMS["%password:%"]="Heslo:";
$CMS["%red%"]="červená";
$CMS["%green%"]="zelená";
$CMS["%blue%"]="modrá";
$CMS["%yellow%"]="žlutá";
$CMS["%purple%"]="fialová";
$CMS["%color:%"]="Barva:";
$CMS["%send%"]="Odeslat";
$CMS["%notrequiredpassword%"]="Není vyžadováno";
$CMS["%no%"]="ne";
$CMS["%yes%"]="ano";
$CMS["%areyourobot%"]="Jste robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Hledat";
$CMS["%req%"]="(vyžadováno)";
$CMS["%gotop%"]="&#8593;Nahoru";
$CMS["%misspost%"]="Nezadali jste zprávu";
$CMS["%missname%"]="Nezadali jste jméno";
$CMS["%wrongcode%"]="Zadal jste špatný ověřovací kód";
$CMS["%wrongmail%"]="To co jste zadali není platný e-mail";
$CMS["%saved%"]="Zpráva byla odeslána";
$CMS["%notsaved%"]="Zpráva nebyla odeslána";
$CMS["%showmail%"]="Zobrazovat e-mail každému";
$CMS["%wrongwww%"]="To co jste zadali není platné <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'leden';
$CMS['%february%'] = 'únor';
$CMS['%march%'] = 'březen';
$CMS['%april%'] = 'duben';
$CMS['%may%'] = 'květen';
$CMS['%june%'] = 'červen';
$CMS['%july%'] = 'červenec';
$CMS['%august%'] = 'srpen';
$CMS['%september%'] = 'září';
$CMS['%october%'] = 'říjen';
$CMS['%november%'] = 'listopad';
$CMS['%december%'] = 'prosinec';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Zadejte zprávu';
$CMS['%messages:%'] = 'Vzkazy:';
$CMS['%name:%'] = 'Jméno:';
$CMS['%message:%'] = 'Vzkaz:';
$CMS['%password:%'] = 'Heslo:';
$CMS['%red%'] = 'červená';
$CMS['%green%'] = 'zelená';
$CMS['%blue%'] = 'modrá';
$CMS['%yellow%'] = 'žlutá';
$CMS['%purple%'] = 'fialová';
$CMS['%color:%'] = 'Barva:';
$CMS['%send%'] = 'Odeslat';
$CMS['%notrequiredpassword%'] = 'Není vyžadováno';
$CMS['%no%'] = 'ne';
$CMS['%yes%'] = 'ano';
$CMS['%areyourobot%'] = 'Jste robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Hledat';
$CMS['%req%'] = '(vyžadováno)';
$CMS['%gotop%'] = '&#8593;Nahoru';
$CMS['%misspost%'] = 'Nezadali jste zprávu';
$CMS['%missname%'] = 'Nezadali jste jméno';
$CMS['%wrongcode%'] = 'Zadal jste špatný ověřovací kód';
$CMS['%wrongmail%'] = 'To co jste zadali není platný e-mail';
$CMS['%saved%'] = 'Zpráva byla odeslána';
$CMS['%notsaved%'] = 'Zpráva nebyla odeslána';
$CMS['%showmail%'] = 'Zobrazovat e-mail každému';
$CMS['%wrongwww%'] = 'To co jste zadali není platné <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Nápověda</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>není podporováno</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]žluté písmo[/yellow]</dt><dd><span class="yellow">žluté písmo</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:3wantrdnnzy";
$CMS["%eustring%"]="Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:3wantrdnnzy';
$CMS['%eustring%'] = 'Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="The project was supported from European fund of regional development, Common fund of small projects, Programme \"Cil 3\" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'The project was supported from European fund of regional development, Common fund of small projects, Programme "Cil 3" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,81 +1,84 @@
<?php
function stringEndsWith($string, $end) {
if(strLen($end)==0)
return false;
return (substr($string, -strLen($end))==$end);
if (strlen($end) == 0) {
return false;
}
return substr($string, -strlen($end)) == $end;
}
session_start();
$included=true;
$included = true;
$locale = 'cs';
$url=$_SERVER["REQUEST_URI"];
$root="/2012-prosinec/";
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root)+strlen($root));
if($uri==''){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$locale.'/');
exit;
}elseif(preg_match('/^([a-z]{2})\\/(.+)(\\?.*)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if(stringEndsWith($matches[2], 'main')){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$lang.'/'.substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
}elseif(preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2])?$matches[2].'/':'').'main';
}else{
$_GET['error'] = 404;
$url = $_SERVER['REQUEST_URI'];
$root = '/2012-prosinec/';
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root) + strlen($root));
if ($uri == '') {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $locale . '/');
exit;
} elseif (preg_match('/^([a-z]{2})\\/(.+)(\\?.*)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if (stringEndsWith($matches[2], 'main')) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $lang . '/' . substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
} elseif (preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2]) ? $matches[2] . '/' : '') . 'main';
} else {
$_GET['error'] = 404;
}
$page=htmlspecialchars($_GET["page"]);
$pretitle="3. Česko-německý skirogaining";
$mainMail="tojnar@gmail.com";
include($lang.".php");
$CMS["%url%"]="http://".$_SERVER['HTTP_HOST'].htmlspecialchars($url);
$CMS["%root%"]=rtrim($root, '/');
$CMS["%lang%"]=$lang;
$CMS["%unknownAuthor%"]="Jan Tojnar";
$CMS["%headerLinkHref%"]=rplc("%root%/").$lang;
$CMS["%pretitle%"]=$pretitle;
$CMS["%comefrom%"]=$_SERVER["HTTP_REFERER"];
$CMS["%dateFormat%"]="d.m.Y H:i";
function rplc($string){
global $CMS;
return str_replace(array_keys($CMS),$CMS,$string);
$page = htmlspecialchars($_GET['page']);
$pretitle = '3. Česko-německý skirogaining';
$mainMail = 'tojnar@gmail.com';
include $lang . '.php';
$CMS['%url%'] = 'http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars($url);
$CMS['%root%'] = rtrim($root, '/');
$CMS['%lang%'] = $lang;
$CMS['%unknownAuthor%'] = 'Jan Tojnar';
$CMS['%headerLinkHref%'] = rplc('%root%/') . $lang;
$CMS['%pretitle%'] = $pretitle;
$CMS['%comefrom%'] = $_SERVER['HTTP_REFERER'];
$CMS['%dateFormat%'] = 'd.m.Y H:i';
function rplc($string) {
global $CMS;
return str_replace(array_keys($CMS), $CMS, $string);
}
require __DIR__ . '/../sboard.php';
require __DIR__ . '/../load.lib.php';
readPage($page);
$CMS["%releasedate%"]=toDate($date);
$CMS["%releasetime%"]=toTime($date);
if(isReleased($date)==false){
$notreleased=true;
}else{
$notreleased=false;
$CMS['%releasedate%'] = toDate($date);
$CMS['%releasetime%'] = toTime($date);
if (isReleased($date) == false) {
$notreleased = true;
} else {
$notreleased = false;
}
if($notreleased==true){
readPage("error/notreleased");
if ($notreleased == true) {
readPage('error/notreleased');
}
$CMS["%title%"]=$title;
$CMS["%titleTag%"]=str_replace(array("%pretitle%","%title%"),array($pretitle,$title),rplc("%longTitle%"));
$CMS["%langPanel%"]=$langPanel;
$CMS["%article%"]=$article;
$CMS["%menu%"]=$menu;
if(!empty($author) AND !empty($date)){
$aInfo=str_replace(array("%author%","%date%","%time%"),array(author($author),toDate($date),toTime($date)),rplc("%by%"));
}elseif(!empty($author)){
$aInfo=str_replace("%author%",author($author),rplc("%byAuthor%"));
}elseif(!empty($date)){
$aInfo=str_replace(array("%date%","%time%"),array(toDate($date),toTime($date)),rplc("%byDate%"));
}else{
$aInfo="";
$CMS['%title%'] = $title;
$CMS['%titleTag%'] = str_replace(['%pretitle%', '%title%'], [$pretitle, $title], rplc('%longTitle%'));
$CMS['%langPanel%'] = $langPanel;
$CMS['%article%'] = $article;
$CMS['%menu%'] = $menu;
if (!empty($author) and !empty($date)) {
$aInfo = str_replace(['%author%', '%date%', '%time%'], [author($author), toDate($date), toTime($date)], rplc('%by%'));
} elseif (!empty($author)) {
$aInfo = str_replace('%author%', author($author), rplc('%byAuthor%'));
} elseif (!empty($date)) {
$aInfo = str_replace(['%date%', '%time%'], [toDate($date), toTime($date)], rplc('%byDate%'));
} else {
$aInfo = '';
}
//var_dump(date(rplc("%dateFormat%"),filemtime($realPage)));
$CMS["%author%"]=$author;
$CMS["%ainfo%"]=$aInfo;
$CMS['%author%'] = $author;
$CMS['%ainfo%'] = $aInfo;
?>
<?php
ob_start(/*"ob_gzhandler"*/);
include("template.html");
$buffer=ob_get_clean();
echo(rplc(rplc($buffer)));
include 'template.html';
$buffer = ob_get_clean();
echo rplc(rplc($buffer));
?>

View File

@@ -1,30 +1,31 @@
<?php
header("Content-Type: text/plain; charset=utf-8");
function directoryToArray($directory,$recursive){
$array_items=array();
if($handle=opendir($directory)){
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
if(is_dir($directory."/".$file)){
if($recursive){
$array_items=array_merge($array_items,directoryToArray($directory. "/".$file,$recursive));
header('Content-Type: text/plain; charset=utf-8');
function directoryToArray($directory, $recursive) {
$array_items = [];
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (is_dir($directory . '/' . $file)) {
if ($recursive) {
$array_items = array_merge($array_items, directoryToArray($directory . '/' . $file, $recursive));
}
$file = $directory . '/' . $file;
} else {
$file = $directory . '/' . $file;
$array_items[] = preg_replace("/\/\//si", '/', $file);
}
}
}
closedir($handle);
}
return $array_items;
}
$file=$directory."/".$file;
}else{
$file=$directory."/".$file;
$array_items[]=preg_replace("/\/\//si","/",$file);
$files = directoryToArray('./pages', true);
foreach ($files as $file) {
if (substr($file, -3) == '.pg' and (substr($file, 0, 17) != './pages/cs/error/' and substr($file, 0, 17) != './pages/en/error/' and substr($file, 0, 17) != './pages/de/error/')) {
$list .= substr($file, 0, -3) . "\n";
}
}
}
}
closedir($handle);
}
return $array_items;
}
$files=directoryToArray("./pages",true);
foreach($files as $file){
if(substr($file,-3)==".pg" AND (substr($file,0,17)!="./pages/cs/error/" AND substr($file,0,17)!="./pages/en/error/" AND substr($file,0,17)!="./pages/de/error/")){
$list.=substr($file,0,-3)."\n";
}
}
echo(str_replace("./pages","http://".$_SERVER["HTTP_HOST"],$list));
?>
echo str_replace('./pages', 'http://' . $_SERVER['HTTP_HOST'], $list);

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="leden";
$CMS["%february%"]="únor";
$CMS["%march%"]="březen";
$CMS["%april%"]="duben";
$CMS["%may%"]="květen";
$CMS["%june%"]="červen";
$CMS["%july%"]="červenec";
$CMS["%august%"]="srpen";
$CMS["%september%"]="září";
$CMS["%october%"]="říjen";
$CMS["%november%"]="listopad";
$CMS["%december%"]="prosinec";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Zadejte zprávu";
$CMS["%messages:%"]="Vzkazy:";
$CMS["%name:%"]="Jméno:";
$CMS["%message:%"]="Vzkaz:";
$CMS["%password:%"]="Heslo:";
$CMS["%red%"]="červená";
$CMS["%green%"]="zelená";
$CMS["%blue%"]="modrá";
$CMS["%yellow%"]="žlutá";
$CMS["%purple%"]="fialová";
$CMS["%color:%"]="Barva:";
$CMS["%send%"]="Odeslat";
$CMS["%notrequiredpassword%"]="Není vyžadováno";
$CMS["%no%"]="ne";
$CMS["%yes%"]="ano";
$CMS["%areyourobot%"]="Jste robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Hledat";
$CMS["%req%"]="(vyžadováno)";
$CMS["%gotop%"]="&#8593;Nahoru";
$CMS["%misspost%"]="Nezadali jste zprávu";
$CMS["%missname%"]="Nezadali jste jméno";
$CMS["%wrongcode%"]="Zadal jste špatný ověřovací kód";
$CMS["%wrongmail%"]="To co jste zadali není platný e-mail";
$CMS["%saved%"]="Zpráva byla odeslána";
$CMS["%notsaved%"]="Zpráva nebyla odeslána";
$CMS["%showmail%"]="Zobrazovat e-mail každému";
$CMS["%wrongwww%"]="To co jste zadali není platné <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'leden';
$CMS['%february%'] = 'únor';
$CMS['%march%'] = 'březen';
$CMS['%april%'] = 'duben';
$CMS['%may%'] = 'květen';
$CMS['%june%'] = 'červen';
$CMS['%july%'] = 'červenec';
$CMS['%august%'] = 'srpen';
$CMS['%september%'] = 'září';
$CMS['%october%'] = 'říjen';
$CMS['%november%'] = 'listopad';
$CMS['%december%'] = 'prosinec';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Zadejte zprávu';
$CMS['%messages:%'] = 'Vzkazy:';
$CMS['%name:%'] = 'Jméno:';
$CMS['%message:%'] = 'Vzkaz:';
$CMS['%password:%'] = 'Heslo:';
$CMS['%red%'] = 'červená';
$CMS['%green%'] = 'zelená';
$CMS['%blue%'] = 'modrá';
$CMS['%yellow%'] = 'žlutá';
$CMS['%purple%'] = 'fialová';
$CMS['%color:%'] = 'Barva:';
$CMS['%send%'] = 'Odeslat';
$CMS['%notrequiredpassword%'] = 'Není vyžadováno';
$CMS['%no%'] = 'ne';
$CMS['%yes%'] = 'ano';
$CMS['%areyourobot%'] = 'Jste robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Hledat';
$CMS['%req%'] = '(vyžadováno)';
$CMS['%gotop%'] = '&#8593;Nahoru';
$CMS['%misspost%'] = 'Nezadali jste zprávu';
$CMS['%missname%'] = 'Nezadali jste jméno';
$CMS['%wrongcode%'] = 'Zadal jste špatný ověřovací kód';
$CMS['%wrongmail%'] = 'To co jste zadali není platný e-mail';
$CMS['%saved%'] = 'Zpráva byla odeslána';
$CMS['%notsaved%'] = 'Zpráva nebyla odeslána';
$CMS['%showmail%'] = 'Zobrazovat e-mail každému';
$CMS['%wrongwww%'] = 'To co jste zadali není platné <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Nápověda</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>není podporováno</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]žluté písmo[/yellow]</dt><dd><span class="yellow">žluté písmo</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:3wantrdnnzy";
$CMS["%eustring%"]="Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:3wantrdnnzy';
$CMS['%eustring%'] = 'Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="The project was supported from European fund of regional development, Common fund of small projects, Programme \"Cil 3\" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'The project was supported from European fund of regional development, Common fund of small projects, Programme "Cil 3" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,81 +1,84 @@
<?php
function stringEndsWith($string, $end) {
if(strLen($end)==0)
return false;
return (substr($string, -strLen($end))==$end);
if (strlen($end) == 0) {
return false;
}
return substr($string, -strlen($end)) == $end;
}
session_start();
$included=true;
$included = true;
$locale = 'cs';
$url=$_SERVER["REQUEST_URI"];
$root="/2014/";
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root)+strlen($root));
if($uri==''){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$locale.'/');
exit;
}elseif(preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if(stringEndsWith($matches[2], 'main')){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$lang.'/'.substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
}elseif(preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2])?$matches[2].'/':'').'main';
}else{
$_GET['error'] = 404;
$url = $_SERVER['REQUEST_URI'];
$root = '/2014/';
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root) + strlen($root));
if ($uri == '') {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $locale . '/');
exit;
} elseif (preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if (stringEndsWith($matches[2], 'main')) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $lang . '/' . substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
} elseif (preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2]) ? $matches[2] . '/' : '') . 'main';
} else {
$_GET['error'] = 404;
}
$page=htmlspecialchars($_GET["page"]);
$pretitle="4. přeshraniční skirogaining";
$mainMail="tojnar@gmail.com";
include($lang.".php");
$CMS["%url%"]="http://".$_SERVER['HTTP_HOST'].htmlspecialchars($url);
$CMS["%root%"]=rtrim($root, '/');
$CMS["%lang%"]=$lang;
$CMS["%unknownAuthor%"]="Jan Tojnar";
$CMS["%headerLinkHref%"]=rplc("%root%/").$lang;
$CMS["%pretitle%"]=$pretitle;
$CMS["%comefrom%"]=$_SERVER["HTTP_REFERER"];
$CMS["%dateFormat%"]="d.m.Y H:i";
function rplc($string){
global $CMS;
return str_replace(array_keys($CMS),$CMS,$string);
$page = htmlspecialchars($_GET['page']);
$pretitle = '4. přeshraniční skirogaining';
$mainMail = 'tojnar@gmail.com';
include $lang . '.php';
$CMS['%url%'] = 'http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars($url);
$CMS['%root%'] = rtrim($root, '/');
$CMS['%lang%'] = $lang;
$CMS['%unknownAuthor%'] = 'Jan Tojnar';
$CMS['%headerLinkHref%'] = rplc('%root%/') . $lang;
$CMS['%pretitle%'] = $pretitle;
$CMS['%comefrom%'] = $_SERVER['HTTP_REFERER'];
$CMS['%dateFormat%'] = 'd.m.Y H:i';
function rplc($string) {
global $CMS;
return str_replace(array_keys($CMS), $CMS, $string);
}
require __DIR__ . '/../sboard.php';
require __DIR__ . '/../load.lib.php';
readPage($page);
$CMS["%releasedate%"]=toDate($date);
$CMS["%releasetime%"]=toTime($date);
if(isReleased($date)==false){
$notreleased=true;
}else{
$notreleased=false;
$CMS['%releasedate%'] = toDate($date);
$CMS['%releasetime%'] = toTime($date);
if (isReleased($date) == false) {
$notreleased = true;
} else {
$notreleased = false;
}
if($notreleased==true){
readPage("error/notreleased");
if ($notreleased == true) {
readPage('error/notreleased');
}
$CMS["%title%"]=$title;
$CMS["%titleTag%"]=str_replace(array("%pretitle%","%title%"),array($pretitle,$title),rplc("%longTitle%"));
$CMS["%langPanel%"]=$langPanel;
$CMS["%article%"]=$article;
$CMS["%menu%"]=$menu;
if(!empty($author) AND !empty($date)){
$aInfo=str_replace(array("%author%","%date%","%time%"),array(author($author),toDate($date),toTime($date)),rplc("%by%"));
}elseif(!empty($author)){
$aInfo=str_replace("%author%",author($author),rplc("%byAuthor%"));
}elseif(!empty($date)){
$aInfo=str_replace(array("%date%","%time%"),array(toDate($date),toTime($date)),rplc("%byDate%"));
}else{
$aInfo="";
$CMS['%title%'] = $title;
$CMS['%titleTag%'] = str_replace(['%pretitle%', '%title%'], [$pretitle, $title], rplc('%longTitle%'));
$CMS['%langPanel%'] = $langPanel;
$CMS['%article%'] = $article;
$CMS['%menu%'] = $menu;
if (!empty($author) and !empty($date)) {
$aInfo = str_replace(['%author%', '%date%', '%time%'], [author($author), toDate($date), toTime($date)], rplc('%by%'));
} elseif (!empty($author)) {
$aInfo = str_replace('%author%', author($author), rplc('%byAuthor%'));
} elseif (!empty($date)) {
$aInfo = str_replace(['%date%', '%time%'], [toDate($date), toTime($date)], rplc('%byDate%'));
} else {
$aInfo = '';
}
//var_dump(date(rplc("%dateFormat%"),filemtime($realPage)));
$CMS["%author%"]=$author;
$CMS["%ainfo%"]=$aInfo;
$CMS['%author%'] = $author;
$CMS['%ainfo%'] = $aInfo;
?>
<?php
ob_start(/*"ob_gzhandler"*/);
include("template.html");
$buffer=ob_get_clean();
echo(rplc(rplc($buffer)));
include 'template.html';
$buffer = ob_get_clean();
echo rplc(rplc($buffer));
?>

View File

@@ -1,30 +1,31 @@
<?php
header("Content-Type: text/plain; charset=utf-8");
function directoryToArray($directory,$recursive){
$array_items=array();
if($handle=opendir($directory)){
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
if(is_dir($directory."/".$file)){
if($recursive){
$array_items=array_merge($array_items,directoryToArray($directory. "/".$file,$recursive));
header('Content-Type: text/plain; charset=utf-8');
function directoryToArray($directory, $recursive) {
$array_items = [];
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (is_dir($directory . '/' . $file)) {
if ($recursive) {
$array_items = array_merge($array_items, directoryToArray($directory . '/' . $file, $recursive));
}
$file = $directory . '/' . $file;
} else {
$file = $directory . '/' . $file;
$array_items[] = preg_replace("/\/\//si", '/', $file);
}
}
}
closedir($handle);
}
return $array_items;
}
$file=$directory."/".$file;
}else{
$file=$directory."/".$file;
$array_items[]=preg_replace("/\/\//si","/",$file);
$files = directoryToArray('./pages', true);
foreach ($files as $file) {
if (substr($file, -3) == '.pg' and (substr($file, 0, 17) != './pages/cs/error/' and substr($file, 0, 17) != './pages/en/error/' and substr($file, 0, 17) != './pages/de/error/')) {
$list .= substr($file, 0, -3) . "\n";
}
}
}
}
closedir($handle);
}
return $array_items;
}
$files=directoryToArray("./pages",true);
foreach($files as $file){
if(substr($file,-3)==".pg" AND (substr($file,0,17)!="./pages/cs/error/" AND substr($file,0,17)!="./pages/en/error/" AND substr($file,0,17)!="./pages/de/error/")){
$list.=substr($file,0,-3)."\n";
}
}
echo(str_replace("./pages","http://".$_SERVER["HTTP_HOST"],$list));
?>
echo str_replace('./pages', 'http://' . $_SERVER['HTTP_HOST'], $list);

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="leden";
$CMS["%february%"]="únor";
$CMS["%march%"]="březen";
$CMS["%april%"]="duben";
$CMS["%may%"]="květen";
$CMS["%june%"]="červen";
$CMS["%july%"]="červenec";
$CMS["%august%"]="srpen";
$CMS["%september%"]="září";
$CMS["%october%"]="říjen";
$CMS["%november%"]="listopad";
$CMS["%december%"]="prosinec";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Zadejte zprávu";
$CMS["%messages:%"]="Vzkazy:";
$CMS["%name:%"]="Jméno:";
$CMS["%message:%"]="Vzkaz:";
$CMS["%password:%"]="Heslo:";
$CMS["%red%"]="červená";
$CMS["%green%"]="zelená";
$CMS["%blue%"]="modrá";
$CMS["%yellow%"]="žlutá";
$CMS["%purple%"]="fialová";
$CMS["%color:%"]="Barva:";
$CMS["%send%"]="Odeslat";
$CMS["%notrequiredpassword%"]="Není vyžadováno";
$CMS["%no%"]="ne";
$CMS["%yes%"]="ano";
$CMS["%areyourobot%"]="Jste robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Hledat";
$CMS["%req%"]="(vyžadováno)";
$CMS["%gotop%"]="&#8593;Nahoru";
$CMS["%misspost%"]="Nezadali jste zprávu";
$CMS["%missname%"]="Nezadali jste jméno";
$CMS["%wrongcode%"]="Zadal jste špatný ověřovací kód";
$CMS["%wrongmail%"]="To co jste zadali není platný e-mail";
$CMS["%saved%"]="Zpráva byla odeslána";
$CMS["%notsaved%"]="Zpráva nebyla odeslána";
$CMS["%showmail%"]="Zobrazovat e-mail každému";
$CMS["%wrongwww%"]="To co jste zadali není platné <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'leden';
$CMS['%february%'] = 'únor';
$CMS['%march%'] = 'březen';
$CMS['%april%'] = 'duben';
$CMS['%may%'] = 'květen';
$CMS['%june%'] = 'červen';
$CMS['%july%'] = 'červenec';
$CMS['%august%'] = 'srpen';
$CMS['%september%'] = 'září';
$CMS['%october%'] = 'říjen';
$CMS['%november%'] = 'listopad';
$CMS['%december%'] = 'prosinec';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Zadejte zprávu';
$CMS['%messages:%'] = 'Vzkazy:';
$CMS['%name:%'] = 'Jméno:';
$CMS['%message:%'] = 'Vzkaz:';
$CMS['%password:%'] = 'Heslo:';
$CMS['%red%'] = 'červená';
$CMS['%green%'] = 'zelená';
$CMS['%blue%'] = 'modrá';
$CMS['%yellow%'] = 'žlutá';
$CMS['%purple%'] = 'fialová';
$CMS['%color:%'] = 'Barva:';
$CMS['%send%'] = 'Odeslat';
$CMS['%notrequiredpassword%'] = 'Není vyžadováno';
$CMS['%no%'] = 'ne';
$CMS['%yes%'] = 'ano';
$CMS['%areyourobot%'] = 'Jste robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Hledat';
$CMS['%req%'] = '(vyžadováno)';
$CMS['%gotop%'] = '&#8593;Nahoru';
$CMS['%misspost%'] = 'Nezadali jste zprávu';
$CMS['%missname%'] = 'Nezadali jste jméno';
$CMS['%wrongcode%'] = 'Zadal jste špatný ověřovací kód';
$CMS['%wrongmail%'] = 'To co jste zadali není platný e-mail';
$CMS['%saved%'] = 'Zpráva byla odeslána';
$CMS['%notsaved%'] = 'Zpráva nebyla odeslána';
$CMS['%showmail%'] = 'Zobrazovat e-mail každému';
$CMS['%wrongwww%'] = 'To co jste zadali není platné <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Nápověda</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>není podporováno</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]žluté písmo[/yellow]</dt><dd><span class="yellow">žluté písmo</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:3wantrdnnzy";
$CMS["%eustring%"]="Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:3wantrdnnzy';
$CMS['%eustring%'] = 'Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="The project was supported from European fund of regional development, Common fund of small projects, Programme \"Cil 3\" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'The project was supported from European fund of regional development, Common fund of small projects, Programme "Cil 3" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,81 +1,84 @@
<?php
function stringEndsWith($string, $end) {
if(strLen($end)==0)
return false;
return (substr($string, -strLen($end))==$end);
if (strlen($end) == 0) {
return false;
}
return substr($string, -strlen($end)) == $end;
}
session_start();
$included=true;
$included = true;
$locale = 'cs';
$url=$_SERVER["REQUEST_URI"];
$root="/2015-prosinec/";
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root)+strlen($root));
if($uri==''){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$locale.'/');
exit;
}elseif(preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if(stringEndsWith($matches[2], 'main')){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$lang.'/'.substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
}elseif(preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2])?$matches[2].'/':'').'main';
}else{
$_GET['error'] = 404;
$url = $_SERVER['REQUEST_URI'];
$root = '/2015-prosinec/';
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root) + strlen($root));
if ($uri == '') {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $locale . '/');
exit;
} elseif (preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if (stringEndsWith($matches[2], 'main')) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $lang . '/' . substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
} elseif (preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2]) ? $matches[2] . '/' : '') . 'main';
} else {
$_GET['error'] = 404;
}
$page=htmlspecialchars($_GET["page"]);
$pretitle="6. přeshraniční skirogaining";
$mainMail="tojnar@gmail.com";
include($lang.".php");
$CMS["%url%"]="http://".$_SERVER['HTTP_HOST'].htmlspecialchars($url);
$CMS["%root%"]=rtrim($root, '/');
$CMS["%lang%"]=$lang;
$CMS["%unknownAuthor%"]="Jan Tojnar";
$CMS["%headerLinkHref%"]=rplc("%root%/").$lang;
$CMS["%pretitle%"]=$pretitle;
$CMS["%comefrom%"]=$_SERVER["HTTP_REFERER"];
$CMS["%dateFormat%"]="d.m.Y H:i";
function rplc($string){
global $CMS;
return str_replace(array_keys($CMS),$CMS,$string);
$page = htmlspecialchars($_GET['page']);
$pretitle = '6. přeshraniční skirogaining';
$mainMail = 'tojnar@gmail.com';
include $lang . '.php';
$CMS['%url%'] = 'http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars($url);
$CMS['%root%'] = rtrim($root, '/');
$CMS['%lang%'] = $lang;
$CMS['%unknownAuthor%'] = 'Jan Tojnar';
$CMS['%headerLinkHref%'] = rplc('%root%/') . $lang;
$CMS['%pretitle%'] = $pretitle;
$CMS['%comefrom%'] = $_SERVER['HTTP_REFERER'];
$CMS['%dateFormat%'] = 'd.m.Y H:i';
function rplc($string) {
global $CMS;
return str_replace(array_keys($CMS), $CMS, $string);
}
require __DIR__ . '/../sboard.php';
require __DIR__ . '/../load.lib.php';
readPage($page);
$CMS["%releasedate%"]=toDate($date);
$CMS["%releasetime%"]=toTime($date);
if(isReleased($date)==false){
$notreleased=true;
}else{
$notreleased=false;
$CMS['%releasedate%'] = toDate($date);
$CMS['%releasetime%'] = toTime($date);
if (isReleased($date) == false) {
$notreleased = true;
} else {
$notreleased = false;
}
if($notreleased==true){
readPage("error/notreleased");
if ($notreleased == true) {
readPage('error/notreleased');
}
$CMS["%title%"]=$title;
$CMS["%titleTag%"]=str_replace(array("%pretitle%","%title%"),array($pretitle,$title),rplc("%longTitle%"));
$CMS["%langPanel%"]=$langPanel;
$CMS["%article%"]=$article;
$CMS["%menu%"]=$menu;
if(!empty($author) AND !empty($date)){
$aInfo=str_replace(array("%author%","%date%","%time%"),array(author($author),toDate($date),toTime($date)),rplc("%by%"));
}elseif(!empty($author)){
$aInfo=str_replace("%author%",author($author),rplc("%byAuthor%"));
}elseif(!empty($date)){
$aInfo=str_replace(array("%date%","%time%"),array(toDate($date),toTime($date)),rplc("%byDate%"));
}else{
$aInfo="";
$CMS['%title%'] = $title;
$CMS['%titleTag%'] = str_replace(['%pretitle%', '%title%'], [$pretitle, $title], rplc('%longTitle%'));
$CMS['%langPanel%'] = $langPanel;
$CMS['%article%'] = $article;
$CMS['%menu%'] = $menu;
if (!empty($author) and !empty($date)) {
$aInfo = str_replace(['%author%', '%date%', '%time%'], [author($author), toDate($date), toTime($date)], rplc('%by%'));
} elseif (!empty($author)) {
$aInfo = str_replace('%author%', author($author), rplc('%byAuthor%'));
} elseif (!empty($date)) {
$aInfo = str_replace(['%date%', '%time%'], [toDate($date), toTime($date)], rplc('%byDate%'));
} else {
$aInfo = '';
}
//var_dump(date(rplc("%dateFormat%"),filemtime($realPage)));
$CMS["%author%"]=$author;
$CMS["%ainfo%"]=$aInfo;
$CMS['%author%'] = $author;
$CMS['%ainfo%'] = $aInfo;
?>
<?php
ob_start(/*"ob_gzhandler"*/);
include("template.html");
$buffer=ob_get_clean();
echo(rplc(rplc($buffer)));
include 'template.html';
$buffer = ob_get_clean();
echo rplc(rplc($buffer));
?>

View File

@@ -1,30 +1,31 @@
<?php
header("Content-Type: text/plain; charset=utf-8");
function directoryToArray($directory,$recursive){
$array_items=array();
if($handle=opendir($directory)){
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
if(is_dir($directory."/".$file)){
if($recursive){
$array_items=array_merge($array_items,directoryToArray($directory. "/".$file,$recursive));
header('Content-Type: text/plain; charset=utf-8');
function directoryToArray($directory, $recursive) {
$array_items = [];
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (is_dir($directory . '/' . $file)) {
if ($recursive) {
$array_items = array_merge($array_items, directoryToArray($directory . '/' . $file, $recursive));
}
$file = $directory . '/' . $file;
} else {
$file = $directory . '/' . $file;
$array_items[] = preg_replace("/\/\//si", '/', $file);
}
}
}
closedir($handle);
}
return $array_items;
}
$file=$directory."/".$file;
}else{
$file=$directory."/".$file;
$array_items[]=preg_replace("/\/\//si","/",$file);
$files = directoryToArray('./pages', true);
foreach ($files as $file) {
if (substr($file, -3) == '.pg' and (substr($file, 0, 17) != './pages/cs/error/' and substr($file, 0, 17) != './pages/en/error/' and substr($file, 0, 17) != './pages/de/error/')) {
$list .= substr($file, 0, -3) . "\n";
}
}
}
}
closedir($handle);
}
return $array_items;
}
$files=directoryToArray("./pages",true);
foreach($files as $file){
if(substr($file,-3)==".pg" AND (substr($file,0,17)!="./pages/cs/error/" AND substr($file,0,17)!="./pages/en/error/" AND substr($file,0,17)!="./pages/de/error/")){
$list.=substr($file,0,-3)."\n";
}
}
echo(str_replace("./pages","http://".$_SERVER["HTTP_HOST"],$list));
?>
echo str_replace('./pages', 'http://' . $_SERVER['HTTP_HOST'], $list);

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="leden";
$CMS["%february%"]="únor";
$CMS["%march%"]="březen";
$CMS["%april%"]="duben";
$CMS["%may%"]="květen";
$CMS["%june%"]="červen";
$CMS["%july%"]="červenec";
$CMS["%august%"]="srpen";
$CMS["%september%"]="září";
$CMS["%october%"]="říjen";
$CMS["%november%"]="listopad";
$CMS["%december%"]="prosinec";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Zadejte zprávu";
$CMS["%messages:%"]="Vzkazy:";
$CMS["%name:%"]="Jméno:";
$CMS["%message:%"]="Vzkaz:";
$CMS["%password:%"]="Heslo:";
$CMS["%red%"]="červená";
$CMS["%green%"]="zelená";
$CMS["%blue%"]="modrá";
$CMS["%yellow%"]="žlutá";
$CMS["%purple%"]="fialová";
$CMS["%color:%"]="Barva:";
$CMS["%send%"]="Odeslat";
$CMS["%notrequiredpassword%"]="Není vyžadováno";
$CMS["%no%"]="ne";
$CMS["%yes%"]="ano";
$CMS["%areyourobot%"]="Jste robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Hledat";
$CMS["%req%"]="(vyžadováno)";
$CMS["%gotop%"]="&#8593;Nahoru";
$CMS["%misspost%"]="Nezadali jste zprávu";
$CMS["%missname%"]="Nezadali jste jméno";
$CMS["%wrongcode%"]="Zadal jste špatný ověřovací kód";
$CMS["%wrongmail%"]="To co jste zadali není platný e-mail";
$CMS["%saved%"]="Zpráva byla odeslána";
$CMS["%notsaved%"]="Zpráva nebyla odeslána";
$CMS["%showmail%"]="Zobrazovat e-mail každému";
$CMS["%wrongwww%"]="To co jste zadali není platné <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'leden';
$CMS['%february%'] = 'únor';
$CMS['%march%'] = 'březen';
$CMS['%april%'] = 'duben';
$CMS['%may%'] = 'květen';
$CMS['%june%'] = 'červen';
$CMS['%july%'] = 'červenec';
$CMS['%august%'] = 'srpen';
$CMS['%september%'] = 'září';
$CMS['%october%'] = 'říjen';
$CMS['%november%'] = 'listopad';
$CMS['%december%'] = 'prosinec';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Zadejte zprávu';
$CMS['%messages:%'] = 'Vzkazy:';
$CMS['%name:%'] = 'Jméno:';
$CMS['%message:%'] = 'Vzkaz:';
$CMS['%password:%'] = 'Heslo:';
$CMS['%red%'] = 'červená';
$CMS['%green%'] = 'zelená';
$CMS['%blue%'] = 'modrá';
$CMS['%yellow%'] = 'žlutá';
$CMS['%purple%'] = 'fialová';
$CMS['%color:%'] = 'Barva:';
$CMS['%send%'] = 'Odeslat';
$CMS['%notrequiredpassword%'] = 'Není vyžadováno';
$CMS['%no%'] = 'ne';
$CMS['%yes%'] = 'ano';
$CMS['%areyourobot%'] = 'Jste robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Hledat';
$CMS['%req%'] = '(vyžadováno)';
$CMS['%gotop%'] = '&#8593;Nahoru';
$CMS['%misspost%'] = 'Nezadali jste zprávu';
$CMS['%missname%'] = 'Nezadali jste jméno';
$CMS['%wrongcode%'] = 'Zadal jste špatný ověřovací kód';
$CMS['%wrongmail%'] = 'To co jste zadali není platný e-mail';
$CMS['%saved%'] = 'Zpráva byla odeslána';
$CMS['%notsaved%'] = 'Zpráva nebyla odeslána';
$CMS['%showmail%'] = 'Zobrazovat e-mail každému';
$CMS['%wrongwww%'] = 'To co jste zadali není platné <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Nápověda</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>není podporováno</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]žluté písmo[/yellow]</dt><dd><span class="yellow">žluté písmo</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:3wantrdnnzy";
$CMS["%eustring%"]="Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:3wantrdnnzy';
$CMS['%eustring%'] = 'Tento projekt byl podpořen z Evropského fondu pro regionální rozvoj, fondu malých projektů Programu Cíl 3 na podporu přeshraniční spolupráce mezi Českou republikou a Svobodným státem Sasko 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'Das Projekt wurde von dem Europäischen Fonds für Regionalentwicklung (KPF, Ziel 3 - Programm zur Förderung der grenzübergreifenden Zusammenarbeit zwischen dem Freistaat Sachsen und der Tschechischen Republik 2007-2013) unterstützt.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,52 +1,53 @@
<?php
if($included==true){
$CMS["%by%"]="%author% ~ %date%, %time%";
$CMS["%january%"]="of January";
$CMS["%february%"]="of February";
$CMS["%march%"]="of March";
$CMS["%april%"]="of April";
$CMS["%may%"]="of May";
$CMS["%june%"]="of June";
$CMS["%july%"]="of July";
$CMS["%august%"]="of August";
$CMS["%september%"]="of September";
$CMS["%october%"]="of October";
$CMS["%november%"]="of November";
$CMS["%december%"]="of December";
$CMS["%date%"]="%d%. %m%. %y%";
$CMS["%byAuthor%"]="%author%";
$CMS["%byDate%"]="%date%, %time%";
$CMS["%longTitle%"]="%title% - %pretitle%";
$CMS["%enterpost%"]="Enter message";
$CMS["%messages:%"]="Messages:";
$CMS["%name:%"]="Name:";
$CMS["%message:%"]="Message:";
$CMS["%password:%"]="Password:";
$CMS["%red%"]="red";
$CMS["%green%"]="green";
$CMS["%blue%"]="blue";
$CMS["%yellow%"]="yellow";
$CMS["%purple%"]="purple";
$CMS["%color:%"]="Color:";
$CMS["%send%"]="Submit";
$CMS["%notrequiredpassword%"]="Not required";
$CMS["%no%"]="no";
$CMS["%yes%"]="yes";
$CMS["%areyourobot%"]="Are you robot?";
$CMS["%www:%"]="WWW:";
$CMS["%email:%"]="E-Mail:";
$CMS["%search%"]="Search";
$CMS["%req%"]="(required)";
$CMS["%gotop%"]="&#8593;Go top";
$CMS["%misspost%"]="Message is missing";
$CMS["%missname%"]="Name is missing";
$CMS["%wrongcode%"]="You have entered wrong verification code";
$CMS["%wrongmail%"]="You have entered wrong e-mail";
$CMS["%saved%"]="Message have been sent";
$CMS["%notsaved%"]="Message have not been sent";
$CMS["%showmail%"]="Show e-mail to everyone";
$CMS["%wrongwww%"]="You have entered wrong <abbr title=\"Uniform Resource Locale\">URL</abbr>";
$CMS["%sbhelp%"]=<<<EOT
if ($included == true) {
$CMS['%by%'] = '%author% ~ %date%, %time%';
$CMS['%january%'] = 'of January';
$CMS['%february%'] = 'of February';
$CMS['%march%'] = 'of March';
$CMS['%april%'] = 'of April';
$CMS['%may%'] = 'of May';
$CMS['%june%'] = 'of June';
$CMS['%july%'] = 'of July';
$CMS['%august%'] = 'of August';
$CMS['%september%'] = 'of September';
$CMS['%october%'] = 'of October';
$CMS['%november%'] = 'of November';
$CMS['%december%'] = 'of December';
$CMS['%date%'] = '%d%. %m%. %y%';
$CMS['%byAuthor%'] = '%author%';
$CMS['%byDate%'] = '%date%, %time%';
$CMS['%longTitle%'] = '%title% - %pretitle%';
$CMS['%enterpost%'] = 'Enter message';
$CMS['%messages:%'] = 'Messages:';
$CMS['%name:%'] = 'Name:';
$CMS['%message:%'] = 'Message:';
$CMS['%password:%'] = 'Password:';
$CMS['%red%'] = 'red';
$CMS['%green%'] = 'green';
$CMS['%blue%'] = 'blue';
$CMS['%yellow%'] = 'yellow';
$CMS['%purple%'] = 'purple';
$CMS['%color:%'] = 'Color:';
$CMS['%send%'] = 'Submit';
$CMS['%notrequiredpassword%'] = 'Not required';
$CMS['%no%'] = 'no';
$CMS['%yes%'] = 'yes';
$CMS['%areyourobot%'] = 'Are you robot?';
$CMS['%www:%'] = 'WWW:';
$CMS['%email:%'] = 'E-Mail:';
$CMS['%search%'] = 'Search';
$CMS['%req%'] = '(required)';
$CMS['%gotop%'] = '&#8593;Go top';
$CMS['%misspost%'] = 'Message is missing';
$CMS['%missname%'] = 'Name is missing';
$CMS['%wrongcode%'] = 'You have entered wrong verification code';
$CMS['%wrongmail%'] = 'You have entered wrong e-mail';
$CMS['%saved%'] = 'Message have been sent';
$CMS['%notsaved%'] = 'Message have not been sent';
$CMS['%showmail%'] = 'Show e-mail to everyone';
$CMS['%wrongwww%'] = 'You have entered wrong <abbr title="Uniform Resource Locale">URL</abbr>';
$CMS['%sbhelp%'] = <<<EOT
<h3>Help</h3>
<dl>
<dt><abbr title="HyperText Markup Language">HTML</abbr></dt><dd>not supported</dd>
@@ -59,10 +60,9 @@ $CMS["%sbhelp%"]=<<<EOT
<dt>[yellow]yellow text[/yellow]</dt><dd><span class="yellow">yellow text</span></dd>
</dl>
EOT;
$CMS["%searchform%"]="006883172923970328180:bfehocs55i8";
$CMS["%eustring%"]="The project was supported from European fund of regional development, Common fund of small projects, Programme \"Cil 3\" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.";
}else{
header("HTTP/1.0 403 Forbidden");
header("Location: /en/error/403");
$CMS['%searchform%'] = '006883172923970328180:bfehocs55i8';
$CMS['%eustring%'] = 'The project was supported from European fund of regional development, Common fund of small projects, Programme "Cil 3" supporting collaboration of the Czech Republic and Free State Saxony 2007-2013.';
} else {
header('HTTP/1.0 403 Forbidden');
header('Location: /en/error/403');
}
?>

View File

@@ -1,81 +1,84 @@
<?php
function stringEndsWith($string, $end) {
if(strLen($end)==0)
return false;
return (substr($string, -strLen($end))==$end);
if (strlen($end) == 0) {
return false;
}
return substr($string, -strlen($end)) == $end;
}
session_start();
$included=true;
$included = true;
$locale = 'cs';
$url=$_SERVER["REQUEST_URI"];
$root="/2015/";
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root)+strlen($root));
if($uri==''){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$locale.'/');
exit;
}elseif(preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if(stringEndsWith($matches[2], 'main')){
header('Location: http://'.$_SERVER['HTTP_HOST'].$root.$lang.'/'.substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
}elseif(preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)){
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2])?$matches[2].'/':'').'main';
}else{
$_GET['error'] = 404;
$url = $_SERVER['REQUEST_URI'];
$root = '/2015/';
$uri = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], $root) + strlen($root));
if ($uri == '') {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $locale . '/');
exit;
} elseif (preg_match('/^([a-z]{2})(?:\\/(.+)(\\?.*)?)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
if (stringEndsWith($matches[2], 'main')) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . $root . $lang . '/' . substr($matches[2], 0, -4));
exit;
}
$_GET['page'] = $matches[2];
} elseif (preg_match('/^([a-z]{2})\\/(?:(.*)\\/)?$/', $uri, $matches)) {
$lang = htmlspecialchars(substr($matches[1], 0, 2));
$_GET['page'] = (isset($matches[2]) ? $matches[2] . '/' : '') . 'main';
} else {
$_GET['error'] = 404;
}
$page=htmlspecialchars($_GET["page"]);
$pretitle="5. přeshraniční skirogaining";
$mainMail="tojnar@gmail.com";
include($lang.".php");
$CMS["%url%"]="http://".$_SERVER['HTTP_HOST'].htmlspecialchars($url);
$CMS["%root%"]=rtrim($root, '/');
$CMS["%lang%"]=$lang;
$CMS["%unknownAuthor%"]="Jan Tojnar";
$CMS["%headerLinkHref%"]=rplc("%root%/").$lang;
$CMS["%pretitle%"]=$pretitle;
$CMS["%comefrom%"]=$_SERVER["HTTP_REFERER"];
$CMS["%dateFormat%"]="d.m.Y H:i";
function rplc($string){
global $CMS;
return str_replace(array_keys($CMS),$CMS,$string);
$page = htmlspecialchars($_GET['page']);
$pretitle = '5. přeshraniční skirogaining';
$mainMail = 'tojnar@gmail.com';
include $lang . '.php';
$CMS['%url%'] = 'http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars($url);
$CMS['%root%'] = rtrim($root, '/');
$CMS['%lang%'] = $lang;
$CMS['%unknownAuthor%'] = 'Jan Tojnar';
$CMS['%headerLinkHref%'] = rplc('%root%/') . $lang;
$CMS['%pretitle%'] = $pretitle;
$CMS['%comefrom%'] = $_SERVER['HTTP_REFERER'];
$CMS['%dateFormat%'] = 'd.m.Y H:i';
function rplc($string) {
global $CMS;
return str_replace(array_keys($CMS), $CMS, $string);
}
require __DIR__ . '/../sboard.php';
require __DIR__ . '/../load.lib.php';
readPage($page);
$CMS["%releasedate%"]=toDate($date);
$CMS["%releasetime%"]=toTime($date);
if(isReleased($date)==false){
$notreleased=true;
}else{
$notreleased=false;
$CMS['%releasedate%'] = toDate($date);
$CMS['%releasetime%'] = toTime($date);
if (isReleased($date) == false) {
$notreleased = true;
} else {
$notreleased = false;
}
if($notreleased==true){
readPage("error/notreleased");
if ($notreleased == true) {
readPage('error/notreleased');
}
$CMS["%title%"]=$title;
$CMS["%titleTag%"]=str_replace(array("%pretitle%","%title%"),array($pretitle,$title),rplc("%longTitle%"));
$CMS["%langPanel%"]=$langPanel;
$CMS["%article%"]=$article;
$CMS["%menu%"]=$menu;
if(!empty($author) AND !empty($date)){
$aInfo=str_replace(array("%author%","%date%","%time%"),array(author($author),toDate($date),toTime($date)),rplc("%by%"));
}elseif(!empty($author)){
$aInfo=str_replace("%author%",author($author),rplc("%byAuthor%"));
}elseif(!empty($date)){
$aInfo=str_replace(array("%date%","%time%"),array(toDate($date),toTime($date)),rplc("%byDate%"));
}else{
$aInfo="";
$CMS['%title%'] = $title;
$CMS['%titleTag%'] = str_replace(['%pretitle%', '%title%'], [$pretitle, $title], rplc('%longTitle%'));
$CMS['%langPanel%'] = $langPanel;
$CMS['%article%'] = $article;
$CMS['%menu%'] = $menu;
if (!empty($author) and !empty($date)) {
$aInfo = str_replace(['%author%', '%date%', '%time%'], [author($author), toDate($date), toTime($date)], rplc('%by%'));
} elseif (!empty($author)) {
$aInfo = str_replace('%author%', author($author), rplc('%byAuthor%'));
} elseif (!empty($date)) {
$aInfo = str_replace(['%date%', '%time%'], [toDate($date), toTime($date)], rplc('%byDate%'));
} else {
$aInfo = '';
}
//var_dump(date(rplc("%dateFormat%"),filemtime($realPage)));
$CMS["%author%"]=$author;
$CMS["%ainfo%"]=$aInfo;
$CMS['%author%'] = $author;
$CMS['%ainfo%'] = $aInfo;
?>
<?php
ob_start(/*"ob_gzhandler"*/);
include("template.html");
$buffer=ob_get_clean();
echo(rplc(rplc($buffer)));
include 'template.html';
$buffer = ob_get_clean();
echo rplc(rplc($buffer));
?>

View File

@@ -1,30 +1,31 @@
<?php
header("Content-Type: text/plain; charset=utf-8");
function directoryToArray($directory,$recursive){
$array_items=array();
if($handle=opendir($directory)){
while(false!==($file=readdir($handle))){
if($file!="."&&$file!=".."){
if(is_dir($directory."/".$file)){
if($recursive){
$array_items=array_merge($array_items,directoryToArray($directory. "/".$file,$recursive));
header('Content-Type: text/plain; charset=utf-8');
function directoryToArray($directory, $recursive) {
$array_items = [];
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (is_dir($directory . '/' . $file)) {
if ($recursive) {
$array_items = array_merge($array_items, directoryToArray($directory . '/' . $file, $recursive));
}
$file = $directory . '/' . $file;
} else {
$file = $directory . '/' . $file;
$array_items[] = preg_replace("/\/\//si", '/', $file);
}
}
}
closedir($handle);
}
return $array_items;
}
$file=$directory."/".$file;
}else{
$file=$directory."/".$file;
$array_items[]=preg_replace("/\/\//si","/",$file);
$files = directoryToArray('./pages', true);
foreach ($files as $file) {
if (substr($file, -3) == '.pg' and (substr($file, 0, 17) != './pages/cs/error/' and substr($file, 0, 17) != './pages/en/error/' and substr($file, 0, 17) != './pages/de/error/')) {
$list .= substr($file, 0, -3) . "\n";
}
}
}
}
closedir($handle);
}
return $array_items;
}
$files=directoryToArray("./pages",true);
foreach($files as $file){
if(substr($file,-3)==".pg" AND (substr($file,0,17)!="./pages/cs/error/" AND substr($file,0,17)!="./pages/en/error/" AND substr($file,0,17)!="./pages/de/error/")){
$list.=substr($file,0,-3)."\n";
}
}
echo(str_replace("./pages","http://".$_SERVER["HTTP_HOST"],$list));
?>
echo str_replace('./pages', 'http://' . $_SERVER['HTTP_HOST'], $list);