<?php 
$domain = $_SERVER['HTTP_HOST'];
$domain = explode('.', $domain);
$domain = array_reverse($domain);
$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url = str_replace("install/","",$url);
$url = substr($url,0,-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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Installation - Spotway Ads Solutions</title>
<link rel="shortcut icon" href="http://getspotway.com/app-images/favicon.png" />
<link href="../app_needed/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="wrapper">
 <div class="mainContent">
	<div class="login">
    <form  name="my-form" action="ajax.install.php" method="POST" enctype="multipart/form-data">
    <input type="hidden" name="install" value="1" />
    <div class="center"><img src="../app_images/spotway.png"  width="300" /><hr /></div>
    <div class="center">
      <h1>Ad Server Installation</h1></div>
      <table width="100%" border="0">
        <tr>
          <td></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>Install Directory</strong></td>
        </tr>
        <tr>
          <td><input name="server_domain" type="text"  value="http://<?= $url ?>"/></td>
        </tr>
        <tr>
          <td>By validating this server domain you will can move this ad server on all subdomains and folders of <strong>
            <?= $domain[1].".".$domain[0] ?>
          </strong></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>MySql Host</strong></td>
        </tr>
        <tr>
          <td><input name="mysql_host" type="text" /></td>
        </tr>
        <tr>
          <td><strong>MySql Username</strong></td>
        </tr>
        <tr>
          <td><input name="mysql_username" type="text" /></td>
        </tr>
        <tr>
          <td><strong>MySql Password</strong></td>
        </tr>
        <tr>
          <td><input name="mysql_password" type="text" /></td>
        </tr>
        <tr>
          <td><strong>MySql Database</strong></td>
        </tr>
        <tr>
          <td><input name="database_name" type="text" /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><strong>First Name</strong></td>
        </tr>
        <tr>
          <td><input name="first_name" type="text"/></td>
        </tr>
        <tr>
          <td><strong>Last Name</strong></td>
        </tr>
        <tr>
          <td><input name="last_name" type="text"/></td>
        </tr>
        <tr>
          <td><strong>Email</strong></td>
        </tr>
        <tr>
          <td><input name="email" type="text"  /></td>
        </tr>
        <tr>
          <td><strong>Password</strong></td>
        </tr>
        <tr>
          <td><input name="password" type="password" /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td id="response" style="text-align:center; padding:5px 0 5px 0;">&nbsp;</td>
        </tr>
        <tr>
          <td><input type="submit"  value="Install" style="width:100%" /></td>
        </tr>
      </table>
      <hr />
      <div class="center">
      <p>For any issues please contact <br />
        <a href="http://getspotway.com/contact.html">SpotWay</a></p>
     
      </div>
      </form>
    </div>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
<script type="text/javascript" src="function.ajax.js"></script>
</body>
</html>