/Web/DirectLink.cs.tmpl
0,0 → 1,80
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> MLAB Rychle odkazy </title>
<meta name="keywords" content="stavebnice MLAB univerzální moduly">
<meta name="description" content="Projekt MLAB, Rychle odkazy">
<!-- AUTOINCLUDE START "Page/Head.cs.ihtml" DO NOT REMOVE -->
<link rel="StyleSheet" href="../../Web/CSS/MLAB.css" type="text/css" title="MLAB základní styl">
<link rel="StyleSheet" href="../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
<link rel="shortcut icon" type="image/x-icon" href="../../Web/PIC/MLAB.ico">
<script type="text/javascript" src="../../Web/JS/MLAB_Menu.js"></script>
<!-- AUTOINCLUDE END -->
</head>
 
<body lang="cs">
 
<!-- AUTOINCLUDE START "Page/Header.cs.ihtml" DO NOT REMOVE -->
<!-- ============== HLAVICKA ============== -->
<div class="Header">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawHeader();
// -->
</script>
<noscript>
<p><b> Pro zobrazení (vložení) hlavičky je potřeba JavaScript </b></p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<!-- AUTOINCLUDE START "Page/Menu.cs.ihtml" DO NOT REMOVE -->
<!-- ============== MENU ============== -->
<div class="Menu">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawMenu();
// -->
</script>
<noscript>
<p><b> Pro zobrazení (vložení) menu je potřeba JavaScript </b></p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<!-- ============== TEXT ============== -->
<div class="Text">
<p class="Title">
NázRychle odkazy
</p>
<p class="Subtitle">
Protoze jste zadali odkaz, ktery neni definovan pripravili jsme
pro Vas seznam definovanych rychlych odkazu.
</p>
<p>
<<DIRECTLINK Rychly odkaz>>
<<REDIRECTION Presmerovani>>
<<TABLE>>
</p>
</div>
 
<!-- AUTOINCLUDE START "Page/Footer.cs.ihtml" DO NOT REMOVE -->
<!-- ============== PATIČKA ============== -->
<div class="Footer">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawFooter();
// -->
</script>
<noscript>
<p><b> Pro zobrazení (vložení) hlavičky je potřeba JavaScript </b></p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
</body>
</html>
/Web/DirectLink.en.tmpl
0,0 → 1,83
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> MLAB Page Template </title>
<meta name="keywords" content="MLAB Universal Electronic Modules and Articles Processors Electronics">
<meta name="description" content="MLAB Project, Page Template">
<!-- AUTOINCLUDE START "Page/Head.en.ihtml" DO NOT REMOVE -->
<link rel="StyleSheet" href="../../Web/CSS/MLAB.css" type="text/css" title="MLAB Basic Style">
<link rel="StyleSheet" href="../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
<link rel="shortcut icon" type="image/x-icon" href="../../Web/PIC/MLAB.ico">
<script type="text/javascript" src="../../Web/JS/MLAB_Menu.js"></script>
<!-- AUTOINCLUDE END -->
</head>
 
<body lang="en">
 
<!-- AUTOINCLUDE START "Page/Header.en.ihtml" DO NOT REMOVE -->
<!-- ============== HEADER ============== -->
<div class="Header">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawHeader();
// -->
</script>
<noscript>
<p><b> JavaScript is required for including of the header </b></p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<!-- AUTOINCLUDE START "Page/Menu.en.ihtml" DO NOT REMOVE -->
<!-- ============== MENU ============== -->
<div class="Menu">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawMenu();
// -->
</script>
<noscript>
<p><b> JavaScript is required for including of the menu </b><p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
<!-- ============== TEXT ============== -->
<div class="Text">
<p class="Title">
Page Title
</p>
<p class=Autor>
Authors name
</p>
<p class=Subtitle>
You have entered unknown link so we have prepared for you list of
all defined Direct Links.
</p>
<p>
<<DIRECTLINK Direct Link>>
<<REDIRECT Redirected to>>
<<TABLE>>
</p>
</div>
 
<!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
<!-- ============== FOOTER ============== -->
<div class="Footer">
<script type="text/javascript">
<!--
SetRelativePath("../../");
DrawFooter();
// -->
</script>
<noscript>
<p><b> JavaScript is required for including of the footer </b></p>
</noscript>
</div>
<!-- AUTOINCLUDE END -->
 
</body>
</html>
/Web/DirectLink.php
11,6 → 11,7
 
// Clear variables
unset($Redirect);
unset($RedirectUpper);
unset($RedirectToPage);
unset($Lang);
 
20,10 → 21,8
// Do all upcase
foreach($Redirect as $Key => $Value)
{
$RedirectNew[strtoupper($Key)]=$Value;
$RedirectUpper[strtoupper($Key)]=$Value;
}
$Redirect=$RedirectNew;
unset($RedirectNew);
 
// Process language
$Lang=$_SERVER[SCRIPT_FILENAME];
31,20 → 30,54
if ($Lang==$_SERVER[SCRIPT_FILENAME]) $Lang="";
 
// Find redirect
$RedirectToPage=$Redirect[strtoupper(urldecode($_SERVER[QUERY_STRING]))];
$RedirectToPage=$RedirectUpper[strtoupper(urldecode($_SERVER[QUERY_STRING]))];
 
// If not found -> list all posibilities
if ($RedirectToPage=="")
{
$RedirectToPage="/"; // DOPSAT
// VYPIS a KONEC
// File Name
if ($Lang=="")
$Lang="en";
$FileName="DirectLink.$Lang.tmpl";
// Read Template
$Template=@file($FileName);
// Trim Lines
if ($Template<>FALSE)
{
foreach($Template as $Key => $Line)
{
$Template[$Key]=rtrim($Line);
}
$Template=implode("\n",$Template);
}
// Generate List
$Table ="";
$Table.="<table>\n";
$Table.=" <tr>\n";
$Table.=" <th> Direct Link </th>\n";
$Table.=" <th> Redirected to </th>\n";
$Table.=" </tr>\n";
foreach($Redirect as $Key => $Value)
{
$Table.=" <tr>\n";
$Table.=" <td> $Key </td>\n";
$Table.=" <td> $Value </td>\n";
$Table.=" </tr>\n";
}
$Table.="<table>\n";
// Put it into Template
if ($Template<>"")
print str_ireplace("<<Table>>", $Table, $Template);
else
print $Table;
// Finished
return 0;
}
else
{
if ($Lang<>"")
if (file_exists($RedirectToPage.".".$Lang.".html"))
if ($Lang<>"")
if (file_exists($_SERVER["DOCUMENT_ROOT"].$RedirectToPage.".".$Lang.".html"))
$RedirectToPage.=".".$Lang.".html";
// DOPSAT - zkusit ENG/CZE verzi
}
 
// Redirect page