Ejemplo n.º 1
0
                <h1>phpMyFAQ <?php 
echo PMF_System::getVersion();
?>
 Update</h1>
                <?php 
$version = $faqConfig->get('main.currentVersion');
if (version_compare($version, '2.8.0-alpha2', '>=')) {
    if (!$faqConfig->get('main.maintenanceMode')) {
        echo '<p class="alert alert-warning"><strong>Warning!</strong> Your phpMyFAQ installation is ' . 'not in maintenance mode, you should enable the maintenance mode in your administration ' . 'backend before running the update!</p>';
    }
}
?>
            </div>
        </div>
<?php 
$installer = new PMF_Installer();
$installer->checkPreUpgrade();
/**************************** STEP 1 OF 3 ***************************/
if ($step === 1) {
    ?>
        <form action="update.php?step=2" method="post">
        <input name="version" type="hidden" value="<?php 
    echo $version;
    ?>
">
        <div class="row form-group">
            <div class="col-lg-12">
                <ul class="nav nav-pills nav-justified thumbnail setup-panel">
                    <li class="active">
                        <a href="#">
                            <h4 class="list-group-item-heading">Step 1 of 3</h4>
Ejemplo n.º 2
0
session_start();
require PMF_ROOT_DIR . '/config/constants.php';
//
// Setting up PSR-0 autoloader for Symfony Components
//
require PMF_INCLUDE_DIR . '/libs/Symfony/Component/ClassLoader/UniversalClassLoader.php';
$loader = new UniversalClassLoader();
$loader->registerNamespace('Symfony', PMF_INCLUDE_DIR . '/libs');
$loader->registerPrefix('PMF_', PMF_INCLUDE_DIR);
$loader->registerPrefix('Twig_', PMF_INCLUDE_DIR . '/libs');
$loader->register();
//
// Initialize static string wrapper
//
PMF_String::init('en');
$installer = new PMF_Installer();
$system = new PMF_System();
//
// Initializing Twig
//
$twig = new Twig_Environment(new Twig_Loader_Filesystem(PMF_ROOT_DIR . '/setup/assets/twig'));
$tplLayoutVars = array('version' => PMF_System::getVersion(), 'currentYear' => date('Y'), 'criticalErrors' => $installer->checkBasicStuff(), 'filePermErrors' => $installer->checkFilesystemPermissions(), 'nonCriticalErrors' => $installer->checkNoncriticalSettings());
$twig->loadTemplate('layout.twig')->display($tplLayoutVars);
// not yet POSTed
if (!isset($_POST['sql_server']) && !isset($_POST['sql_user']) && !isset($_POST['sql_db'])) {
    $tplDatabaseVars = array('databases' => $system->getSupportedSafeDatabases(true), 'dirname' => dirname(__DIR__));
    ?>

    <form class="form-horizontal" action="index.php" method="post">
        <div class="row">
            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">