o: ActiveSupport::Cache::Entry :@compressedF: @value"oŸ"iŸ
Web/DirectLink.en.tmpl
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
  <head>
4
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
    <title> MLAB Page Template </title>
6
    <meta name="keywords" content="MLAB Universal Electronic Modules and Articles Processors Electronics">
7
    <meta name="description" content="MLAB Project, Page Template">
8
    <!-- AUTOINCLUDE START "Page/Head.en.ihtml" DO NOT REMOVE -->
9
    <link rel="StyleSheet" href="../../Web/CSS/MLAB.css" type="text/css" title="MLAB Basic Style">
10
    <link rel="StyleSheet" href="../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
11
    <link rel="shortcut icon" type="image/x-icon" href="../../Web/PIC/MLAB.ico">
12
    <script type="text/javascript" src="../../Web/JS/MLAB_Menu.js"></script>
13
    <!-- AUTOINCLUDE END -->
14
  </head>
15

  
16
  <body lang="en">
17

  
18
    <!-- AUTOINCLUDE START "Page/Header.en.ihtml" DO NOT REMOVE -->
19
    <!-- ============== HEADER ============== -->
20
    <div class="Header">
21
      <script type="text/javascript">
22
      <!--
23
        SetRelativePath("../../");
24
        DrawHeader();
25
      // -->
26
      </script>
27
      <noscript>
28
        <p><b> JavaScript is required for including of the header </b></p>
29
      </noscript>
30
    </div>
31
    <!-- AUTOINCLUDE END -->
32

  
33
    <!-- AUTOINCLUDE START "Page/Menu.en.ihtml" DO NOT REMOVE -->
34
    <!-- ============== MENU ============== -->
35
    <div class="Menu">
36
      <script type="text/javascript">
37
      <!--
38
        SetRelativePath("../../");
39
        DrawMenu();
40
      // -->
41
      </script>
42
      <noscript>
43
        <p><b> JavaScript is required for including of the menu </b><p>
44
      </noscript>
45
    </div>
46
    <!-- AUTOINCLUDE END -->
47

  
48
    <!-- ============== TEXT ============== -->
49
    <div class="Text">
50
      <p class="Title">
51
        Page Title
52
      </p>
53
      <p class=Autor>
54
        Authors name
55
      </p>
56
      <p class=Subtitle>
57
        You have entered unknown link so we have prepared for you list of
58
        all defined Direct Links.
59
      </p>
60
      <p>
61
	<<DIRECTLINK Direct Link>>
62
	<<REDIRECT Redirected to>>
63
        <<TABLE>>
64
      </p>
65
    </div>
66

  
67
    <!-- AUTOINCLUDE START "Page/Footer.en.ihtml" DO NOT REMOVE -->
68
    <!-- ============== FOOTER ============== -->
69
    <div class="Footer">
70
      <script type="text/javascript">
71
      <!--
72
        SetRelativePath("../../");
73
        DrawFooter();
74
      // -->
75
      </script>
76
      <noscript>
77
        <p><b> JavaScript is required for including of the footer </b></p>
78
      </noscript>
79
    </div>
80
    <!-- AUTOINCLUDE END -->
81

  
82
  </body>
83
</html>
Web/DirectLink.php
11 11

  
12 12
// Clear variables
13 13
unset($Redirect);
14
unset($RedirectUpper);
14 15
unset($RedirectToPage);
15 16
unset($Lang);
16 17

  
......
20 21
// Do all upcase
21 22
foreach($Redirect as $Key => $Value)
22 23
{
23
    $RedirectNew[strtoupper($Key)]=$Value;
24
    $RedirectUpper[strtoupper($Key)]=$Value;
24 25
}
25
$Redirect=$RedirectNew;
26
unset($RedirectNew);
27 26

  
28 27
// Process language
29 28
$Lang=$_SERVER[SCRIPT_FILENAME];
......
31 30
if ($Lang==$_SERVER[SCRIPT_FILENAME]) $Lang="";
32 31

  
33 32
// Find redirect
34
$RedirectToPage=$Redirect[strtoupper(urldecode($_SERVER[QUERY_STRING]))];
33
$RedirectToPage=$RedirectUpper[strtoupper(urldecode($_SERVER[QUERY_STRING]))];
35 34

  
36 35
// If not found -> list all posibilities
37 36
if ($RedirectToPage=="") 
38 37
    {
39
	$RedirectToPage="/"; // DOPSAT
40
	// VYPIS a KONEC
38
	// File Name
39
	if ($Lang=="")
40
	    $Lang="en";
41
	$FileName="DirectLink.$Lang.tmpl";
42
	// Read Template
43
	$Template=@file($FileName);
44
	// Trim Lines
45
	if ($Template<>FALSE)
46
	{
47
	    foreach($Template as $Key => $Line)
48
	    {
49
		$Template[$Key]=rtrim($Line);
50
	    }
51
	    $Template=implode("\n",$Template);
52
	}
53
	// Generate List
54
	$Table ="";
55
	$Table.="<table>\n";
56
	$Table.="  <tr>\n";
57
	$Table.="    <th> Direct Link </th>\n";
58
	$Table.="    <th> Redirected to </th>\n";
59
	$Table.="  </tr>\n";
60
	foreach($Redirect as $Key => $Value)
61
	{
62
	    $Table.="  <tr>\n";
63
	    $Table.="    <td> $Key </td>\n";
64
	    $Table.="    <td> $Value </td>\n";
65
	    $Table.="  </tr>\n";
66
	}
67
	$Table.="<table>\n";
68
	// Put it into Template
69
	if ($Template<>"")
70
	    print str_ireplace("<<Table>>", $Table, $Template);
71
	else
72
	    print $Table;
73
	// Finished
74
	return 0;
41 75
    }
42 76
else
43 77
    {
44
	if ($Lang<>"") 
45
	if (file_exists($RedirectToPage.".".$Lang.".html"))
78
	if ($Lang<>"")
79
	if (file_exists($_SERVER["DOCUMENT_ROOT"].$RedirectToPage.".".$Lang.".html"))
46 80
	    $RedirectToPage.=".".$Lang.".html";
47
	// DOPSAT - zkusit ENG/CZE verzi
48 81
    }
49 82

  
50 83
// Redirect page
Web/DirectLink.cs.tmpl
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
  <head>
4
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
    <title> MLAB Rychle odkazy </title>
6
    <meta name="keywords" content="stavebnice MLAB univerzální moduly">
7
    <meta name="description" content="Projekt MLAB, Rychle odkazy">
8
    <!-- AUTOINCLUDE START "Page/Head.cs.ihtml" DO NOT REMOVE -->
9
    <link rel="StyleSheet" href="../../Web/CSS/MLAB.css" type="text/css" title="MLAB základní styl">
10
    <link rel="StyleSheet" href="../../Web/CSS/MLAB_Print.css" type="text/css" media="print">
11
    <link rel="shortcut icon" type="image/x-icon" href="../../Web/PIC/MLAB.ico">
12
    <script type="text/javascript" src="../../Web/JS/MLAB_Menu.js"></script>
13
    <!-- AUTOINCLUDE END -->
14
  </head>
15

  
16
  <body lang="cs">
17

  
18
    <!-- AUTOINCLUDE START "Page/Header.cs.ihtml" DO NOT REMOVE -->
19
    <!-- ============== HLAVICKA ============== -->
20
    <div class="Header">
21
      <script type="text/javascript">
22
      <!--
23
        SetRelativePath("../../");
24
        DrawHeader();
25
      // -->
26
      </script>
27
      <noscript>
28
        <p><b> Pro zobrazení (vložení) hlavičky je potřeba JavaScript </b></p>
29
      </noscript>
30
    </div>
31
    <!-- AUTOINCLUDE END -->
32

  
33
    <!-- AUTOINCLUDE START "Page/Menu.cs.ihtml" DO NOT REMOVE -->
34
    <!-- ============== MENU ============== -->
35
    <div class="Menu">
36
      <script type="text/javascript">
37
      <!--
38
        SetRelativePath("../../");
39
        DrawMenu();
40
      // -->
41
      </script>
42
      <noscript>
43
        <p><b> Pro zobrazení (vložení) menu je potřeba JavaScript </b></p>
44
      </noscript>
45
    </div>
46
    <!-- AUTOINCLUDE END -->
47

  
48
    <!-- ============== TEXT ============== -->
49
    <div class="Text">
50
      <p class="Title">
51
        NázRychle odkazy
52
      </p>
53
      <p class="Subtitle">
54
        Protoze jste zadali odkaz, ktery neni definovan pripravili jsme
55
        pro Vas seznam definovanych rychlych odkazu.
56
      </p>
57
      <p>
58
        <<DIRECTLINK Rychly odkaz>>
59
	<<REDIRECTION Presmerovani>>
60
        <<TABLE>>
61
      </p>
62
    </div>
63

  
64
    <!-- AUTOINCLUDE START "Page/Footer.cs.ihtml" DO NOT REMOVE -->
65
    <!-- ============== PATIČKA ============== -->
66
    <div class="Footer">
67
      <script type="text/javascript">
68
      <!--
69
        SetRelativePath("../../");
70
        DrawFooter();
71
      // -->
72
      </script>
73
      <noscript>
74
        <p><b> Pro zobrazení (vložení) hlavičky je potřeba JavaScript </b></p>
75
      </noscript>
76
    </div>
77
    <!-- AUTOINCLUDE END -->
78

  
79
  </body>
80
</html>
:@created_atf1418542209.836659‹Ò:@expires_in0