<?php
// $Id: index.php,v 1.18 2003/12/24 10:34:38 rcastley Exp $
/**
* Main installation page
* @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.18 $
**/
if (file_exists( "../configuration.php" )) {
	header( "Location: ../index.php" );
	exit();
}
require_once ("../version.php");
?>
<?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 - Web Installer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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="install1.php" method="post" name="form" id="form">
  <table width="80%" 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 border="0" cellpadding="1" cellspacing="0">
          <tr> 
            <td class="heading" colspan="2">Pre-installation check for <?php echo $version; ?></td>
          </tr>
          <tr> 
            <td class="small"  colspan="2">If any of the items below are highlighted 
              in red then please take actions to correct them. Failure to do so 
              could lead to your Mambo Open Source installation not functioning 
              correctly.</td>
          </tr>
          <tr> 
            <td class="item">PHP version >= 4.1.0</td>
            <td align="left"><?php echo phpversion() < '4.1' ? '<b><font color="red">No</font></b>' : '<b><font color="green">Yes</font></b>';?></td>
          </tr>
          <tr> 
            <td>&nbsp; - zlib compression support</td>
            <td align="left"><?php echo extension_loaded('zlib') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';?></td>
          </tr>
          <tr> 
            <td>&nbsp; - XML support</td>
            <td align="left"><?php echo extension_loaded('xml') ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';?></td>
          </tr>
          <tr> 
            <td>&nbsp; - MySQL support</td>
            <td align="left"><?php echo function_exists( 'mysql_connect' ) ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>';?></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td valign="top" class="item">configuration.php</td>
            <td align="left"><?php echo is_writable( '..' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b><br /><span class="small">You can still continue the install as the configuration will be displayed at the end, just copy & paste this and upload.</span>';?></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="item">Session save path</td>
            <td align="left"><b><?php echo (($sp=ini_get('session.save_path'))?$sp:'Not set'); ?></b>, 
              <?php echo is_writable( $sp ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td colspan="2" class="dottedline">&nbsp;</td>
          </tr>
          <tr> 
            <td class="heading" colspan="2">Directory and File Permissions:</td>
          </tr>
          <tr> 
            <td class="small" colspan="2">In order for Mambo Open Source to function 
              correctly it needs to be able to access or write to certain files 
              or directories. If you see "Unwriteable" you need to change the 
              permissions on the file or directory to allow Mambo Open Source 
              to write to it.</td>
          </tr>
          <tr> 
            <td class="item">administrator/backups/</td>
            <td align="left"><?php echo is_writable( '../administrator/backups' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">administrator/components/</td>
            <td align="left"><?php echo is_writable( '../administrator/components' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">components/</td>
            <td align="left"><?php echo is_writable( '../components' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">images/</td>
            <td align="left"><?php echo is_writable( '../images' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">media/</td>
            <td align="left"><?php echo is_writable( '../media' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">language/</td>
            <td align="left"><?php echo is_writable( '../language' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">modules/</td>
            <td align="left"><?php echo is_writable( '../modules' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">templates/</td>
            <td align="left"><?php echo is_writable( '../templates' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td class="item">uploadfiles/</td>
            <td align="left"><?php echo is_writable( '../uploadfiles' ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?></td>
          </tr>
          <tr> 
            <td colspan="2" class="dottedline">&nbsp;</td>
          </tr>
          <tr> 
            <td class="heading"  colspan="2">Recommended PHP settings (found in 
              php.ini):</td>
          </tr>
          <tr> 
            <td colspan="2">Safe Mode: OFF <br />
              Display Errors: ON <br />
              File Uploads: ON <br />
              Magic Quotes: ON <br />
              Register Globals: OFF <br />
              Output Buffering: OFF <br />
              Session auto start: 0 <br /> <br /> </td>
          </tr>
          <tr> 
            <td colspan="2" align="right"><input class="button" type="submit" name="next" value="Continue" /></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>
