Changeset 256 for trunk/admin/modules/Elezioni/ele_associazioni.php
- Timestamp:
- Jan 16, 2019, 7:06:35 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_associazioni.php
r254 r256 71 71 echo "} \n"; 72 72 echo "else document.getElementById('trspunta').style.visibility='visible' \n"; 73 # echo "if (document.getElementById('chiusa').options[3].selected==false) { \n";74 73 echo "if (document.getElementById('chiusa').selectedIndex!=3) { \n"; 75 74 echo "document.getElementById('add').value=\""._MODIFY."\" \n"; … … 124 123 echo "<table width=\"100%\" border=\"3\">"; 125 124 echo "<tr align=\"center\"><td bgcolor=\"$bgcolor1\"><b>"._CONSULTA."</b></td>"; 126 # echo "<td bgcolor=\"$bgcolor1\"><b>"._COLLEGI."</b></td>";127 125 echo "<td bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>"; 128 126 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>"; … … 135 133 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._ASOLO_GRUPPO."</b></td>"; 136 134 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._DISGIUNTO."</b></td>"; 137 # echo "<input type=\"hidden\" name=\"pag_cons\" value=\"admin.php?op=associazioni&id_cons_gen=\">";138 135 echo "</tr>"; 139 136 echo "<tr align=\"center\"><td>"; 140 137 echo "<input type=\"hidden\" name=\"op\" value=\"associazioni\">"; 141 138 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>";151 139 $rescomu = mysql_query("SELECT id_comune, descrizione from ".$prefix."_ele_comuni order by descrizione asc", $dbi); 152 140 echo "<td>"; … … 241 229 echo "<input type=\"submit\" id=\"add\" name=\"add\" value=\""._MODIFY."\" ></td></tr>"; 242 230 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>244 231 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>"; 245 232 }else{ … … 249 236 $i=0; 250 237 echo "</td></tr></table></form>"; 251 ############252 238 echo "<hr><br><table width=\"100%\" border=\"3\">"; 253 239 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>";255 240 echo "<td width=\"20%\" bgcolor=\"$bgcolor1\"><b>"._DEFCOMUNE."</b></td>"; 256 241 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\"><b>"._PREFERENZE."</b></td>"; … … 263 248 echo "<td width=\"10%\" bgcolor=\"$bgcolor1\" align=\"center\"><b>"._ASOLO_GRUPPO."</b></td>"; 264 249 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> "._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> "._FUNZIONI."</b></td></tr>"; 251 272 252 $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); 273 253 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 … … 276 256 $i++; 277 257 $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>"; 279 286 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\">"; 283 289 echo "<input type=\"hidden\" name=\"idcomune\" value=\"$id_comune2\">"; 284 290 echo "<input type=\"hidden\" name=\"id_cons_comu\" value=\"$id_cons_comu\">"; … … 287 293 echo "<input type=\"hidden\" name=\"preferenze\" value=\"$preferenze2\">"; 288 294 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>"; 322 299 CloseTable(); 323 # echo "</div>";324 300 } 325 301 … … 386 362 387 363 388 # die ("do:$do - id_cons:$id_cons_comu - idcomune:$id_comune - new: $idcomunenew");389 364 390 365 //****************************
Note:
See TracChangeset
for help on using the changeset viewer.