<?php
// $Id: install1.php,v 1.9 2003/12/24 13:03:20 rcastley Exp $
/**
* Step 1 of Installation
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.9 $
**/

include_once( "common.php" );

$DBhostname = trim( mosGetParam( $_POST, 'DBhostname', '' ) );
$DBuserName = trim( mosGetParam( $_POST, 'DBuserName', '' ) );
$DBpassword = trim( mosGetParam( $_POST, 'DBpassword', '' ) );
$DBname  	= trim( mosGetParam( $_POST, 'DBname', '' ) );
$DBDel  	= trim( mosGetParam( $_POST, 'DBDel', '' ) );
$DBBackup  	= trim( mosGetParam( $_POST, 'DBBackup', 1 ) );
$DBSample  	= trim( mosGetParam( $_POST, 'DBSample', '' ) );
$DBHelp 	= trim( mosGetParam( $_POST, 'DBHelp', '' ) );
$DBcreated = trim( mosGetParam( $_POST, 'DBcreated', 0 ) );

?>
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mambo Open Source Installer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="../../images/M_images/favicon.ico" />
<link rel="stylesheet" href="install.css" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="dottedline">
  <tr> 
    <td align="center" class="contentbackgr"><span class="installheader">Welcome 
      to Mambo Open Source installation</span></td>
  </tr>
</table>
<br />
 
<form action="install2.php" method="post" name="form" id="form">
  <table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="10" height="10"><img src="../images/M_images/top_left_corner.png" width="10" height="10" /></td>
      <td background="../images/M_images/top_line.png"></td>
      <td width="10" height="10"><img src="../images/M_images/top_right_corner.png" width="10" height="10" /></td>
    </tr>
    <tr> 
      <td background="../images/M_images/left_line.png"></td>
      <td> 
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="4">
          <tr>
            <td colspan="3" class="heading">Step 1 - MySQL database configuration</td>
          </tr>
          <tr>
            <td colspan="4"> <p>Setting up Mambo Open Source to run on your server is
          involves 4 simple steps...</p>
              <p>Please enter the hostname of the server Mambo Open Source is to be
          installed on, this is usually 'localhost'.<br />
          <br />
          Enter the MySQL username and password and the database name you wish
          to use with Mambo Open Source. <br />
          <br />
        </p></td>
          </tr>
          <tr>
            <td>Host Name</td>
            <td align="left"><input class="inputbox" type="text" name="DBhostname" value="<?php echo "$DBhostname"; ?>" /></td>
            <td align="left" class="warning" colspan="2">(this is usually 'localhost')</td>
          </tr>
          <tr>
            <td>MySQL User Name</td>
            <td align="left"><input class="inputbox" type="text" name="DBuserName" value="<?php echo "$DBuserName"; ?>" /></td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td>MySQL Password</td>
            <td align="left"><input class="inputbox" type="text" name="DBpassword" value="<?php echo "$DBpassword"; ?>" /></td>
            <td align="left" class="warning" colspan="2">(a password <strong>MUST</strong> be provided)</td>
          </tr>
          <tr>
            <td>MySQL Database Name</td>
            <td align="left"><input class="inputbox" type="text" name="DBname" value="<?php echo "$DBname"; ?>" /></td>
          </tr>
          <tr>
            <td>Drop Existing Tables?</td>
            <?php if ($DBDel==1) { ?>
            <td align="left"><input type="checkbox" name="DBDel" value="1" checked="checked" /></td>
            <?php }else{ ?>
            <td align="left"><input type="checkbox" name="DBDel" value="1" /></td>
            <?php } ?>
    </tr>
          <tr>
            <td>Backup Tables?</td>
            <?php if ($DBBackup==1) { ?>
            <td align="left"><input type="checkbox" name="DBBackup" value="1" checked="checked" /></td>
            <?php }else{ ?>
            <td align="left"><input type="checkbox" name="DBBackup" value="1" /></td>
            <?php } ?>
	        <td>(existing backup tables will be dropped)</td>
    </tr>
          <tr>
            <td>Install Help Data?</td>
            <?php if ($DBDel==1) { ?>
            <td align="left"><input type="checkbox" name="DBHelp" value="1" checked="checked" /></td>
            <?php }else{ ?>
            <td align="left"><input type="checkbox" name="DBHelp" value="1" /></td>
            <?php } ?>
    </tr>
          <tr>
            <td>Install Sample Data?</td>
            <?php if ($DBDel==1) { ?>
            <td align="left"><input type="checkbox" name="DBSample" value="1" checked="checked" /></td>
            <?php }else{ ?>
            <td align="left"><input type="checkbox" name="DBSample" value="1" /></td>
            <?php } ?>
    </tr>
          <tr>
            <td colspan="4" align="right"><br /> <input class="button" type="submit" name="next" value="Next" /></td>
          </tr>
  </table></td>
      <td background="../images/M_images/right_line.png"></td>
    </tr>
    <tr> 
      <td width="10" height="10" background="../images/M_images/bottom_left_corner.png"></td>
      <td background="../images/M_images/bottom_line.png"></td>
      <td width="10" height="10" background="../images/M_images/bottom_right_corner.png"></td>
    </tr>
  </table>
</form>
</body>
</html>
