Changeset 362 for trunk/admin/modules/Elezioni/restore.php
- Timestamp:
- Mar 27, 2022, 7:51:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/restore.php
r344 r362 18 18 $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST; 19 19 if (isset($param['datafile'])) $datafile=addslashes($param['datafile']); else $datafile=''; 20 $id_cons_gen=intval($param['id_cons_gen']); 20 21 include("modules/Elezioni/ele.php"); 21 22 ele(); … … 46 47 $scarto=0; 47 48 $conta=array(); 48 49 while( $currentLine <= $cntFile ){ 49 50 $appo=substr($arrFile[$currentLine],1,-2); 50 51 $conta[$x]=0; … … 63 64 } 64 65 }else {$scarto++;$currentLine++;} 65 66 } 66 67 if ($scarto==0){ 67 68 $currentLine = 0; … … 83 84 $appo=substr($arrFile[$currentLine],1,-2); 84 85 else $appo=''; 85 if(isset($tabs[($x+1)])) 86 if ($appo==$tabs[($x+1)]){ $x++; break;} 87 elseif($appo=='') { $x++; break;} 86 if(isset($tabs[($x+1)])){ 87 if ($appo==$tabs[($x+1)]){ $x++; break;}} 88 elseif($appo=='') { $x++; break;} 89 88 90 if(isset($arrFile[$currentLine])) 89 91 $test=explode(':',$arrFile[$currentLine]); if(!is_array($test)) {die("errore di import<br>");} … … 99 101 } 100 102 } 101 if(!$res_del->rowCount()) die ("delete $tbs where id_cons=$idcns--- errore di cancellazione");103 # if(!$res_del->rowCount()) die ("delete $tbs where id_cons=$idcns--- errore di cancellazione"); 102 104 }else $valori.= ",'".addslashes(base64_decode($val))."'"; 103 $sql="insert into $tab values($valori)"; 105 if($tab=='soraldo_ele_cons_comune') $valori.=",'0'"; 106 $sql="insert into $tab values($valori)"; 107 try { 104 108 $res_comune = $dbi->prepare("$sql"); 105 109 $res_comune->execute(); 110 } 111 catch(PDOException $e) 112 { 113 echo $sql . "<br>" . $e->getMessage(); 114 } 115 116 #echo "TAB: $tbs -- $sql<br>"; 106 117 $currentLine++; 107 118 } … … 111 122 } else $errore=1; 112 123 fclose($handle); 124 die("finito"); 113 125 } 114 126 if (isset($errore)) 115 127 if ($errore) die( _MEX_RESTORE_FAILED); 116 else echo _MEX_RESTORE_OK;128 else die( _MEX_RESTORE_OK ); 117 129 echo"</td></tr></table>"; 118 130 include("footer.php");
Note:
See TracChangeset
for help on using the changeset viewer.