<?php
/*
 ########################################################################
#                                                                        #
#           Version 4       /                        /   /               #
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2006 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
 ########################################################################
*/

if($_POST['installtype']=="full" AND $_POST['hp_url']) {
?>
<script>
wmtt = null;

document.onmousemove = updateWMTT;

function updateWMTT(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block"
}

function hideWMTT() {
	wmtt.style.display = "none";
}

</script>

<style type="text/css">
.tooltip {
	position: absolute;
	display: none;
	background-color: #FFFFFF;
}
</style>

<div class="tooltip" id="1" style="width: 200px;">This is the server adress of your MySQL-Database. <br>This is usually localhost.</div>
<div class="tooltip" id="2" style="width: 200px;">Either something as root or <br>a username given by the hoster.</div>
<div class="tooltip" id="3" style="width: 200px;">For site security using a password for <br>the mysql account in mandatory.</div>
<div class="tooltip" id="4" style="width: 200px;">Some hosts allow only a certain DB name per site. <br>Use table prefix in this case.</div>
<div class="tooltip" id="5" style="width: 200px;">Use to prevent tabledata collisions. <br>Standard is webs_ </div>
<div class="tooltip" id="6" style="width: 200px;">This will be your loginname</div>
<div class="tooltip" id="7" style="width: 200px;">Protect your admin account by a password</div>
<div class="tooltip" id="8" style="width: 200px;">E-mail for contact information</div>
<div class="tooltip" id="9" style="width: 200px;">This is the url of your page e.g. (yourdomain.com/path/webspell/). <br>Do not enter http:// before the path and don't forget to end with a slash</div>
<table border="0" align="center" cellpadding="0" bordercolor="#000000">
          <tr>
            <td colspan="2"><strong>MySQL database configuration:</strong></td>
          </tr>
          <tr>
            <td>Host Name :</td>
            <td><input type="text" name="host" size="30" value="localhost"> <img src="images/question.gif" onmouseover="showWMTT('1')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>MySQL User Name:</td>
            <td><input type="text" name="user" size="30"> <img src="images/question.gif" onmouseover="showWMTT('2')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>MySQL Password:</td>
            <td><input type="password" name="pwd" size="30"> <img src="images/question.gif" onmouseover="showWMTT('3')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>MySQL Database Name:</td>
            <td><input type="text" name="db" size="30"> <img src="images/question.gif" onmouseover="showWMTT('4')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>MySQL Table Prefix</td>
            <td><input name="prefix" type="text" value="webs_" size="10"> <img src="images/question.gif" onmouseover="showWMTT('5')" onmouseout="hideWMTT()" border="0">
                <br>                </td>
          </tr>
          <tr>
            <td colspan="2"><strong>Webspell configuration:</strong></td>
          </tr>
          <tr>
            <td>Admin Name:</td>
            <td><input type="text" name="adminname" size="30"> <img src="images/question.gif" onmouseover="showWMTT('6')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>Admin Password:</td>
            <td><input type="password" name="adminpwd" size="30"> <img src="images/question.gif" onmouseover="showWMTT('7')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
          <tr>
            <td>Admin E-mail:</td>
            <td><input type="text" name="adminmail" size="30"> <img src="images/question.gif" onmouseover="showWMTT('8')" onmouseout="hideWMTT()" border="0"></td>
          </tr>
				</table>
				<input type="hidden" name="url" value="<?php echo $_POST['hp_url']; ?>">
<?php
} else echo 'The next step will finish your installation. Do not forget to create a backup before upgrading!<br>';
?>

<input type="hidden" name="installtype" value="<?php echo $_POST['installtype']; ?>">
<br><a href="javascript:document.ws_install.submit()"><img src="images/continue.gif" width="136" height="28" border="0"></a>