Ignore:
Timestamp:
Mar 2, 2014, 4:49:30 PM (10 years ago)
Author:
roby
Message:
  • modificato il db per gestire la modifica di fascia del comune per le elezioni comunali e per la rilevazione delle affluenze con distinzione per maschi e femmine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/ele_comuni.php

    r184 r189  
    5656function all() {
    5757        global $bgcolor1, $bgcolor2, $prefix, $dbi,$id_cons,$desc,$indirizzo,$centralino,$fax,$email,$fasciatmp,$prov,$id_comune2,$id_cons_gen,$cerca;
    58  
     58 if( !isset($id_conf) ) $id_conf=1;
    5959        echo "<SCRIPT type=\"text/javascript\">\n\n<!--\n";
    6060        echo "function controllo_id() {\n";
     
    9696        echo "<tr><td bgcolor=\"$bgcolor1\"><b>"._FASCIA."</b></td><td><select name=\"fascia\">";
    9797        $descr2="<";
    98                         $resopt1 = mysql_query("select id_fascia, abitanti from ".$prefix."_ele_fasce where data_fine='0000-00-00' order by id_fascia", $dbi);
     98                        $resopt1 = mysql_query("select id_fascia, abitanti from ".$prefix."_ele_fasce where id_conf=1 order by id_fascia", $dbi);
    9999                while(list($id,$descr)=mysql_fetch_row($resopt1)){
    100100                        $selid= ($id == $fasciatmp) ? "selected":"";
     
    149149                echo "<td><b>$fax</b></td>";
    150150                echo "<td><b>".substr($email,0,15)."...</b></td>";
    151                 $resopt1 = mysql_query("select abitanti from ".$prefix."_ele_fasce where id_fascia=$fasciatmp and data_fine='0000-00-00'", $dbi);
     151                $resopt1 = mysql_query("select abitanti from ".$prefix."_ele_fasce where id_fascia=$fasciatmp and id_conf=$id_conf", $dbi);
    152152                list($tmpfascia)=mysql_fetch_row($resopt1);
    153153                $fasciaref=$fasciatmp-1;
    154                 $resopt1 = mysql_query("select abitanti from ".$prefix."_ele_fasce where id_fascia=$fasciaref and data_fine='0000-00-00'", $dbi);
     154                $resopt1 = mysql_query("select abitanti from ".$prefix."_ele_fasce where id_fascia=$fasciaref and id_conf=$id_conf", $dbi);
    155155                if(mysql_num_rows($resopt1)==0) $valfascia="< $tmpfascia";
    156156                else
Note: See TracChangeset for help on using the changeset viewer.