1 | 2 | simandl | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | | | <html> |
3 | | | <head> |
4 | | | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> |
5 | | | <style type="text/css" media="screen"> @import "style.css"; </style> |
6 | | | <title>db.jablonka.cz - Přenos dat</title> |
7 | | | </head> |
8 | | | <link rel="stylesheet" type="text/css" href="style.css"> |
9 | | | </head> |
10 | | | <body topmargin=0 leftmargin=10> |
11 | | | <? |
12 | | | include ("header.htm"); |
13 | | | require('grab_globals.lib.php'); |
14 | | | include ("fce.php"); |
15 | | | $spojeni = MySQL_Connect($db_host, $db_user, $db_pass); |
16 | | | MySQL_Select_DB($db_name); |
17 | | | |
18 | | | echo ' |
19 | | | <center>'; |
20 | | | |
21 | | | if(!@$show) $show="all"; |
22 | | | if(!@$order) $order="prijmeni"; |
23 | | | if(!@$platba) $platba="vsechno"; |
24 | | | if(!@$pokladna) $pokladna="vsechno"; |
25 | | | if(!@$rok) $rok="vsechno"; |
26 | | | |
27 | | | |
28 | | | if($show!="all") |
29 | | | { |
30 | | | echo '<b>Přenos dat jednotlivých IP adres (pouze aktivní):</b> <a href="data.php?show=all&order='.$order.'" class=odkaz>zobrazit vše</a>'; |
31 | | | $where="WHERE active IN (1) "; |
32 | | | } |
33 | | | else |
34 | | | { |
35 | | | echo '<b>Přenos dat jednotlivých IP adres všech uživatelů:</b> <a href="data.php?show=active&order='.$order.'" class=odkaz>zobrazit pouze aktivní</a>'; |
36 | | | $where="WHERE active IN (0,1) "; |
37 | | | } |
38 | | | |
39 | | | $string=MySQL_Query("SELECT c.id as cid, c.*, a.id as aid, a.*, i.id as iid, i.* |
40 | | | FROM (ipecka i LEFT JOIN cleni c ON c.id = i.clen) |
41 | | | LEFT JOIN adresy a ON a.clen = i.clen AND a.id = i.adresa $where ORDER BY $order"); |
42 | | | # FROM (cleni c LEFT JOIN adresy a ON c.id = a.clen) |
43 | | | # LEFT JOIN ipecka i ON c.id = i.clen AND a.id = i.adresa $where ORDER BY $order"); |
44 | | | echo ' |
45 | | | <form action="mail_multi.php" method="POST"> |
46 | | | |
47 | | | <input class=field type="submit" name="OK" value=" pošli mail "> |
48 | | | |
49 | | | <table width=100% cellspacing=1> |
50 | | | <tr> |
51 | | | <td bgcolor=#73BE1E> |
52 | | | <table cellspacing=0 cellpadding=0 width=100%> |
53 | | | <tr> |
54 | | | <td bgcolor=#FFFFFF> </td> |
55 | | | <td bgcolor=#FFFFFF class=text> |
56 | | | <a title="seřadit podle ID" class=odkaz href="data.php?show='.$show.'&order=cid">ID</a> |
57 | | | </td> |
58 | | | <td bgcolor=#FFFFFF class=text> |
59 | | | <a title="seřadit podle jména" class=odkaz href="data.php?show='.$show.'&order=jmeno">Jméno</a> |
60 | | | </td> |
61 | | | <td bgcolor=#FFFFFF class=text> |
62 | | | <a title="seřadit podle příjmení" class=odkaz href="data.php?show='.$show.'&order=prijmeni">Příjmení:</a> |
63 | | | </td> |
64 | | | <td bgcolor=#FFFFFF class=text width=80> |
65 | | | <a title="seřadit podle přezdívky" class=odkaz href="data.php?show='.$show.'&order=prezdivka,prijmeni">Přezdívka:</a> |
66 | | | </td> |
67 | | | <td bgcolor=#FFFFFF class=text width=80> |
68 | | | <a title="seřadit podle Emailu" class=odkaz href="data.php?show='.$show.'&order=email">Email:</a> |
69 | | | </td> |
70 | | | <td bgcolor=#FFFFFF class=text width=80> |
71 | | | <a title="seřadit podle aktivity" class=odkaz href="data.php?show='.$show.'&order=active">A</a> |
72 | | | <a title="seřadit podle financí" class=odkaz href="data.php?show='.$show.'&order=finance">F</a> |
73 | | | <a title="seřadit podle internetu" class=odkaz href="data.php?show='.$show.'&order=internet">I</a> |
74 | | | <a title="seřadit podle elektřiny" class=odkaz href="data.php?show='.$show.'&order=energy">E</a> |
75 | | | </td> |
76 | | | <td bgcolor=#FFFFFF class=text> |
77 | | | <a title="seřadit podle typu připojení" class=odkaz href="data.php?show='.$show.'&order=domu">Domů</a> |
78 | | | </td> |
79 | | | <td bgcolor=#FFFFFF class=text> |
80 | | | <a title="seřadit podle přezdívky" class=odkaz href="data.php?show='.$show.'&order=mobil">Mobil</a> |
81 | | | </td> |
82 | | | <td bgcolor=#FFFFFF class=text> |
83 | | | <a title="seřadit podle IP" class=odkaz href="data.php?show='.$show.'&order=ip">IP</a> |
84 | | | </td> |
85 | | | <td bgcolor=#FFFFFF class=text> |
86 | | | <a title="seřadit podle ulice" class=odkaz href="data.php?show='.$show.'&order=ulice,cp,byt">Ulice</a> |
87 | | | </td> |
88 | | | <td bgcolor=#FFFFFF class=text> |
89 | | | <a title="seřadit podle č.p." class=odkaz href="data.php?show='.$show.'&order=cp,ulice,byt">č.p.</a> |
90 | | | </td> |
91 | | | <td bgcolor=#FFFFFF class=text> |
92 | | | <a title="seřadit podle bytu" class=odkaz href="data.php?show='.$show.'&order=byt,cp,ulice">Byt</a> |
93 | | | </td> |
94 | | | <td bgcolor=#FFFFFF class=text> |
95 | | | <a title="seřadit podle ICQ" class=odkaz href="data.php?show='.$show.'&order=icq">ICQ</a> |
96 | | | </td> |
97 | | | <td bgcolor=#FFFFFF class=text> |
98 | | | <a title="Přenosy dat Casablanca" class=odkaz href="http://81.0.245.33/hotsanic/">data Casa týden</a> |
99 | | | </td> |
100 | | | <td bgcolor=#FFFFFF class=text> |
101 | | | <a title="Přenosy dat UPC" class=odkaz href="http://62.24.71.157/hotsanic/">data UPC týden</a> |
102 | | | </td> |
103 | | | </tr> |
104 | | | '; |
105 | | | |
106 | | | $color=1; |
107 | | | $celkem=0; |
108 | | | |
109 | | | while($vysledek=MySQL_Fetch_Array($string)) |
110 | | | { |
111 | | | $celkem++; |
112 | | | if($color==0) |
113 | | | { |
114 | | | $color=1; |
115 | | | $barva="#E6E4E4"; |
116 | | | } |
117 | | | else |
118 | | | { |
119 | | | $color=0; |
120 | | | $barva="#FFFFFF"; |
121 | | | } |
122 | | | if($vysledek["id"]<1000) |
123 | | | { |
124 | | | $dot="lan.bmp"; |
125 | | | $alt="LAN Jablonka"; |
126 | | | } |
127 | | | else |
128 | | | { |
129 | | | if($vysledek["id"]==1000) |
130 | | | { |
131 | | | $dot="apy.bmp"; |
132 | | | $alt="AP Yenik"; |
133 | | | } |
134 | | | if($vysledek["id"]==1001) |
135 | | | { |
136 | | | $dot="apj.bmp"; |
137 | | | $alt="AP Jablonecká"; |
138 | | | } |
139 | | | } |
140 | | | |
141 | | | $icons=""; |
142 | | | if($show=="all" && $vysledek["active"]==2) $icons=$icons.'<img title="Čekatel" src="images/actv.gif"> '; |
143 | | | if($show=="all" && $vysledek["active"]==1) $icons=$icons.'<img title="Člen" src="images/actv.gif"> '; |
144 | | | if($show=="all" && $vysledek["active"]==0) $icons=$icons.'<img title="Pasivní" src="images/passv.gif"> '; |
145 | | | if($vysledek["finance"]==1) $icons=$icons.'<img title="Finance" src="images/dolar.gif"> '; |
146 | | | if($vysledek["internet"]==1) $icons=$icons.'<img title="Internet" src="images/net.gif"> '; |
147 | | | if($vysledek["energy"]==1) $icons=$icons.'<img title="Elektřina sleva" src="images/energysleva.gif"> '; |
148 | | | if($vysledek["energy"]==2) $icons=$icons.'<img title="Elektřina" src="images/energy.gif"> '; |
149 | | | echo ' |
150 | | | <tr> |
151 | | | <td bgcolor='.$barva.' class=text> |
152 | | | <a class="odkaz" target="_self" href="clen.php?clen='.$vysledek["cid"].'"> |
153 | | | <img src="images/'.$dot.'" title="'.$alt.'" border=0></a> |
154 | | | </td> |
155 | | | <td bgcolor='.$barva.' class="text"> |
156 | | | <a class="odkaz" target="_self" href="edit_user.php?id='.$vysledek["cid"].'">'.$vysledek["cid"].'</a> |
157 | | | </td> |
158 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["jmeno"].'</td> |
159 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["prijmeni"].'</td> |
160 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["prezdivka"].'</td> |
161 | | | |
162 | | | <td bgcolor='.$barva.' class="text"> |
163 | | | '; |
164 | | | $from="info@jablonka.cz"; |
165 | | | $subject = ""; |
166 | | | $text = "Zdravím, |
167 | | | dík |
168 | | | Síma |
169 | | | \n"; |
170 | | | |
171 | | | $text = str_replace(" ","%20",$text); |
172 | | | $text = str_replace("\n","%0d",$text); |
173 | | | if ( $vysledek["email"] ) { |
174 | | | echo ' |
175 | | | <INPUT type="checkbox" name="to'.$vysledek["cid"].'" value="'.$vysledek["email"].'"> |
176 | | | <a href="mail.php?to='.$vysledek["email"].'&subj='.$subject.'&from='.$from.'&text='.$text.'">int</a> |
177 | | | <a href="mailto:'.$vysledek["email"].'?subject='.$subject.'&body='.$text.'">ext</a> '.$vysledek["email"].' |
178 | | | '; |
179 | | | } |
180 | | | $clen=$vysledek["cid"]; |
181 | | | $adresa=clen_to_adresa($clen); |
182 | | | $ipecko=clen_to_ipecko($clen); |
183 | | | $icq=$vysledek["icq"]; |
184 | | | echo ' |
185 | | | </td> |
186 | | | |
187 | | | <td bgcolor='.$barva.' class="text">'.$icons.'</td> |
188 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["domu"].'</td> |
189 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["mobil"].'</td> |
190 | | | <td bgcolor='.$barva.' class="text"> |
191 | | | <a class="odkaz" target="_self" href="add_ip.php?clen='.$vysledek["cid"].'&adresa='.$vysledek["aid"].'">+</a> |
192 | | | <a class="odkaz" target="_self" href="edit_ip.php?id='.$vysledek["iid"].'">'.$vysledek["ip"].'</a> |
193 | | | </td> |
194 | | | <td bgcolor='.$barva.' class="text"> |
195 | | | <a class="odkaz" target="_self" href="add_adres.php?clen='.$vysledek["cid"].'">+</a> |
196 | | | <a class="odkaz" target="_self" href="edit_adres.php?id='.$vysledek["aid"].'">'.$vysledek["ulice"].'</a></td> |
197 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["cp"].'</td> |
198 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["byt"].'</td> |
199 | | | <td bgcolor='.$barva.' class="text"> |
200 | | | '; |
201 | | | if($icq) { |
202 | | | echo ' |
203 | | | <a href="http://wwp.icq.com/'.$icq.'#pager"><img src="http://web.icq.com/whitepages/online?icq='.$icq.'&img=5" width="18" height="12" border="0" /></a> |
204 | | | <a href="sim:'.$icq.'"><img src="http://web.icq.com/whitepages/online?icq='.$icq.'&img=5" width="18" height="12" border="0" /></a> |
205 | | | '; |
206 | | | } |
207 | | | echo ' |
208 | | | </td> |
209 | | | <td bgcolor='.$barva.' class="text"> |
210 | | | <a href="http://81.0.245.33/hotsanic/networks/int'.$vysledek["ip"].'.html"> |
211 | | | '; |
212 | | | $gwctrn=getweb('http://10.33.0.25/cgi-bin/rrdfetch.pl?'.$vysledek["ip"].'&week&0'); |
213 | | | $gwctrn=preg_replace('/\s+/', ' ', $gwctrn); |
214 | | | $gwctrn=preg_replace('/^\s+/', '', $gwctrn); |
215 | | | list($gwcin,$gwcout)=explode(' ',$gwctrn); |
216 | | | $gwcin = round($gwcin / 104857.6)/10 ; |
217 | | | $gwcout = round($gwcout / 104857.6)/10 ; |
218 | | | echo $gwcin."MiB ".$gwcout."MiB"; |
219 | | | echo ' |
220 | | | </a> |
221 | | | </td> |
222 | | | <td bgcolor='.$barva.' class="text"> |
223 | | | <a href="http://62.24.71.157/hotsanic/networks/int'.$vysledek["ip"].'.html"> |
224 | | | '; |
225 | | | $gwutrn=getweb('http://10.33.0.30/cgi-bin/rrdfetch.pl?'.$vysledek["ip"].'&week&0'); |
226 | | | $gwutrn=preg_replace('/\s+/', ' ', $gwutrn); |
227 | | | $gwutrn=preg_replace('/^\s+/', '', $gwutrn); |
228 | | | list($gwuin,$gwuout)=explode(' ',$gwutrn); |
229 | | | $gwuin = round($gwuin / 104857.6)/10 ; |
230 | | | $gwuout = round($gwuout / 104857.6)/10 ; |
231 | | | echo $gwuin."MiB ".$gwuout."MiB"; |
232 | | | |
233 | | | echo ' |
234 | | | </a> |
235 | | | </td> |
236 | | | </tr> |
237 | | | '; |
238 | | | Next($vysledek); |
239 | | | } |
240 | | | |
241 | | | echo ' |
242 | | | </table></tr></td></table></center> |
243 | | | </form> |
244 | | | <br> |
245 | | | Celkem zobrazeno '.$celkem.' záznamů. |
246 | | | '; |
247 | | | ?> |
248 | | | </body> |
249 | | | </html> |