Changeset 121 for trunk/admin/modules
- Timestamp:
- Jun 8, 2011, 8:04:42 PM (13 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.