Ejemplo n.º 1
0
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require 'InjaderPage.php';
$IJP = new InjaderPage();
require '../sys/header.php';
$CMS->Cache->ClearAll();
$strVersion = $CMS->SYS->GetSysPref(C_PREF_CMS_VERSION);
$strMaxVersion = C_SYS_LATEST_VERSION;
$strPageTitle = "Injader - Upgrade to version {$strMaxVersion}";
// Prevent upgrade to max version
if ($strVersion == $strMaxVersion) {
    $IJP->Display("<h1>Upgrade Aborted</h1>\n\n<p>Your site cannot be upgraded because you're already running Injader {$strMaxVersion}.</p>\n\n<ul>\n<li>Target version: {$strMaxVersion}</li>\n<li>Your site: {$strVersion}</li>\n</ul>", $strPageTitle);
} else {
    $strWarning = "";
    if ($strMaxVersion == "x.x.x") {
        //
    }
    $IJP->Display("<h1>System Upgrade</h1>\n\n<p>You are about to upgrade your site from Injader {$strVersion} to Injader {$strMaxVersion}.</p>\n\n{$strWarning}<p><a href=\"upgrade.php\">Run the upgrade script</a>.</p>", $strPageTitle);
}
Ejemplo n.º 2
0
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require 'InjaderPage.php';
$IJP = new InjaderPage();
$intStep = isset($_GET['step']) ? $_GET['step'] : null;
if (!$intStep) {
    $intStep = 1;
}
$strPageTitle = "Injader Installer - Step {$intStep}";
global $blnInstalling;
$blnInstalling = true;
// Required to prevent problems with scheduling
// Initially, some external files will be missing
switch ($intStep) {
    case 1:
    case 2:
    case 3:
        break;
    case 4:
Ejemplo n.º 3
0
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require 'InjaderPage.php';
$IJP = new InjaderPage();
// DETECT INSTALL DIRECTORY in case it has been overwritten
$strFileURL = '../sys/SystemDirs.php';
@($arrFile = file($strFileURL));
if (count($arrFile) == 0 || !$arrFile) {
    $IJP->Display("<h1>Upgrade Error</h1>\n\n<p>SystemDirs.php cannot be found.</p>\n\n\r\n      <p><em>Source: &lt;upgrade.php, version {$strUpgradeTo}&gt;</em></p>", "Error");
}
// Get current directory
$arrInstallRelURL = explode("installer", $_SERVER['PHP_SELF']);
$strInstallRelURL = $arrInstallRelURL[0];
// Do stuff with the file
$strFile = "";
foreach ($arrFile as $strKey => $strData) {
    if (strpos($strData, "define('URL_ROOT',") > -1) {
        $strData = "define('URL_ROOT', \"{$strInstallRelURL}\");\r\n";
    }
Ejemplo n.º 4
0
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
require 'InjaderPage.php';
$IJP = new InjaderPage();
$strHTML = <<<PageContent
<h1 style="text-align: center;">Injader Install Wizard</h1>
<table>
  <tr>
    <td style="padding: 8px; vertical-align: top; width: 48%;">
      <h2 style="background-color: #000; color: #fff; margin-top: 0px; padding: 4px;">New installs</h2>
      <p><b>IMPORTANT: If you install over an existing site, all of your content will be deleted - so be careful!</b></p>
      <ol>
      <li>First, read the install guide. This can be found in the release download, under guides/INSTALL.md.</li>
      <li><a href="install.php">Start the installation wizard</a>. Follow the on-screen prompts and you'll be up and running in no time.</li>
      </ol>
    </td>
    <td style="border-left: 2px solid #000; padding: 8px; vertical-align: top; width: 48%;">
      <h2 style="background-color: #000; color: #fff; margin-top: 0px; padding: 4px;">Upgrades</h2>
      <ol>