<?php

include "../inc/sqlinf.php";
include "apple.inc";
include '../inc/auth.php';
?>

<html>
<head>
<title>Settings</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="5" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
  <tr> 
        <td> 
          <?PHP
$SQL = "SELECT * from SETTINGS";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
include 'query.php';}
if (empty($id)) {$x='&edit=';}else{$x='&edit=tru';}
?>
          
          <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#FFFFFF" bordercolor="#FFFFFF">
                <tr bgcolor="#000066"> 
                  <td width="100%" colspan="2"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF">&raquo;<b> 
                        Paths &amp; WHM Settings</b></font></td>
                </tr>
                <tr> 
                  <td bgcolor="#EEEEEE" width="10%"> <br>
                  </td>
                  <td bgcolor="#F9F9F9" width="90%"> 
                        <form name="form1" method="post" action="app/function.php?which=SETTINGS&t1=URL&t2=PATH&return=settings<?php echo $x; ?>&t3=HOST&t4=USER&t5=RAK&t6=WSU&t7=DNR&t8=AUTOTERM">
                          <div align="left"><br>
                                <table border="0" cellspacing="1" cellpadding="4" bgcolor="#CCCCCC" bordercolor="#F9F9F9" align="center">
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"> 
                                          <div align="left"><font color="#666666"><b>HOST</b></font></div>
                                        </td>
                                        <td> 
                                          <div align="left"> 
                                                <input type="text" name="3" value="<?php echo $host; ?>" size="46">
                                          </div>
                                        </td>
                                        <td><font color="#666666">&raquo; localhost</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"> 
                                          <div align="left"><font color="#666666"><b>WHM USERNAME</b></font></div>
                                        </td>
                                        <td> 
                                          <div align="left"> 
                                                <input type="text" name="4" value="<?php echo $user; ?>" size="46">
                                          </div>
                                        </td>
                                        <td><font color="#666666">&raquo; WHM login name</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"> 
                                          <div align="left"><font color="#666666"><b>REMOTE ACCESS 
                                                KEY</b></font></div>
                                        </td>
                                        <td> 
                                          <div align="left"> 
                                                <textarea name="5" cols="45" rows="10"><?php echo $rak; ?></textarea>
                                          </div>
                                        </td>
                                        <td><font color="#666666">&raquo; Found in WHM under &quot;Remote 
                                          Access Key&quot;</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"><font color="#666666"><b>URL TO AUTO-HOST</b></font></td>
                                        <td> 
                                          <input type="text" name="1" value="<?php echo $url; ?>" size="46">
                                        </td>
                                        <td><font color="#666666">&raquo; http://www.yourdomain.com/Auto-Host/</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"><font color="#666666"><b>ROOT PATH TO 
                                          AUTO-HOST</b></font></td>
                                        <td><i> 
                                          <input type="text" name="2" value="<?php echo $path; ?>" size="46">
                                          </i></td>
                                        <td><font color="#666666">&raquo; /home/user/public_html/Auto-Host/</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"><b><font color="#666666">WEBSITE URL</font></b></td>
                                        <td><i> 
                                          <input type="text" name="6" value="<?php echo $wsu; ?>" size="46">
                                          </i></td>
                                        <td><font color="#666666">&raquo; http://www.yourdomain.com</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="middle"><b><font color="#666666">DOMAIN NAME REGISTAR 
                                          URL</font></b></td>
                                        <td><i> 
                                          <input type="text" name="7" value="<?php echo $dnr; ?>" size="46">
                                          </i></td>
                                        <td><font color="#666666">&raquo; http://www.networksolutions.com</font></td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" valign="middle"> 
                                        <td valign="top"> 
                                          <div align="left"><font color="#666666"><font color="#FFFFFF"><b><font color="#666666">AUTOMATICALLY 
                                                DELETE EXPIRED ACCOUNTS?</font></b></font></font></div>
                                        </td>
                                        <td valign="middle"> 
                                          <div align="left">
                                                <table border="0" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC" bordercolor="#F9F9F9">
                                                  <tr valign="middle" bgcolor="#FFFFFF"> 
                                                        <td> 
                                                          <div align="center"><font color="#666666"><b> 
                                                                <input type="radio" name="8" value="YES" <?php if ($autoterm == 'YES'){echo "checked";}else{} ?>>
                                                                </b></font></div>
                                                        </td>
                                                        <td> 
                                                          <div align="center"><font color="#666666"><b> 
                                                                <input type="radio" name="8" value="NO" <?php if ($autoterm == 'NO'){echo "checked";}else{} ?>>
                                                                </b></font></div>
                                                        </td>
                                                  </tr>
                                                  <tr valign="middle" bgcolor="#FFFFFF"> 
                                                        <td> 
                                                          <div align="center"><font color="#666666"><b>Y</b></font></div>
                                                        </td>
                                                        <td> 
                                                          <div align="center"><font color="#666666"><b>N</b></font></div>
                                                        </td>
                                                  </tr>
                                                </table>
                                                
                                          </div>
                                        </td>
                                        <td valign="top"> 
                                          <div align="left"><font color="#666666">&raquo; If set to 
                                                <b>Y</b> Auto-Host 2 will delete any account which has 
                                                reached its subscriptions &quot;End Of Term&quot;</font></div>
                                        </td>
                                  </tr>
                                  <tr bgcolor="#EEEEEE" valign="middle"> 
                                        <td valign="middle" colspan="3"> 
                                          <div align="right"><font color="#666666"> 
                                                <input type="hidden" name="id" value="<?php echo $id; ?>">
                                                <input type="submit" name="Apply" value="Apply">
                                                </font></div>
                                        </td>
                                  </tr>
                                </table>
                                
                          </div>
                        </form>
                  </td>
                </tr>
          </table>
        </td>
  </tr>
</table>
</body>
</html>


