. ************************************************************************ */ /** * * install.php, TSM Monitor * * install php file * * @author Frank Fegert * @package tsmmonitor */ include_once "includes/global.php"; if ($_REQUEST["step"] != "30" && $_REQUEST["step"] != "40") { include_once "includes/page_head.php"; } // allow the upgrade script to run for as long as it needs to ini_set("max_execution_time", "0"); $tsm_monitor_versions = array("0.1.0", "0.1.1"); $old_tsm_monitor_version = fetchCellDB("select confval from cfg_config where confkey='version'", '', $conn); // try to find current (old) version in the array $old_version_index = array_search($old_tsm_monitor_version, $tsm_monitor_versions); /* do a version check */ if ($old_tsm_monitor_version == $config["tsm_monitor_version"]) { echo "

Error

\n

This installation is already up-to-date. Click here to use TSM Monitor.

\n \n \n \n \n"; exit; } elseif (empty($old_tsm_monitor_version)) { echo "

Error

\n

You have created a new database, but have not yet imported the 'tsmmonitor.sql' file. At the command line, execute the following to continue:

\n

mysql -u $db_user -p $db_password < tsmmonitor.sql

\n

This error may also be generated if the TSM Monitor database user does not have correct permissions on the TSM Monitor database.
\n Please ensure that the TSM Monitor database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the TSM Monitor database.

\n \n \n \n \n"; exit; } // default for the install type if (!isset($_REQUEST["install_type"])) { $_REQUEST["install_type"] = 0; } // defaults for the install type dropdown if ($old_tsm_monitor_version == "new_install") { $default_install_type = "10"; } else { $default_install_type = "20"; } // pre-processing that needs to be done for each step if (empty($_REQUEST["step"])) { $_REQUEST["step"] = 10; } else { if ($_REQUEST["step"] == "10") { $_REQUEST["step"] = "20"; } elseif (($_REQUEST["step"] == "20") && ($_REQUEST["install_type"] == "10")) { $_REQUEST["step"] = "30"; } elseif (($_REQUEST["step"] == "20") && ($_REQUEST["install_type"] == "20")) { $_REQUEST["step"] = "40"; } elseif ($_REQUEST["step"] == "30") { $_REQUEST["step"] = "90"; } elseif ($_REQUEST["step"] == "40") { $_REQUEST["step"] = "90"; } } if ($_REQUEST["step"] == "90") { // Flush updated data to DB // ... // ... // ... updateDB('cfg_config', array(confkey => 'version', confval => $config['tsm_monitor_version']), 'confkey', $conn); closeDB($conn); header("Location: index.php"); exit; } elseif (($_REQUEST["step"] == "40") && ($_REQUEST["install_type"] == "20")) { // if the version is not found, die if (!is_int($old_version_index)) { echo "

Error

\n

Invalid TSM Monitor version\n $old_tsm_monitor_version, cannot upgrade to ".$config["tsm_monitor_version"]."\n

\n \n \n \n"; exit; } // loop over all versions up to the current and perform incremental updates for ($i = ($old_version_index+1); $i < count($tsm_monitor_versions); $i++) { if ($tsm_monitor_versions[$i] == "0.1") { include "install/0_1_to_0_1_1.php"; upgrade_to_0_1_1(); } /* elseif ($tsm_monitor_versions[$i] == "0.1.1") { include "install/0_1_1_to_0_1_2.php"; upgrade_to_0_1_2(); } elseif ($tsm_monitor_versions[$i] == "0.1.2") { include "install/0_1_2_to_0_1_3.php"; upgrade_to_0_1_3(); } */ } } ?> TSM Monitor Installer
 

Thank you for taking the time to download and install TSM Monitor.

TSM Monitor is a web application written in PHP to help TSM administrators to quickly get reports and health status information of their TSM servers. It generates it's content dynamically so one can easily add or modify queries to adapt the application to one's own needs. Before you can start using TSM Monitor, there are a few configuration steps that need to be done.

Make sure you have read and followed the required steps needed to install TSM Monitor before continuing. Install information can be found here http://www.tsm-monitor.org/wiki/doku.php

TSM Monitor is licensed under the GNU General Public License, you must agree to its provisions before continuing:

TSM Monitor 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.

TSM Monitor 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 TSM Monitor. If not, see http://www.gnu.org/licenses/.

Please select the type of installation

Installation stuff could be done here ...

Upgrade stuff could be done here ...

 

">