791 |
root |
1 |
<?php |
|
|
2 |
if ($HTTP_GET_VARS["lang"] == "en") { |
|
|
3 |
$lang = "en"; |
|
|
4 |
} else { |
|
|
5 |
$lang = "cs"; |
|
|
6 |
} |
|
|
7 |
?> |
|
|
8 |
<html> |
|
|
9 |
<head> |
|
|
10 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
|
11 |
<title> MLAB moduly </title> |
|
|
12 |
<meta name="keywords" content="stavebnice MLAB univerzální moduly seznam pøehled"> |
|
|
13 |
<meta name="description" content="Projekt MLAB, moduly"> |
|
|
14 |
<!-- AUTOINCLUDE START "Page/Head.<?php echo $lang; ?>.ihtml" DO NOT REMOVE --> |
|
|
15 |
<link rel="StyleSheet" href="../Web/CSS/MLAB.css" type="text/css" title="MLAB základní styl"> |
|
|
16 |
<link rel="StyleSheet" href="../Web/CSS/MLAB_Print.css" type="text/css" media="print"> |
|
|
17 |
<link rel="shortcut icon" type="image/x-icon" href="../Web/PIC/MLAB.ico"> |
|
|
18 |
<script type="text/javascript" src="../Web/JS/MLAB_Menu.js"></script> |
|
|
19 |
<!-- AUTOINCLUDE END --> |
|
|
20 |
</head> |
|
|
21 |
<body lang="<?php echo $lang; ?>"> |
|
|
22 |
<!-- AUTOINCLUDE START "Page/Header.<?php echo $lang; ?>.ihtml" DO NOT REMOVE --> |
|
|
23 |
<!-- ============== HLAVICKA ============== --> |
|
|
24 |
<div class="Header"> |
|
|
25 |
<script type="text/javascript"> |
|
|
26 |
<!-- |
|
|
27 |
SetRelativePath("../"); |
|
|
28 |
DrawHeader(); |
|
|
29 |
// --> |
|
|
30 |
</script> |
|
|
31 |
<noscript> |
|
|
32 |
<?php if ($lang == "cs") {?> |
|
|
33 |
<p><b> Pro zobrazení (vloení) hlavièky je potøeba JavaScript </b></p> |
|
|
34 |
<?php } else { ?> |
|
|
35 |
<p><b> JavaScript is required for including of the header </b></p> |
|
|
36 |
<?php } ?> |
|
|
37 |
</noscript> |
|
|
38 |
</div> |
|
|
39 |
<!-- AUTOINCLUDE END --> |
|
|
40 |
|
|
|
41 |
<!-- AUTOINCLUDE START "Page/Menu.<?php echo $lang; ?>.ihtml" DO NOT REMOVE --> |
|
|
42 |
<!-- ============== MENU ============== --> |
|
|
43 |
<div class="Menu"> |
|
|
44 |
<script type="text/javascript"> |
|
|
45 |
<!-- |
|
|
46 |
SetRelativePath("../"); |
|
|
47 |
DrawMenu(); |
|
|
48 |
// --> |
|
|
49 |
</script> |
|
|
50 |
<noscript> |
|
|
51 |
<?php if ($lang == "cs") {?> |
|
|
52 |
<p><b> Pro zobrazení (vloení) menu je potøeba JavaScript </b></p> |
|
|
53 |
<?php } else { ?> |
|
|
54 |
<p><b> JavaScript is required for including of the menu </b><p> |
|
|
55 |
<?php } ?> |
|
|
56 |
</noscript> |
|
|
57 |
</div> |
|
|
58 |
<!-- AUTOINCLUDE END --> |
|
|
59 |
|
|
|
60 |
<!-- ============== TEXT ============== --> |
|
|
61 |
<?php if ($lang == "en") { ?> |
|
|
62 |
<div class="Text"> |
|
|
63 |
<p class="Title"> |
|
|
64 |
Overview of MLAB Modules |
|
|
65 |
</p> |
|
|
66 |
<?php } else { ?> |
|
|
67 |
<div class="Text"> |
|
|
68 |
<p class="Title"> |
|
|
69 |
Pøehled modulù MLAB |
|
|
70 |
</p> |
|
|
71 |
<?php |
|
|
72 |
} |
|
|
73 |
/* KONFIGURACE */ |
|
|
74 |
|
|
|
75 |
/*Cesta k webu*/ |
|
|
76 |
$path = '/var/www/Web'; |
|
|
77 |
/*Adresa webu*/ |
|
|
78 |
$www = 'http://www.mlab.cz'; |
|
|
79 |
/*Cesta do sloky modulù vztaena k Cestì k webu*/ |
|
|
80 |
$folder = '/../Modules'; |
|
|
81 |
/*Suffix obrázkù s modulama*/ |
|
|
82 |
$img = '_Small.jpg'; |
|
|
83 |
/*Název souboru s popisem*/ |
|
|
84 |
$info1 = "info.".$lang.".txt"; |
|
|
85 |
|
|
|
86 |
/* KONEC KONFIGURACE */ |
|
|
87 |
|
|
|
88 |
/*Hlavièka tabulky*/ |
|
|
89 |
echo "<table>\n"; |
|
|
90 |
|
|
|
91 |
if ($lang == "en") { |
|
|
92 |
echo "<tr><td>Preview</td><td>Name</td><td>PDF</td><td>WebSVN</td><td>Info</td></tr>\n"; |
|
|
93 |
} else { |
|
|
94 |
echo "<tr><td>Náhled</td><td>Název</td><td>PDF</td><td>WebSVN</td><td>Info</td></tr>\n"; |
|
|
95 |
} |
|
|
96 |
/*Konec Hlavièky tabulky*/ |
|
|
97 |
|
|
|
98 |
if (isset($HTTP_GET_VARS["file"])) { |
|
|
99 |
/*Pokud je v adrese urèen parametr file naincludovat soubor modules.inc.php*/ |
|
|
100 |
include "modules.inc.php"; |
|
|
101 |
} else { |
|
|
102 |
/*V opaèném pøípadì pøidat øádek s modulem do tabulky*/ |
|
|
103 |
|
|
|
104 |
/*Naètení adresáøe*/ |
|
|
105 |
$adresar = opendir($path.$folder); |
|
|
106 |
while ($soubor = readdir($adresar)){ |
|
|
107 |
/*Je daný soubor sloka?, Nezaèíná na teèku?, Nezaèíná na vykøièník?*/ |
|
|
108 |
if ((Is_Dir($path.$folder."/".$soubor)) && (substr($soubor,0,1) <> ".") && (substr($soubor,0,1) <> "!")) { |
|
|
109 |
$img = $soubor.$img; |
|
|
110 |
|
|
|
111 |
/*Zjitìní, zda je modul pøímo v podsloce sloky Modules nebo zda je v podsloce podsloky...*/ |
|
|
112 |
if (file_exists($path.$folder."/".$soubor."/CAM_AMA")) { |
|
|
113 |
echo "<tr>"; |
|
|
114 |
/*Zobrazení náhledu, pokud existuje*/ |
|
|
115 |
if (file_exists($path.$folder.'/'.$soubor."/".$img)) { echo "<td><A HREF=\"image.php?pth=".$soubor."&fname=".$soubor."\" TARGET=\"_blank\"><img src=\"thumb.php?pth=".$soubor."&fname=".$soubor."\" border=\"0\"></a></td>\n"; |
|
|
116 |
} else { echo "<td><img src=\"thumb.php?pth=".$soubor."&fname=".$soubor."\"></td>\n"; } |
|
|
117 |
/*Zobrazení odkazu na dotyèný modul (pokud popis k modulu neexistuje zobrazit statický text)*/ |
|
|
118 |
if (file_exists($path.$folder."/".$soubor."/DOC/HTML/".$soubor.".".$lang.".html")) { |
|
|
119 |
echo "<td><b><a href=\"".$www.$folder."/".$soubor."/DOC/HTML/".$soubor.".".$lang.".html\">".$soubor."</a></b></td>\n"; |
|
|
120 |
} else { echo "<td><b>".$soubor."</b></td>\n"; } |
|
|
121 |
/*Zobrazení odkazu na PDF dokumentaci, pokud existuje*/ |
|
|
122 |
if (file_exists($path.$folder."/".$soubor."/".$soubor1."/DOC/".$soubor1.".".$lang.".pdf")) { |
|
|
123 |
echo "\n<td><a href=\"".$www.$folder."/".$soubor."/DOC/".$soubor.".".$lang.".pdf\">PDF</a></td>\n"; |
|
|
124 |
} else { echo "\n<td>-</td>\n"; } |
|
|
125 |
/*Odkaz na WebSVN*/ |
|
|
126 |
echo "<td><a href=\"http://www.mlab.cz/WebSVN/listing.php?repname=MLAB&path=/Modules/".$soubor."/\">WebSVN</a></td>\n"; |
|
|
127 |
/*Zobrazení krátkého popisu k modulu, pokud existuje*/ |
|
|
128 |
if (file_exists($path.$folder.'/'.$soubor."/".$info1)) { |
|
|
129 |
$fp = FOpen ($path.$folder.'/'.$soubor."/".$info1, "r"); |
|
|
130 |
$data = FRead ($fp, FileSize ($path.$folder.'/'.$soubor."/".$info1)); |
|
|
131 |
FClose ($fp); |
|
|
132 |
echo "<td>".wordwrap($data, 50, "<br>")."</td>\n"; |
|
|
133 |
} else { echo "\n<td><i>No description available</i></td>\n"; } |
|
|
134 |
echo "</tr>\n\n"; |
|
|
135 |
} else { |
|
|
136 |
/*Pokud se jedná o modul, který je v podsloce sloky |
|
|
137 |
modulu (napø /nazev_modulu/nazev_moduluV01A/) includovat soubor modules.inc.php*/ |
|
|
138 |
/*Zobrazení hodnot do tabulky*/ |
|
|
139 |
echo "<tr>\n<td><img src=\"thumb.php?pth=xxx&fname=xxx\"></td>\n<td><a href=\"modules.php?lang=".$lang."&file=".$soubor."\">".$soubor."</a></td>\n"; |
|
|
140 |
echo "<td>-</td>\n<td><a href=\"http://www.mlab.cz/WebSVN/listing.php?repname=MLAB&path=/Modules/".$soubor."/\">WebSVN</a></td>\n"; |
|
|
141 |
/*Zobrazení krátkého popisu k modulu, pokud existuje*/ |
|
|
142 |
if (file_exists($path.$folder.'/'.$soubor."/".$info1)) { |
|
|
143 |
$fp = FOpen ($path.$folder.'/'.$soubor."/".$info1, "r"); |
|
|
144 |
$data = FRead ($fp, FileSize ($path.$folder.'/'.$soubor."/".$info1)); |
|
|
145 |
FClose ($fp); |
|
|
146 |
echo "<td>".wordwrap($data, 50, "<br>")."</td>\n"; |
|
|
147 |
} else { echo "\n<td><i>No description available</i></td>\n"; } |
|
|
148 |
echo "</tr>\n\n"; |
|
|
149 |
} |
|
|
150 |
} |
|
|
151 |
} |
|
|
152 |
} |
|
|
153 |
?> |
|
|
154 |
</table> |
|
|
155 |
</div> |
|
|
156 |
|
|
|
157 |
<!-- AUTOINCLUDE START "Page/Footer.<?php echo $lang; ?>.ihtml" DO NOT REMOVE --> |
|
|
158 |
<!-- ============== PATIÈKA ============== --> |
|
|
159 |
<div class="Footer"> |
|
|
160 |
<script type="text/javascript"> |
|
|
161 |
<!-- |
|
|
162 |
SetRelativePath("../"); |
|
|
163 |
DrawFooter(); |
|
|
164 |
// --> |
|
|
165 |
</script> |
|
|
166 |
<noscript> |
|
|
167 |
<?php if ($lang == "cs") {?> |
|
|
168 |
<p><b> Pro zobrazení (vloení) zápatí je potøeba JavaScript </b></p> |
|
|
169 |
<?php } else { ?> |
|
|
170 |
<p><b> JavaScript is required for including of the footer </b></p> |
|
|
171 |
<?php } ?> |
|
|
172 |
</noscript> |
|
|
173 |
</div> |
|
|
174 |
<!-- AUTOINCLUDE END --> |
|
|
175 |
|
|
|
176 |
</body> |
|
|
177 |
</html> |