source: www/index_new.php@ 13

Last change on this file since 13 was 1, checked in by george, 18 years ago

Prvotní import všeho

  • Property svn:executable set to *
File size: 14.1 KB
Line 
1<?
2if(array_key_exists('Action', $_GET))
3{
4 if($_GET['Action'] == 'CustomizeNewsSave')
5 {
6 $Checkbox = array('' => 0, 'on' => 1);
7// print_r($_POST);
8 $Setting = array();
9 for($I = 0; $I < $_POST['NewsCategoryCount']; $I++)
10 {
11 $Setting[] = array('CategoryId' => $_POST['NewsCategoryId'.$I], 'Enabled' => $Checkbox[$_POST['NewsCategoryEnabled'.$I]], 'ItemCount' => ($_POST['NewsCategoryCount'.$I]*1));
12 }
13// print_r($Setting);
14 $_COOKIE['NewsSetting'] = serialize($Setting);
15 setcookie('NewsSetting', $_COOKIE['NewsSetting']);
16 }
17}
18
19
20include_once('style.php');
21ShowHeader('Vítejte na <strong>Centrále!</strong> - serveru komunitní poèítaèové sítì <strong>ZdechovNET</strong>','Rozcestník');
22include_once('is/db.php');
23//include_once('is/global.php');
24DB_Init('localhost','root','','share');
25
26?>
27
28<script type="text/javascript">
29<!--
30function openClient(client_type)
31{
32 if(client_type=="java")clientWindow = window.open("http://go.icq.com/icq2go/web.html","ICQ2Go","left=20,top=20,width=156,height=446,toolbar=0,resizable=0");
33 else clientWindow = window.open("http://go.icq.com/icq2go/flicq.html","ICQ2Go","left=20,top=20,width=176,height=441,toolbar=0,resizable=0");
34}
35
36var predchozi = 'first';
37
38function zobraz(idecko)
39{
40 skryj(predchozi);
41 el=document.getElementById(idecko).style;
42 el.display='block';
43 predchozi = idecko;
44}
45
46function skryj(idecko)
47{
48 if(idecko != 'first')
49 {
50 el=document.getElementById(idecko).style;
51 el.display='none';
52 }
53}
54//-->
55</script>
56
57<table width="100%"><tr><td valign="top">
58<?
59DB_Init('localhost','root','','is');
60?>
61
62<table width="100%">
63<tr><td width="20%" valign="top">
64<strong>Dùle¾ité odkazy:</strong><br>
65<img alt="" src="images/favicons/money.gif" width="16" height="16"> <a href="/finance/">Finance</a><br>
66<img alt="" src="images/favicons/chart.gif" width="16" height="16"> <a href="/statistic/trafficview2.php">Statistika</a><br>
67<img alt="" src="images/favicons/prohledavac_sdileni.gif" width="15" height="15"> <a href="/share">Prohledat sdílení</a><br>
68<img alt="" src="images/favicons/comp.gif" width="16" height="16"> <a href="/userlist.php">Seznam u¾ivatelù</a><br>
69<img alt="" src="images/favicons/comp.gif" width="16" height="16"> <a href="/hostlist.php">Seznam poèítaèù</a><br>
70<img alt="" src="images/favicons/sunrisechat.gif" width="16" height="16"> <a href="/sunrisechat/history.php">Historie SunriseChatu</a><br>
71<img alt="" src="images/favicons/sunrisechat.gif" width="16" height="16"> <a href="/sunrisechat/webchat.php">Webový SunriseChatu</a><br>
72<img alt="" src="images/favicons/discus.gif" width="16" height="16"> <a href="/forum">Diskusní fórum</a><br>
73<img alt="" src="images/favicons/openwebmail.gif" width="16" height="16"> <a href="https://centrala.zdechov.net/cgi-bin/openwebmail/openwebmail.pl">WebMail</a><br>
74<img alt="" src="images/favicons/apple.gif" width="16" height="16"> <a href="/jidelna">Jídelníèek</a><br>
75<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="http://tv.zdechov.net/">Televize</a><br>
76<img alt="" src="images/favicons/cube.gif" width="16" height="16"> <a href="http://game-server.zdechov.net/">Herní server</a><br>
77<img alt="" src="images/favicons/cfix.gif" width="16" height="16"> <a href="/farnost">Rozpis m¹í</a><br>
78<img alt="" src="images/favicons/tel.gif" width="16" height="16"> <a href="/telseznam.php">Telefonní seznam</a><br>
79<img alt="" src="images/favicons/pripoj.gif" width="16" height="16"> <a href="/nabidky_pripojeni.php">Nabídky pøipojení</a><br>
80<img alt="" src="images/favicons/zapisy.gif" width="16" height="16"> <a href="/docs/zapisy/zapisy.php">Zápisy ze schùzí</a><br>
81<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/mapy/mapa.php">Mapa Zdìchova</a><br>
82<img alt="" src="images/favicons/otv_doby.gif" width="16" height="16"> <a href="/otevreno.php">Otvírací doby</a><br>
83<img alt="" src="images/favicons/topologie.gif" width="16" height="16"> <a href="/is/topologie.php">Topologie sítì</a><br>
84<img alt="" src="images/favicons/satellite.gif" width="16" height="16"> <a href="/is/dostupnost.php">Dostupnost sítì</a><br>
85<img alt="" src="images/favicons/tech.gif" width="16" height="16"> <a href="/network.php">Technické informace</a><br>
86<img alt="" src="images/favicons/socer.gif" width="16" height="16"> <a href="http://fotbal.zdechov.net/">Fotbal Sokol Zdìchov</a><br>
87<br>
88<strong>Dal¹í odkazy:</strong><br>
89<img alt="" src="images/favicons/tv.gif" width="16" height="16"> <a href="/tkr.php">Kanály kabelovky</a><br>
90<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/mapy/mapa_nabidka.php">Nabídka mapy</a><br>
91<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/history.php">Historie sítì</a><br>
92<img alt="" src="images/favicons/electric.gif" width="16" height="16"> <a href="/merak.php">Mìøiè spotøeby</a><br>
93<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/sluzby.php">Seznam slu¾eb</a><br>
94<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/ukoly.php">Plány do budoucna</a><br>
95<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="/navody.php">Návody</a><br>
96<img alt="" src="images/favicons/info.gif" width="16" height="16"> <a href="/infokanal/index.htm">Infokanál</a><br>
97<img alt="" src="images/favicons/progman.gif" width="16" height="16"> <a href="/manualy.php">Programátorské manuály</a><br>
98
99
100<?//<a href="/cgi-bin/openwebmail/openwebmail.pl">Po±tovní schránka</a><br>
101//<a href="/download/addfile.php">Stahování souborù</a><br>
102?>
103<br>
104</td><td width="13%" valign="top">
105<strong>Vyhledávání:</strong><br>
106<img alt="" src="images/favicons/www_google_com.gif" width="16" height="16"> <a href="http://www.google.cz/">Google</a><br>
107<img alt="" src="images/favicons/morfeo.png" width="16" height="16"> <a href="http://morfeo.centrum.cz">Morfeo</a><br>
108<img alt="" src="images/favicons/www_centrum_cz.gif" width="16" height="16"> <a href="http://www.centrum.cz">Centrum</a><br>
109<img alt="" src="images/favicons/www_seznam_cz.gif" width="16" height="16"> <a href="http://www.seznam.cz">Seznam</a><br>
110<img alt="" src="images/favicons/www_atlas_cz.gif" width="16" height="16"> <a href="http://www.atlas.cz">Atlas</a><br>
111<img alt="" src="images/favicons/www_tiscali_cz.gif" width="16" height="16"> <a href="http://www.tiscali.cz">Tiscali</a><br>
112<br>
113<strong>U¾iteèné:</strong><br>
114<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="http://www.zdechov.net">Stránky na¹í sítì</a><br>
115<img alt="" src="images/favicons/www_tvinfo_cz.gif" width="16" height="16"> <a href="http://www.tvinfo.cz/live/televize/cz">Online TV</a><br>
116<img alt="" src="images/favicons/www_idos_cz.gif" width="16" height="16"> <a href="http://www.idos.cz/ConnForm.asp?tt=c">Jízdní øády</a><br>
117<img alt="" src="images/favicons/www_atlas_cz.gif" width="16" height="16"> <a href="http://tv.atlas.cz">TV programy</a><br>
118<img alt="" src="images/favicons/www_icq_com.gif" width="16" height="16"> Web ICQ <a href="javascript:openClient('flash')">Flash</a>&nbsp;<a href="javascript:openClient('java')">Java</a><br>
119<img alt="" src="images/favicons/www_centrum_cz.gif" width="16" height="16"> <a href="http://slovniky.centrum.cz">Slovníky</a><br>
120<img alt="" src="images/favicons/pocasi.gif" width="16" height="16"> <a href="http://www.meteopress.cz/">Poèasí</a><br>
121<img alt="" src="images/favicons/www_tzones_cz.gif" width="16" height="16"> <a href="http://www.tzones.cz/">T-Mobile SMS</a><br>
122<img alt="" src="images/favicons/www_mvk_cz.png" width="16" height="16"> <a href="http://www.mvk.cz/">Knihovna&nbsp;Vsetín</a><br>
123<br>
124<strong>Prodej poèítaèù:</strong><br>
125<img alt="" src="images/favicons/www_computershop_cz.png" width="16" height="16"> <a href="http://shop.computershop.cz/eshop/">SOFTCOM</a><br>
126<img alt="" src="images/favicons/www_alfacomp_cz.gif" width="16" height="16"> <a href="http://www.alfacomp.cz/php/zbozi.php?akc=2">Alfacomp</a><br>
127<img alt="" src="images/favicons/www_petracomp_cz.png" width="16" height="16"> <a href="http://www.petracomp.cz/">Petracomp</a><br>
128<img alt="" src="images/favicons/www_tsbohemia_cz.png" width="16" height="16"> <a href="http://interlink.tsbohemia.cz/">TS Bohemia</a><br>
129<br>
130<?
131/*
132<strong>Osobní stránky:</strong><br>
133<img alt="" src="images/favicons/bomi.gif" width="16" height="16"> <a href="~mirek/">Miroslav Hajda</a><br>
134<img alt="" src="images/favicons/clear.gif" width="16" height="16"> <a href="~george/">Jiøí Hajda</a><br>
135*/
136?>
137</td>
138<td width="15%" valign="top">
139<?
140// Zobrazení seznamu online poèítaèù
141echo('<strong>Online poèítaèe:</strong><br><span style="font-size: smaller;">');
142DB_Query('SELECT * FROM hosts WHERE online=1 AND show_online=1 ORDER BY name');
143while($Row = DB_Row())
144{
145 echo($Row['name'].'<br>');
146}
147echo('</span>');
148
149echo('<br>');
150
151// Zobrazení seznamu neplaticich uzivatelu
152echo('<strong>Dlu¾níci:</strong><br><span style="font-size: smaller;">');
153DB_Query('SELECT * FROM users WHERE cash<0 ORDER BY cash');
154while($Row = DB_Row())
155{
156 echo($Row['fullname'].'<br>');
157}
158echo('</span>');
159?>
160
161</td></tr></table>
162<?
163
164// Zobrazení èasu bìhu poèítaèe
165$Data = explode(' ',exec('uptime'));
166$Data = array_slice($Data,3,-8);
167$Uptime = '';
168foreach($Data as $Item)
169{
170 if(strpos($Item,':')) $Uptime .= substr($Item,0,-1).' hodin';
171 else $Uptime .= $Item.' ';
172}
173$Uptime = str_replace('2 days,','2 dny a',$Uptime);
174$Uptime = str_replace('3 days,','3 dny a',$Uptime);
175$Uptime = str_replace('4 days,','4 dny a',$Uptime);
176$Uptime = str_replace('days,','dní a',$Uptime);
177$Uptime = str_replace('day,','den a',$Uptime);
178$Uptime = str_replace('min,','minut',$Uptime);
179echo('Server bì¾í '.$Uptime);
180
181?>
182</td><td width="50%" valign="top" style="font-size: smaller;">
183<?
184
185$File = fopen('/tmp/temperature2','r');
186$Teplota = fgets($File);
187$Teplota = round($Teplota*10)/10;
188fclose($File);
189
190
191echo('<table width="100%"><tr><td><strong>Aktuálnì:</strong></td><td align="right">
192<a href="?Action=CustomizeNews">Upravit</a></td></tr></table>');
193
194$NewsCountPerCategory = 3;
195$UploadedFilesFolder = 'aktuality/uploads/';
196
197if(array_key_exists('NewsSetting', $_COOKIE))
198 $NewsSetting = unserialize($_COOKIE['NewsSetting']);
199 else
200$NewsSetting = array(
201 array('CategoryId' => 5, 'Enabled' => 1, 'ItemCount' => 3),
202 array('CategoryId' => 3, 'Enabled' => 1, 'ItemCount' => 3),
203 array('CategoryId' => 1, 'Enabled' => 1, 'ItemCount' => 3),
204 array('CategoryId' => 2, 'Enabled' => 1, 'ItemCount' => 3),
205 array('CategoryId' => 4, 'Enabled' => 1, 'ItemCount' => 3),
206 array('CategoryId' => 6, 'Enabled' => 1, 'ItemCount' => 3),
207 array('CategoryId' => 8, 'Enabled' => 1, 'ItemCount' => 3),
208 array('CategoryId' => 9, 'Enabled' => 1, 'ItemCount' => 3),
209 array('CategoryId' => 10, 'Enabled' => 1, 'ItemCount' => 3),
210);
211
212if(array_key_exists('Action', $_GET))
213{
214 if($_GET['Action'] == 'CustomizeNews')
215 {
216 echo('<form action="?Action=CustomizeNewsSave" method="post">');
217 echo('<table cellspacing="0">');
218 $I = 0;
219 foreach($NewsSetting as $SettingItem)
220 {
221 DB_Select('news_category', '*', 'id='.$SettingItem['CategoryId']);
222 $NewsCategory = DB_Row();
223 echo('<tr><td>'.$NewsCategory['caption'].'</td><td><input type="checkbox" name="NewsCategoryEnabled'.$I.'"');
224 if($SettingItem['Enabled'] == 1) echo(' CHECKED');
225 echo('></td>'.
226 '<td><input type="text" size="1" name="NewsCategoryCount'.$I.'" value="'.$SettingItem['ItemCount'].'">'.
227 '<input type="hidden" name="NewsCategoryId'.$I.'" value="'.$SettingItem['CategoryId'].'"></td></tr>');
228 $I++;
229 }
230 echo('</table><input type="hidden" name="NewsCategoryCount" value="'.count($NewsSetting).'"><input type="submit" value="Ulo¾it"></form>');
231 }
232}
233
234echo('<div onmouseout="skryj(predchozi)">');
235function ShowNews($Category, $ItemCount)
236{
237 global $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder;
238
239 DB_Select('news_category', '*', 'id='.$Category);
240 $Row = DB_Row();
241 echo('<table cellspacing="0" cellpadding="0" border="0" width="100%" style="font-size: small; padding-bottom: 5px;"><tr>');
242 echo('<td width="40%">'.$Row['caption'].'</td><td width="80%" align="right">');
243 echo('<a href="aktuality/index.php?category='.$Category.'">Zobrazit v¹echny aktuality</a>&nbsp;');
244 if($Row['permission'] == 1) echo('<a href="aktuality/index.php?action=add&amp;category='.$Category.'">Pøidat aktualitu</a>&nbsp;');
245 echo('</td></tr><tr><td colspan="2">');
246 echo('<table cellspacing="0" width="100%" style="padding: 2px 2px 2px 2px; font-size: small; border-style: solid; border-color: red; border-width: 1; background-color: #FFF0F0;">');
247 DB_Query('SELECT * FROM news WHERE category='.$Category.' ORDER BY date DESC LIMIT 0,'.$ItemCount);
248//echo('<table cellpadding="0" cellspacing="0" width="100%"><tr><td>');
249 $Index = 0;
250 $FontSize = 12;
251 while($Row = DB_Row())
252 {
253 echo('<tr><td onmouseover="zobraz('."'new".$Category.$Index."'".')" style="cursor: pointer; margin: 0px;"><table cellspacing="0" cellpadding="0" style="padding: 0px; margin: 0px; font-size: small; color: red;" width="100%">
254<tr><td style="font-size: '.$FontSize.'pt"><strong>'.$Row['title'].'</strong></td>
255<td align="right" style="font-size: '.$FontSize.'pt">'.$Row['author'].' ('.HumanDate($Row['date']).')</td></tr></table>');
256 echo('<div id="new'.$Category.$Index.'" class="skryty" style="display: none; border-width: 1; border-style: solid; border-color: blue; padding: 3px; font-size: 9pt;">'.$Row['content']);
257
258 if($Row['enclosure'] != '')
259 {
260 echo('<br>Pøílohy: ');
261 $Enclosures = explode(';', $Row['enclosure']);
262 foreach($Enclosures as $Enclosure)
263 {
264 if(file_exists($UploadedFilesFolder.$Enclosure)) echo(' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>');
265 }
266 }
267
268 echo('</div></td></tr>');
269 $Index = $Index + 1;
270 $FontSize = $FontSize - 1;
271 }
272 echo('</table></td></tr></table>'."\n\n");
273}
274foreach($NewsSetting as $SettingItem)
275 if($SettingItem['Enabled'] == 1) ShowNews($SettingItem['CategoryId'], $SettingItem['ItemCount']);
276
277echo('<a href="aktuality/subscription.php"><img style="margin: 0px 0px 0px 0px;" border="0" src="images/rss20.png" alt="Aktuality pøes RSS"></a> <a href="aktuality/subscription.php">Automatické sledování novinek</a>');
278
279//echo('</td></tr></table>'
280?>
281</div></td></tr></table>
282<?
283//if(IsInternetAddr()) echo('Internet'); else echo('LAN');
284
285ShowFooter();
286
287?>
Note: See TracBrowser for help on using the repository browser.