function ipm_remove_end_slash($script_path) { if (substr($script_path, -1) == '/') { $script_path = substr($script_path, 0, strlen($script_path) - 1); $script_path = ipm_remove_end_slash($script_path); } return $script_path; }
<?php include 'includes/header.php'; if (!isset($_SESSION['install_data']) || $_SESSION['install_data']['stage'] < 3) { header('Location: index.php'); } if (isset($_POST['next'])) { if (!empty($_POST['site_name'])) { if (!empty($_POST['domain'])) { $ipm_install->set_form('site_name', $_POST['site_name']); $ipm_install->set_form('domain', strtolower($_POST['domain'])); $ipm_install->set_form('script_path', ipm_remove_end_slash($_POST['script_path'])); $ipm_install->set_form('port', (int) $_POST['port']); $ipm_install->set_form('https', $_POST['https'] ? 1 : 0); $_SESSION['install_data']['stage'] = 4; header('Location: user.php'); } else { $message = 'Domain Empty'; } } else { $message = 'Site Name Empty'; } } include 'includes/html-header.php'; ?> <div id="page-body"> <div id="sidebar"> <div id="help" class="widget"> <h2>Help</h2> <p>All the settings on this page can be changed after install.</p>