Changeset 55 for trunk/client/modules/Elezioni/index.php
- Timestamp:
- Mar 26, 2010, 4:02:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/index.php
r52 r55 218 218 global $admin, $prefix, $dbi, $offset, $votog, $votol, $votoc, $circo, $min,$id_cons,$tipo_cons,$descr_cons,$id_cons_gen,$id_comune,$genere,$id_circ; 219 219 220 220 $res = mysql_query("select * from ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ",$dbi); 221 $ressede = mysql_query("select * from ".$prefix."_ele_sede where id_cons='$id_cons' ",$dbi); 222 $res3 = mysql_query("select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' ",$dbi); 223 $circo = mysql_num_rows($res); 224 $sedi = mysql_num_rows($ressede); 225 $sez = mysql_num_rows($res3); 226 221 227 echo "<div><b>"._DATIG."</b></div> "; 222 228 echo "<table class=\"table-80\"><tr class=\"bggray\">"; 223 229 echo "<td ><b>"._AVENTI."</b></td>" 224 230 ."<td ><b>"._MASCHI."</b></td>" 225 ."<td ><b>"._FEMMINE."</b></td>" 226 ."<td ><b><a href=\"modules.php?name=Elezioni&op=circo&id_cons_gen=$id_cons_gen&id_comune=$id_comune\">"._CIRCS."</a></b></td>" 227 ."<td><b><a href=\"modules.php?name=Elezioni&op=sezione&id_cons_gen=$id_cons_gen&id_comune=$id_comune\">"._SEZIONI."</a></b></td>" 231 ."<td ><b>"._FEMMINE."</b></td>"; 232 if ($circo>1) 233 echo "<td ><b><a href=\"modules.php?name=Elezioni&op=circo&id_cons_gen=$id_cons_gen&id_comune=$id_comune\">"._CIRCS."</a></b></td>"; 234 else 235 echo "<td ><b><a href=\"modules.php?name=Elezioni&op=circo&id_cons_gen=$id_cons_gen&id_comune=$id_comune\">"._SEDI."</a></b></td>"; 236 echo "<td><b><a href=\"modules.php?name=Elezioni&op=sezione&id_cons_gen=$id_cons_gen&id_comune=$id_comune\">"._SEZIONI."</a></b></td>" 228 237 ."<td ><b><a href=\"modules.php?name=Elezioni&op=gruppo&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ\">"._GRUPPI."</a></b></td>"; 229 238 … … 233 242 234 243 235 $res = mysql_query("select * from ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ",$dbi); 236 $res3 = mysql_query("select * from ".$prefix."_ele_sezioni where id_cons='$id_cons' ",$dbi); 237 $circo = mysql_num_rows($res); 238 $sez = mysql_num_rows($res3); 244 239 245 $candi=0; 240 246 … … 261 267 } 262 268 263 269 if($circo==1) $circo=$sedi; 264 270 $res4 = mysql_query("select sum(maschi),sum(femmine), sum(maschi+femmine) from ".$prefix."_ele_sezioni where id_cons=$id_cons", $dbi); 265 271 if($res4) list($maschi,$femmine,$tot) = mysql_fetch_row($res4); … … 306 312 $result = mysql_query("select * from ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ORDER BY num_circ 307 313 LIMIT $min,$offset", $dbi); 314 $numcirc=mysql_num_rows($result); 315 if ($numcirc>1){ 308 316 echo "<div><b>"._CIRCS."</b></div><br /><br /> 309 317 <table class=\"table-80\"><tr class=\"bggray\">" … … 312 320 ."<td ><b>"._INDIRIZZO."</b></td>" 313 321 ."<td><b>"._TEL."</b></td></tr>"; 322 }else{ 323 echo "<div><b></b></div><br /><br /> 324 <table class=\"table-80\"><tr class=\"bggray\">" 325 ."<td ><b>"._INDIRIZZO."</b></td>" 326 ."<td><b>"._TEL."</b></td></tr>"; 327 } 314 328 315 329 while(list($id_cons2,$id_circ,$num_circ,$descr_circ) = mysql_fetch_row($result)) { 316 if ($num_circ!=0) { 330 #if($numcirc==1) {$descr_circ=''; $num_circ='';} 331 if (!($num_circ===0)) { 317 332 318 echo "<tr class=\"bggray3\"><td><b>$num_circ</b>" 333 echo "<tr class=\"bggray3\">"; 334 if ($numcirc>1) { 335 echo "<td><b>$num_circ</b>" 319 336 ."</td><td><b>"; 320 337 echo "<a href=\"modules.php?name=Elezioni&op=sezione&id_cons_gen=$id_cons_gen&id_comune=$id_comune&id_circ=$id_circ&descr_circ=$descr_circ\">$descr_circ</a></b></td>"; 338 } 321 339 322 340 // dati sede … … 329 347 ."</td><td><b>$tel1 </b></td><td><b> $tel2</b></td></tr>"; 330 348 331 if ($i<$righe) echo"<tr class=\"bggray3\"><td></td><td></td>"; 349 if ($i<$righe) echo"<tr class=\"bggray3\">"; 350 if ($numcirc>1) echo "<td></td><td></td>"; 332 351 333 352 } … … 362 381 $offset=15; 363 382 if (!isset($min)) $min=0; 364 383 if (!isset($id_circ)) $id_circ=0; 365 384 $go="sezione"; 366 $res2 = mysql_query("SELECT descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' AND id_circ='$id_circ' ", $dbi); 385 $res2 = mysql_query("SELECT descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons'", $dbi); 386 $numcirc = mysql_num_rows($res2); 387 $res2 = mysql_query("SELECT descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' AND id_circ='$id_circ' ", $dbi); 367 388 list($descr_circ) = mysql_fetch_row($res2); 368 389 if($numcirc>1){ 369 390 echo "<div><b>"._SEZIONI." "; 370 391 if ($id_circ) echo "di $descr_circ"; 371 392 if ($id_sede) echo _SINGOLA; 372 echo "</b></div><br /> 373 <table class=\"table-80\"><tr class=\"bggray\">" 393 echo "</b></div>"; 394 } 395 echo "<br />" 396 ."<table class=\"table-80\"><tr class=\"bggray\">" 374 397 ."<td class=\"td-5\"><b>"._NUM."</b></td>" 375 398 ."<td ><b>"._INDIRIZZO."</b></td>"
Note:
See TracChangeset
for help on using the changeset viewer.