Changeset 277 for trunk


Ignore:
Timestamp:
Jun 16, 2018, 6:21:28 PM (6 years ago)
Author:
roby
Message:

admin: riallineate le celle della tabella nella voce di menu - Autorizza comuni

Location:
trunk/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/footer.php

    r230 r277  
    1212    die();
    1313}
    14 echo "</td></tr><tr><td>";
     14echo "</td></tr><tr><td colspan=\"2\">";
    1515include("versione.php");
    1616
  • trunk/admin/modules/Elezioni/ele.php

    r274 r277  
    195195
    196196                <a href=\"admin.php?op=rec_add_aff&amp;id_cons_gen=$id_cons_gen\">$bullet"._AFFLUENZE."</a><br>
    197                 <a href=\"admin.php?op=associazioni&amp;id_cons_gen=$id_cons_gen\">$bullet"._INSCOMUNE."</a><br/>
     197                <a href=\"admin.php?op=associazioni&amp;id_cons_gen=$id_cons_gen\">$bullet"._INSCOMUNE."</a><br>
    198198                <a href=\"http://www.eleonline.it/portal/segnala.php?tmp=test123\" target=\"_blank\">$bullet_red <b>"._SEGNALA."</b></a>
    199199                </td></tr>";
  • trunk/admin/modules/Elezioni/ele_associazioni.php

    r271 r277  
    7171     echo "} \n";
    7272     echo "else document.getElementById('trspunta').style.visibility='visible' \n";
    73 #     echo "if (document.getElementById('chiusa').options[3].selected==false) { \n";
    7473     echo "if (document.getElementById('chiusa').selectedIndex!=3) { \n";
    7574     echo "document.getElementById('add').value=\""._MODIFY."\" \n";
     
    124123        echo "<table width=\"100%\" border=\"3\">";
    125124        echo "<tr align=\"center\"><td bgcolor=\"$bgcolor1\"><b>"._CONSULTA."</b></td>";
    126 #       echo "<td bgcolor=\"$bgcolor1\"><b>"._COLLEGI."</b></td>";
    127125        echo "<td bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>";
    128126        echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>";
     
    135133        echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._ASOLO_GRUPPO."</b></td>";
    136134        echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._DISGIUNTO."</b></td>";
    137 #       echo "<input type=\"hidden\" name=\"pag_cons\" value=\"admin.php?op=associazioni&amp;id_cons_gen=\">";
    138135        echo "</tr>";
    139136        echo "<tr align=\"center\"><td>";
    140137        echo "<input type=\"hidden\" name=\"op\" value=\"associazioni\">";
    141138        echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">$descr_cons</td>";
    142 #       $ressede = mysql_query("SELECT id_collegio, descrizione from ".$prefix."_ele_collegi where id_cons_gen='$id_cons_gen' order by descrizione desc", $dbi);
    143 #       if ($num_coll=mysql_num_rows($ressede)){
    144 #               echo "<td><select name=\"id_collegio\">";
    145 #               while(list($id,$descr_coll)=mysql_fetch_row($ressede)){
    146 #                       $sel= ($id == $id_collegio) ? "selected":"";
    147 #                       echo "<option value=\"$id\" $sel>$descr_coll";
    148 #               }
    149 #               echo "</select></td>";
    150 #       } else echo "<td></td>";
    151139        $rescomu = mysql_query("SELECT id_comune, descrizione from ".$prefix."_ele_comuni order by descrizione asc", $dbi);
    152140        echo "<td>";
     
    241229                echo "<input type=\"submit\" id=\"add\" name=\"add\" value=\""._MODIFY."\" ></td></tr>";
    242230                echo "<tr><td colspan=\"5\"><fieldset><legend>"._SPUNTALABEL1."</legend><label id=\"prov1\">"._SPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd3\" name=\"pwd3\" value=\"\" onclick=\"javascript:del_cons()\"></label></fieldset></td></tr>";
    243 # <div  id=\"trspunta\" style=\"visibility:hidden\">   </div>
    244231                echo "<tr id=\"trspunta\" style=\"visibility:hidden\"><td colspan=\"4\"><fieldset><legend>"._SPUNTALABEL2."</legend><label id=\"prov\">"._VIASPUNTAELIMINA." <input type=\"checkbox\" id=\"pwd4\" name=\"pwd4\" value=\"1\" onclick=\"javascript:del_cons()\"></label></fieldset>";
    245232        }else{
     
    249236        $i=0;
    250237        echo "</td></tr></table></form>";
    251 ############
    252238        echo "<hr><br><table width=\"100%\" border=\"3\">";
    253239        echo "<tr align=\"center\"><td width=\"15%\" bgcolor=\"$bgcolor1\"><b>"._CONSULTA."TEST:$id_cons_comu</b></td>";
    254 #       echo "<td bgcolor=\"$bgcolor1\"><b>"._COLLEGI."</b></td>";
    255240        echo "<td width=\"20%\" bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>";
    256241        echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>";
     
    263248        echo "<td width=\"10%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._ASOLO_GRUPPO."</b></td>";
    264249        echo "<td width=\"10%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._DISGIUNTO."</b></td>";
    265 #       echo "<td width=\"10%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._SG."</b></td>";
    266         echo "<td width=\"10\" bgcolor=\"$bgcolor1\"><b>&nbsp;"._FUNZIONI."</td></tr>";
    267 ###############
    268 
    269 #       if ($num_coll>0)
    270 #       $resmod = mysql_query("SELECT t1.id_collegio,t1.id_comune,t2.descrizione as descr,t1.id_cons, t3.descrizione, t4.chiusa,t4.id_conf FROM ".$prefix."_ele_comu_collegi as t1, ".$prefix."_ele_collegi as t2, ".$prefix."_ele_comuni as t3, ".$prefix."_ele_cons_comune as t4 where t1.id_cons_gen='$id_cons_gen' and t1.id_collegio=t2.id_collegio and t1.id_comune=t3.id_comune and t1.id_comune=t4.id_comune and t2.id_cons_gen=t4.id_cons_gen order by t2.descrizione, t3.descrizione", $dbi);
    271 #       else
     250        echo "<td width=\"10\" bgcolor=\"$bgcolor1\"><b>&nbsp;"._FUNZIONI."</b></td></tr>";
     251
    272252        $resmod = mysql_query("SELECT '',t1.id_comune,'',t1.id_cons, t2.descrizione, t1.chiusa, t1.id_conf, preferenze,t1.id_fascia,t1.vismf,t1.solo_gruppo,t1.disgiunto FROM ".$prefix."_ele_cons_comune as t1, ".$prefix."_ele_comuni as t2 where t1.id_cons_gen='$id_cons_gen' and t1.id_comune=t2.id_comune order by t2.descrizione", $dbi);
    273253        while (list($id_collegio,$id_comune2,$descr_coll,$id_cons_comu,$descr_comu, $chiusa,$id_conf,$preferenze2,$fasciacom,$vismf2,$sg2,$disgiunto2) = mysql_fetch_row($resmod)){ //elenco dei modelli inseriti
     
    276256                $i++;
    277257                $bgcolor1=($bgcolor1==$_SESSION['bgcolor1'])?$_SESSION['bgcolor2']:$_SESSION['bgcolor1'];
    278                 if($tipo_cons==3) echo "<tr><td colspan=\"8\">"; else echo "<tr><td colspan=\"8\">";
     258                echo "<tr align=\"center\" bgcolor=\"$bgcolor1\">";
     259                echo "<td><b>$descr_cons</b></td>";
     260                echo "<td><b>$descr_comu</b></td>";
     261                echo "<td><b>$preferenze2</b></td>";
     262                $stato['0']=_ATTIVA;
     263                $stato['1']=_CHIUSA;
     264                $stato['2']=_NULLA;
     265                echo "<td><b>".$stato[$chiusa]."</b></td>";
     266                if($tipo_cons==3){
     267                        echo "<td><b>".$descr_conf."</b></td>";
     268                        $rescomu = mysql_query("SELECT id_fascia,abitanti from ".$prefix."_ele_fasce where id_conf='$id_conf'", $dbi);
     269                        $inffascia=0;
     270                        if (mysql_num_rows($rescomu)==0) echo "<td></td>";
     271                        while(list($id,$abitanti)=mysql_fetch_row($rescomu)){
     272                                $sel='';
     273                                if ($id == $fasciacom)
     274                                        echo "<td>$inffascia - $abitanti</td>";
     275                                $inffascia=$abitanti;
     276                        }
     277
     278                }
     279                if ($vismf2==0) $sel=_NO; else $sel=_SI;
     280                echo "<td>$sel</td>";
     281                if ($sg2==0) $sel=_NO; else $sel=_SI;
     282                echo "<td>$sel</td>";
     283                if ($disgiunto2==0) $sel=_NO; else $sel=_SI;
     284                echo "<td>$sel</td>";
     285                echo "<td>";
    279286                echo "<form name=\"modello$i\" action=\"admin.php\">"
    280                         ."<input type=\"hidden\" name=\"op\" value=\"associazioni\">";
    281 //              echo "<input type=\"hidden\" name=\"do\" value=\"update\">";
    282 #               echo "<input type=\"hidden\" name=\"id_collegio\" value=\"$id_collegio\">";
     287                ."<input type=\"hidden\" name=\"op\" value=\"associazioni\">";
     288                echo "<input type=\"hidden\" name=\"id_conf\" value=\"$id_conf\">";
    283289                echo "<input type=\"hidden\" name=\"idcomune\" value=\"$id_comune2\">";
    284290                echo "<input type=\"hidden\" name=\"id_cons_comu\" value=\"$id_cons_comu\">";
     
    287293                echo "<input type=\"hidden\" name=\"preferenze\" value=\"$preferenze2\">";
    288294                echo "<input type=\"hidden\" name=\"chiusa\" value=\"$chiusa\">";
    289                 echo "<table width=\"100%\"><tr align=\"center\" bgcolor=\"$bgcolor1\">";
    290                 echo "<td width=\"15%\"><b>$descr_cons</b></td>";
    291                 echo "<td width=\"20%\"><b>$descr_comu</b></td>";
    292                 echo "<td width=\"10%\"><b>$preferenze2</b></td>";
    293                 $stato['0']=_ATTIVA;
    294                 $stato['1']=_CHIUSA;
    295                 $stato['2']=_NULLA;
    296                 echo "<td  width=\"10%\"><b>".$stato[$chiusa]."</b></td>";
    297                 if($tipo_cons==3){
    298                         echo "<td width=\"20%\"><input type=\"hidden\" name=\"id_conf\" value=\"$id_conf\"><b>".$descr_conf."</b></td>";
    299                         $rescomu = mysql_query("SELECT id_fascia,abitanti from ".$prefix."_ele_fasce where id_conf='$id_conf'", $dbi);
    300                         $inffascia=0;
    301                         while(list($id,$abitanti)=mysql_fetch_row($rescomu)){
    302                                 $sel='';
    303                                 if ($id == $fasciacom)
    304                                         echo "<td width=\"20%\">$inffascia - $abitanti</td>";
    305                                 $inffascia=$abitanti;
    306                         }
    307 
    308                 }
    309                 if ($vismf2==0) $sel=_NO; else $sel=_SI;
    310                 echo "<td width=\"10%\">$sel</td>";
    311                 if ($sg2==0) $sel=_NO; else $sel=_SI;
    312                 echo "<td width=\"10%\">$sel</td>";
    313                 if ($disgiunto2==0) $sel=_NO; else $sel=_SI;
    314                 echo "<td width=\"10%\">$sel</td>";
    315 #               if ($sg==0) $sel=_NO; else $sel=_SI;
    316 #               echo "<td width=\"10%\">$sel</td>";
    317                 echo "<td width=\"10\"><input type=\"hidden\" name=\"ok\" value=0><input type=\"submit\" name=\"edit$i\" value=\""._EDIT."\">"
    318                         ."</td></tr></table></form></td></tr>\n";
    319         }
    320                 echo "</table></td></tr>";
    321                 echo "</table></td></tr>";
     295                echo "<input type=\"hidden\" name=\"ok\" value=0><input type=\"submit\" name=\"edit$i\" value=\""._EDIT."\">"
     296                        ."</form></td></tr>\n";
     297        }
     298                echo "</table></td></tr></table>";
    322299        CloseTable();
    323 #       echo "</div>";
    324300        }
    325301
     
    386362
    387363
    388 #       die ("do:$do - id_cons:$id_cons_comu - idcomune:$id_comune - new: $idcomunenew");
    389364       
    390365//****************************
Note: See TracChangeset for help on using the changeset viewer.