<?php require_once "./installer/installer.php"; $problems = array(); $inst = new SpreadsheetInstaller(); if (!$inst->checkPHPVersion("5")) { $problems[] = "Spreadsheet requires PHP 5.x"; } if (isset($_POST['db_host'])) { $db_host = $_POST['db_host']; if (isset($_POST['db_port'])) { $db_port = $_POST['db_port']; } else { $problems[] = "Database port should be specified."; } if (isset($_POST['db_user'])) { $db_user = $_POST['db_user']; } else { $problems[] = "Database user should be specified."; } if (isset($_POST['db_pass'])) { $db_pass = $_POST['db_pass']; } else { $problems[] = "Database password should be specified."; } if (isset($_POST['db_name'])) { $db_name = $_POST['db_name']; } else { $problems[] = "Database name should be specified."; } $db_prefix = isset($_POST['db_prefix']) ? $_POST['db_prefix'] : '';
<?php require_once "./installer/installer.php"; $problems = array(); $inst = new SpreadsheetInstaller(); if (!$inst->checkPHPVersion("5")) { $problems[] = "Spreadsheet requires PHP 5.x"; } if (isset($_POST['update'])) { $inst->update(); $inst->removeInstallFiles(); unlink(__FILE__); $inst->redirectTo("samples/01_simple_init.html"); die; } if (isset($_POST['db_host'])) { $db_host = $_POST['db_host']; if (isset($_POST['db_port'])) { $db_port = $_POST['db_port']; } else { $problems[] = "Database port should be specified."; } if (isset($_POST['db_user'])) { $db_user = $_POST['db_user']; } else { $problems[] = "Database user should be specified."; } if (isset($_POST['db_pass'])) { $db_pass = $_POST['db_pass']; } else { $problems[] = "Database password should be specified.";