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 - Seznam uživatelů</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 | | | $zprava=logging("adresy.php"); |
19 | | | |
20 | | | echo ' |
21 | | | <center>'; |
22 | | | if(!@$show) $show="all"; |
23 | | | if(!@$order) $order="prijmeni"; |
24 | | | if($show!="all") |
25 | | | { |
26 | | | echo '<b>Seznam uživatelů (pouze aktivní):</b> <a href="adresy.php?show=all&order='.$order.'" class=odkaz>zobrazit vše</a>'; |
27 | | | $where="WHERE active IN (1) "; |
28 | | | } |
29 | | | else |
30 | | | { |
31 | | | echo '<b>Seznam všech uživatelů:</b> <a href="adresy.php?show=active&order='.$order.'" class=odkaz>zobrazit pouze aktivní</a>'; |
32 | | | $where="WHERE active IN (0,1) "; |
33 | | | } |
34 | | | |
35 | | | $string=MySQL_Query("SELECT c.id as cid, c.*, a.id as aid, a.*, i.id as iid, i.* |
36 | | | FROM (cleni c LEFT JOIN adresy a ON c.id = a.clen) |
37 | | | LEFT JOIN ipecka i ON c.id = i.clen AND a.id = i.adresa $where ORDER BY $order"); |
38 | | | |
39 | | | echo ' |
40 | | | <form action="mail_multi.php" method="POST"> |
41 | | | <input class=field type="submit" name="OK" value=" pošli mail "> |
42 | | | <a href="#" onclick="i=0;while ((document.forms[0][i] != null )) {document.forms[0][i].checked = true;i+=1;};">Vybrat vše</a> |
43 | | | <a href="#" onclick="i=0;while ((document.forms[0][i] != null )) {document.forms[0][i].checked = !document.forms[0][i].checked;i+=1;};">Invertovat</a> |
44 | | | |
45 | | | <table width=100% cellspacing=1> |
46 | | | <tr> |
47 | | | <td bgcolor=#73BE1E> |
48 | | | <table cellspacing=0 cellpadding=0 width=100%> |
49 | | | <tr> |
50 | | | <td bgcolor=#FFFFFF> </td> |
51 | | | <td bgcolor=#FFFFFF class=text> |
52 | | | <a title="seřadit podle ID" class=odkaz href="adresy.php?show='.$show.'&order=cid">ID</a> |
53 | | | </td> |
54 | | | <td bgcolor=#FFFFFF class=text> |
55 | | | <a title="seřadit podle jména" class=odkaz href="adresy.php?show='.$show.'&order=jmeno">Jméno</a> |
56 | | | </td> |
57 | | | <td bgcolor=#FFFFFF class=text> |
58 | | | <a title="seřadit podle příjmení" class=odkaz href="adresy.php?show='.$show.'&order=prijmeni">Příjmení:</a> |
59 | | | </td> |
60 | | | <td bgcolor=#FFFFFF class=text width=80> |
61 | | | <a title="seřadit podle přezdívky" class=odkaz href="adresy.php?show='.$show.'&order=prezdivka,prijmeni">Přezdívka:</a> |
62 | | | </td> |
63 | | | <td bgcolor=#FFFFFF class=text width=80> |
64 | | | <a title="seřadit podle Emailu" class=odkaz href="adresy.php?show='.$show.'&order=email">Email:</a> |
65 | | | </td> |
66 | | | <td bgcolor=#FFFFFF class=text width=80> |
67 | | | <a title="seřadit podle aktivity" class=odkaz href="adresy.php?show='.$show.'&order=active">A</a> |
68 | | | <a title="seřadit podle financí" class=odkaz href="adresy.php?show='.$show.'&order=finance">F</a> |
69 | | | <a title="seřadit podle internetu" class=odkaz href="adresy.php?show='.$show.'&order=internet">I</a> |
70 | | | <a title="seřadit podle elektřiny" class=odkaz href="adresy.php?show='.$show.'&order=energy">E</a> |
71 | | | </td> |
72 | | | <td bgcolor=#FFFFFF class=text> |
73 | | | <a title="seřadit podle typu připojení" class=odkaz href="adresy.php?show='.$show.'&order=domu">Domů</a> |
74 | | | </td> |
75 | | | <td bgcolor=#FFFFFF class=text> |
76 | | | <a title="seřadit podle přezdívky" class=odkaz href="adresy.php?show='.$show.'&order=mobil">Mobil</a> |
77 | | | </td> |
78 | | | <td bgcolor=#FFFFFF class=text> |
79 | | | <a title="seřadit podle IP" class=odkaz href="adresy.php?show='.$show.'&order=ip">IP</a> |
80 | | | </td> |
81 | | | <td bgcolor=#FFFFFF class=text> |
82 | | | <a title="seřadit podle ulice" class=odkaz href="adresy.php?show='.$show.'&order=ulice,cp,byt">Ulice</a> |
83 | | | </td> |
84 | | | <td bgcolor=#FFFFFF class=text> |
85 | | | <a title="seřadit podle č.p." class=odkaz href="adresy.php?show='.$show.'&order=cp,ulice,byt">č.p.</a> |
86 | | | </td> |
87 | | | <td bgcolor=#FFFFFF class=text> |
88 | | | <a title="seřadit podle bytu" class=odkaz href="adresy.php?show='.$show.'&order=byt,cp,ulice">Byt</a> |
89 | | | </td> |
90 | | | <td bgcolor=#FFFFFF class=text> |
91 | | | <a title="seřadit podle ICQ" class=odkaz href="adresy.php?show='.$show.'&order=icq">ICQ</a> |
92 | | | </td> |
93 | | | </tr> |
94 | | | '; |
95 | | | |
96 | | | $color=1; |
97 | | | $celkem=0; |
98 | | | |
99 | | | while($vysledek=MySQL_Fetch_Array($string)) |
100 | | | { |
101 | | | $celkem++; |
102 | | | if($color==0) |
103 | | | { |
104 | | | $color=1; |
105 | | | $barva="#E6E4E4"; |
106 | | | } |
107 | | | else |
108 | | | { |
109 | | | $color=0; |
110 | | | $barva="#FFFFFF"; |
111 | | | } |
112 | | | if($vysledek["id"]<1000) |
113 | | | { |
114 | | | $dot="lan.bmp"; |
115 | | | $alt="LAN Jablonka"; |
116 | | | } |
117 | | | else |
118 | | | { |
119 | | | if($vysledek["id"]==1000) |
120 | | | { |
121 | | | $dot="apy.bmp"; |
122 | | | $alt="AP Yenik"; |
123 | | | } |
124 | | | if($vysledek["id"]==1001) |
125 | | | { |
126 | | | $dot="apj.bmp"; |
127 | | | $alt="AP Jablonecká"; |
128 | | | } |
129 | | | } |
130 | | | |
131 | | | $icons=""; |
132 | | | if($show=="all" && $vysledek["active"]==2) $icons=$icons.'<img title="Čekatel" src="images/actv.gif"> '; |
133 | | | if($show=="all" && $vysledek["active"]==1) $icons=$icons.'<img title="Člen" src="images/actv.gif"> '; |
134 | | | if($show=="all" && $vysledek["active"]==0) $icons=$icons.'<img title="Pasivní" src="images/passv.gif"> '; |
135 | | | if($vysledek["finance"]==1) $icons=$icons.'<img title="Finance" src="images/dolar.gif"> '; |
136 | | | if($vysledek["internet"]==1) $icons=$icons.'<img title="Internet" src="images/net.gif"> '; |
137 | | | if($vysledek["energy"]==1) $icons=$icons.'<img title="Elektřina sleva" src="images/energysleva.gif"> '; |
138 | | | if($vysledek["energy"]==2) $icons=$icons.'<img title="Elektřina" src="images/energy.gif"> '; |
139 | | | echo ' |
140 | | | <tr> |
141 | | | <td bgcolor='.$barva.' class=text> |
142 | | | <a class="odkaz" target="_self" href="clen.php?clen='.$vysledek["cid"].'"> |
143 | | | <img src="images/'.$dot.'" title="'.$alt.'" border=0></a> |
144 | | | </td> |
145 | | | <td bgcolor='.$barva.' class="text"> |
146 | | | <a class="odkaz" target="_self" href="edit_user.php?id='.$vysledek["cid"].'">'.$vysledek["cid"].'</a> |
147 | | | </td> |
148 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["jmeno"].'</td> |
149 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["prijmeni"].'</td> |
150 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["prezdivka"].'</td> |
151 | | | |
152 | | | <td bgcolor='.$barva.' class="text"> |
153 | | | '; |
154 | | | $from="info@jablonka.cz"; |
155 | | | $subject = ""; |
156 | | | $text = "Zdravím, |
157 | | | dík |
158 | | | Síma |
159 | | | \n"; |
160 | | | |
161 | | | $text = str_replace(" ","%20",$text); |
162 | | | $text = str_replace("\n","%0d",$text); |
163 | | | if ( $vysledek["email"] ) { |
164 | | | echo ' |
165 | | | <INPUT type="checkbox" name="to'.$vysledek["cid"].'" value="'.$vysledek["email"].'"> |
166 | | | <a href="mail.php?to='.$vysledek["email"].'&subj='.$subject.'&from='.$from.'&text='.$text.'">int</a> |
167 | | | <a href="mailto:'.$vysledek["email"].'?subject='.$subject.'&body='.$text.'">ext</a> '.$vysledek["email"].' |
168 | | | '; |
169 | | | } |
170 | | | $clen=$vysledek["cid"]; |
171 | | | $adresa=clen_to_adresa($clen); |
172 | | | $ipecko=clen_to_ipecko($clen); |
173 | | | $icq=$vysledek["icq"]; |
174 | | | $adresa_pro_mapu=iconv("ISO-8859-2", "UTF-8", $vysledek["ulice"]); |
175 | | | $adresa_pro_mapu=urlencode( $adresa_pro_mapu); |
176 | | | |
177 | | | echo ' |
178 | | | </td> |
179 | | | |
180 | | | <td bgcolor='.$barva.' class="text">'.$icons.'</td> |
181 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["domu"].'</td> |
182 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["mobil"].'</td> |
183 | | | <td bgcolor='.$barva.' class="text"> |
184 | | | <a class="odkaz" target="_self" href="add_ip.php?clen='.$vysledek["cid"].'&adresa='.$vysledek["aid"].'">+</a> |
185 | | | <a class="odkaz" target="_self" href="edit_ip.php?id='.$vysledek["iid"].'">'.$vysledek["ip"].'</a> |
186 | | | </td> |
187 | | | <td bgcolor='.$barva.' class="text"> |
188 | | | <a class="odkaz" target="_self" href="add_adres.php?clen='.$vysledek["cid"].'">+</a> |
189 | | | <a class="odkaz" target="_top" href="http://www.mapy.cz/?query='.$adresa_pro_mapu.'%20'.$vysledek["cp"].',%20Praha">M</a> |
190 | | | <a class="odkaz" target="_self" href="edit_adres.php?id='.$vysledek["aid"].'">'.$vysledek["ulice"].'</a></td> |
191 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["cp"].'</td> |
192 | | | <td bgcolor='.$barva.' class="text">'.$vysledek["byt"].'</td> |
193 | | | <td bgcolor='.$barva.' class="text"> |
194 | | | '; |
195 | | | if($icq) { |
196 | | | echo ' |
197 | | | <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> |
198 | | | <a href="sim:'.$icq.'"><img src="http://web.icq.com/whitepages/online?icq='.$icq.'&img=5" width="18" height="12" border="0" /></a> |
199 | | | '; |
200 | | | } |
201 | | | echo ' |
202 | | | </td> |
203 | | | </tr> |
204 | | | '; |
205 | | | Next($vysledek); |
206 | | | } |
207 | | | |
208 | | | echo ' |
209 | | | </table></tr></td></table></center> |
210 | | | </form> |
211 | | | <br> |
212 | | | Celkem zobrazeno '.$celkem.' záznamů. |
213 | | | '; |
214 | | | ?> |
215 | | | </body> |
216 | | | </html> |