Changeset 424 for trunk/admin/modules/Elezioni/restore.php
- Timestamp:
- Jun 13, 2024, 7:18:22 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/restore.php
r383 r424 15 15 $perms=ChiSei(0); 16 16 if ($perms!=256) die("Non hai i permessi per effettuare questa operazione!"); 17 17 global $LINK,$fileback; 18 18 $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST; 19 19 if (isset($param['datafile'])) $datafile=addslashes($param['datafile']); else $datafile=''; … … 22 22 ele(); 23 23 if (isset($_FILES['datafile']['tmp_name'])) $updfile=$_FILES['datafile']['tmp_name']; else $updfile=''; 24 if (!is_uploaded_file($updfile) )24 if (!is_uploaded_file($updfile) and $LINK=='') 25 25 # if (!is_uploaded_file($_FILES['datafile']['tmp_name'])) 26 26 # if (file_exists($datafile)) … … 33 33 echo "<td align=\"center\"><input type=\"submit\" name=\"add\" value=\""._OK."\"></td></tr></table></form>"; 34 34 //////////////////////////// 35 }else{$datafile=$_FILES['datafile']['tmp_name']; 35 }else{ 36 if($LINK=='') 37 $datafile=$_FILES['datafile']['tmp_name']; 38 else 39 $datafile=$fileback; 36 40 $arrFile = file($datafile); 37 41 $handle = fopen($datafile, "r"); … … 123 127 } else $errore=1; 124 128 fclose($handle); 125 die("finito");129 echo "<center><h2>Aggiornamento del ".date('d/m/Y H:i')." terminato</h2></center>"; 126 130 } 127 if (isset($errore)) 128 if ($errore) die( _MEX_RESTORE_FAILED); 129 else die( _MEX_RESTORE_OK ); 131 if (isset($errore) and $errore) echo _MEX_RESTORE_FAILED; 132 130 133 echo"</td></tr></table>"; 131 134 include("footer.php");
Note:
See TracChangeset
for help on using the changeset viewer.