Changeset 101
- Timestamp:
- May 26, 2011, 9:42:24 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_gruppo.php
r87 r101 171 171 echo "[ <a href=\"admin.php?op=gruppo&id_cons_gen=$id_cons_gen&id_circ=$id_circ\">"._NO."</a> ] - [<a href=\"admin.php?op=gruppo&do=delete&id_gruppo=$id_gruppo&id_cons_gen=$id_cons_gen&id_comune=$id_comune&min=$min&ok=1\">"._YES."</a> ]";exit; 172 172 }else{ 173 $reslis = mysql_query("select id_lista from ".$prefix."_ele_lista where id_gruppo='$id_gruppo'", $dbi); 174 while (list($idlst)=mysql_fetch_row($reslis)){ 175 $rescan = mysql_query("select id_cand from ".$prefix."_ele_candidato where id_lista='$idlst'", $dbi); 176 while (list($idcnd)=mysql_fetch_row($rescan)){ 177 mysql_query("delete from ".$prefix."_ele_voti_candidati where id_cand='$idcnd'"); 178 mysql_query("delete from ".$prefix."_ele_candidati where id_cand='$idcnd'"); 179 } 180 mysql_query("delete from ".$prefix."_ele_voti_lista where id_lista='$idlst'"); 181 mysql_query("delete from ".$prefix."_ele_lista where id_lista='$idlst'"); 182 } 183 $result = mysql_query("delete from ".$prefix."_ele_voti_gruppo where id_gruppo='$id_gruppo'", $dbi); 173 184 $result = mysql_query("delete from ".$prefix."_ele_gruppo where id_gruppo='$id_gruppo'", $dbi); 174 185 if (!$result) return; -
trunk/client/modules/Elezioni/affluenze.php
r82 r101 184 184 185 185 186 187 $ressomma = mysql_query("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo order by t3.data,t3.orario",$dbi); 186 $ressomma = mysql_query("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos $cond group by t3.data,t3.orario,t3.id_gruppo order by t3.data,t3.orario",$dbi); 188 187 189 188 #die("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo "); … … 253 252 #foreach($ar[['num_sez'] as $i) 254 253 ########## 255 $resvoti = mysql_query("select t1.num_sez from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t2.id_cons='$id_cons' $circos $cond order by t1.num_sez ",$dbi); 256 254 $resvoti = mysql_query("select t1.num_sez from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t2.id_cons='$id_cons' $circos order by t1.num_sez ",$dbi); 257 255 ########### 258 256 # for ($i=$sez_da;$i<=$sez_a;$i++) … … 265 263 } 266 264 $resvoti = mysql_query("select t3.data,t3.orario,t1.num_sez,voti_uomini, voti_donne, voti_complessivi from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos $cond order by data,orario,t1.num_sez ",$dbi); 267 268 265 269 266 # $resvoti = mysql_query("SELECT data,orario,t2.num_sez,voti_uomini, voti_donne, voti_complessivi from ".$prefix."_ele_voti_parziale as t1, ".$prefix."_ele_sezioni as t2 where t1.id_cons=$id_cons and t1.id_sez=t2.id_sez $cond order by data,orario,t2.num_sez", $dbi); -
trunk/client/modules/Elezioni/funzioni.php
r78 r101 403 403 if($pos=="dx") $p=0; elseif($pos=="sx")$p=1;else $p=''; 404 404 405 $res ult= mysql_query("SELECT * FROM ".$prefix."_ele_widget where pos_or='$p' and attivo='1' order by pos_ver asc", $dbi);406 if($res ult){407 while ($row = mysql_fetch_array($res ult)) {405 $resblk = mysql_query("SELECT * FROM ".$prefix."_ele_widget where pos_or='$p' and attivo='1' order by pos_ver asc", $dbi); 406 if($resblk){ 407 while ($row = mysql_fetch_array($resblk)) { 408 408 $nome=$row['nome_file']; 409 409 include ("modules/Elezioni/blocchi/$nome"); … … 417 417 if($pos=="dx") $p=0; elseif($pos=="sx")$p=1;else $p=''; 418 418 419 $res ult= mysql_query("SELECT * FROM ".$prefix."_ele_widget where pos_or='$p' and attivo='1' order by pos_ver asc", $dbi);420 if ($res ult) $numero=mysql_num_rows($result);else $numero=0;419 $reschk = mysql_query("SELECT * FROM ".$prefix."_ele_widget where pos_or='$p' and attivo='1' order by pos_ver asc", $dbi); 420 if ($reschk) $numero=mysql_num_rows($reschk);else $numero=0; 421 421 422 422 return $numero;
Note:
See TracChangeset
for help on using the changeset viewer.