Changeset 121
- Timestamp:
- Jun 8, 2011, 8:04:42 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_voti.php
r112 r121 1167 1167 echo "<td align=\"center\"><input type=\"hidden\" name=\"id_gruppo$i\" value=\"$id_gruppo\"><b>$num_gruppo</b>" 1168 1168 ."</td><td align=\"left\" width=\"50%\"><b> $descr[0] </b>"; 1169 $pro['si']=(isset($pro['si']) and $pro['si']> 0) ? $pro['si']:0;1170 $pro['no']=(isset($pro['no']) and $pro['no']> 0) ? $pro['no']:0;1171 $pro['validi']=(isset($pro['validi']) and $pro['validi']> 0) ? $pro['validi']:0;1172 $pro['bianchi']=(isset($pro['bianchi']) and $pro['bianchi']> 0) ? $pro['bianchi']:0;1173 $pro['contestati']=(isset($pro['contestati']) and $pro['contestati']> 0) ? $pro['contestati']:0;1174 $pro['nulli']=(isset($pro['nulli']) and $pro['nulli']> 0) ? $pro['nulli']:0;1169 $pro['si']=(isset($pro['si']) and $pro['si']>=0) ? $pro['si']:''; 1170 $pro['no']=(isset($pro['no']) and $pro['no']>=0) ? $pro['no']:''; 1171 $pro['validi']=(isset($pro['validi']) and $pro['validi']>=0) ? $pro['validi']:''; 1172 $pro['bianchi']=(isset($pro['bianchi']) and $pro['bianchi']>=0) ? $pro['bianchi']:''; 1173 $pro['contestati']=(isset($pro['contestati']) and $pro['contestati']>=0) ? $pro['contestati']:''; 1174 $pro['nulli']=(isset($pro['nulli']) and $pro['nulli']>=0) ? $pro['nulli']:''; 1175 1175 $tot_nulli=$pro['nulli']+$pro['bianchi']+$pro['contestati']; 1176 1176 echo "</td><td align=\"right\" width=\"3%\"><input name=\"si$i\" value=\"".$pro['si']."\" size=\"7\" style=\"text-align:right\"></td>"; … … 1238 1238 for($i=5;$i< $y;) { 1239 1239 $id_gruppo = intval($arg[$i++]); 1240 $testval=0; 1240 1241 switch ($genere){ 1241 case (0): 1242 $si=intval($arg[$i++]); 1242 case (0): 1243 if($arg[$i].$arg[$i+1]=='' ) { 1244 $i+=6; 1245 $testval=1; 1246 }else{ 1247 $si=intval($arg[$i++]); 1243 1248 $no=intval($arg[$i++]); 1244 1249 $val=intval($arg[$i++]); … … 1247 1252 $con=intval($arg[$i++]); 1248 1253 $nul=intval($arg[$i++]); 1249 $voti = " $si,$no,$val,$nul,$bia,$con";1254 $voti = "'$si','$no','$val','$nul','$bia','$con'"; 1250 1255 $riga="si=$si,no=$no,validi=$val,nulli=$nul,bianchi=$bia,contestati=$con"; 1256 } 1251 1257 break; 1252 1258 default: … … 1256 1262 break; 1257 1263 } 1264 if($testval) continue; 1258 1265 $result = mysql_query("select * from ".$prefix."$tab where id_cons='$id_cons' and id_sez='$id_sez' and id_gruppo='$id_gruppo'", $dbi); 1259 1266 $ar=mysql_fetch_array($result); … … 1282 1289 mysql_query("insert into ".$prefix."_ele_log values('$id_cons','$id_sez','$username','$log_data','".$log_ora['hours'].":".$log_ora['minutes'].":".$log_ora['seconds']."','$oldval','num_gruppo:$num_gruppo $riga','$tab')", $dbi); 1283 1290 } 1284 } else { 1291 } else { #die ("test in corso: insert into ".$prefix."$tab values ('$id_cons', '$id_gruppo','$id_sez',$voti)"); 1285 1292 mysql_query("insert into ".$prefix."_ele_log values('$id_cons','$id_sez','$username','$log_data','".$log_ora['hours'].":".$log_ora['minutes'].":".$log_ora['seconds']."','','num_gruppo:$num_gruppo $riga','$tab')", $dbi); 1286 1293 mysql_query("insert into ".$prefix."$tab values ('$id_cons', '$id_gruppo','$id_sez',$voti)", $dbi); … … 1317 1324 ?> 1318 1325 1319 -
trunk/client/modules/Elezioni/affluenze.php
r120 r121 107 107 // referendum 108 108 109 109 $posref=''; 110 110 if (!IsSet($num_ref)) { 111 111 $num_ref=1; … … 116 116 $resg = mysql_query("SELECT id_gruppo from ".$prefix."_ele_gruppo where id_cons='$id_cons' and num_gruppo='$num_ref'", $dbi); 117 117 list($id_gruppo)=mysql_fetch_array($resg); 118 118 $posref="&num_ref=$num_ref&num_refs=$num_refs"; 119 119 120 120 } … … 126 126 <a href=\"modules.php?name=Elezioni&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&op=affluenze_graf\"> 127 127 "._VER_GRAF." <img class=\"image\" src=\"modules/Elezioni/images/grafici.png\" alt=\"\" /></a> 128 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez &csv=1\">"._VER_STAMPA."128 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez$posref&csv=1\">"._VER_STAMPA." 129 129 <img class=\"image\" src=\"modules/Elezioni/images/printer.png\" alt=\"\" /></a> 130 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez &csv=1&xls=1\">130 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez$posref&csv=1&xls=1\"> 131 131 <img class=\"image\" src=\"modules/Elezioni/images/csv.gif\" alt=\"\" /></a> 132 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez &csv=1&pdf=1\">132 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez$posref&csv=1&pdf=1\"> 133 133 <img class=\"image\" src=\"modules/Elezioni/images/pdf.gif\" alt=\"\" /></a> 134 134
Note:
See TracChangeset
for help on using the changeset viewer.