Exemplo n.º 1
0
            $message_type = 'failure';
        }
        foreach ($it = new DirectoryIterator(G_BACKUPPATH) as $key => $value) {
            if (!$value->isDir() && pathinfo($value->getFileName(), PATHINFO_EXTENSION) == 'zip') {
                $files[] = basename($value);
            }
        }
        $smarty->assign("T_BACKUP_FILES", $files);
        if (isset($_GET['file']) && in_array($_GET['file'], $files)) {
            EfrontSystem::restore(G_BACKUPPATH . $_GET['file']);
            //Auto backup database
            $message = "The restoring procedure completed successfully";
            $message_type = "success";
        }
    } catch (Exception $e) {
        Installation::handleInstallationExceptions($e);
    }
}
$loadScripts = array('EfrontScripts', 'scriptaculous/prototype', 'scriptaculous/scriptaculous', 'scriptaculous/effects', 'efront_ajax');
$smarty->assign("T_HEADER_LOAD_SCRIPTS", implode(",", array_unique($loadScripts)));
//array_unique, so it doesn't send duplicate entries
$smarty->assign("T_MESSAGE", $message);
$smarty->assign("T_MESSAGE_TYPE", $message_type);
$smarty->load_filter('output', 'eF_template_applyImageMap');
$smarty->load_filter('output', 'eF_template_applyThemeToImages');
$smarty->display("install/install.tpl");
/**
 *
 * @author user
 *
 */