Incam_Intranet/backup_bd.php

34 lines
854 B
PHP
Raw Permalink Normal View History

<?php
include_once("seguridad.php");
include_once("functions.php");
include_once("Objects/Backup.php");
if(!$usuario->tieneRol("2")){
header("Location: aplicacion.php?e=permiso");
exit;
}
include_once("html/cabecera.php");
try{
$backup = new Backup($usuario);
$ruta = $backup->backupGlobal();
include_once("Objects/Administracion.php");
$administracion=new Administracion($usuario,$locale);
$constantes=$administracion->getItem("constantes");
$url = $constantes['srcDocs'];
$ruta="descargas.php?tipo=back&cod=".$ruta;
?>
<iframe id="file_download" width="0" height="0" scrolling="no" frameborder="0" src="<?php echo $ruta;?>"></iframe>
<?php
echo $locale['1816'];
echo "<a href='$ruta'>Descargar</a>";
}catch (Exception $e) {
$msg=$e->getMessage();
include_once("showError.php");
}
?>