<?php
/****************************************************************************
This script was developed by Indigo Scripts
Title: Indigo eHostWorx
Version: 2
Homepage: www.indigoscripts.com
Copyright 2005 Indigo Scripts and its owners.
All rights reserved.

THIS COPYRIGHT INFORMATION MUST REMAIN INTACT AND MAY NOT BE MODIFIED IN ANY WAY

When you purchased this script you agreed to accept the terms
of this Agreement. This Agreement is a legal contract, which
specifies the terms of the license and warranty limitation between
you and 'Indigo Scripts'. You should carefully read the following
terms and conditions before installing or using this software.
Unless you have a different license agreement obtained from
'Indigo Scripts', installation or use of this 
software indicates your acceptance of the license and warranty
limitation terms contained in this Agreement.
If you do not agree to the terms of this Agreement, promptly delete
and destroy all copies of the Software.

Versions of the Software
Only one licenced copy of this software may be used on one web site.
		
License to Redistribute
Distributing the software and/or documentation with other products
(commercial or otherwise) by any means without prior written 
permission from 'Indigo Scripts' is forbidden.
All rights to the software and documentation not expressly
granted under this Agreement are reserved to 'Indigo Scripts'.
	
Disclaimer of Warranty
THIS SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE PROVIDED "AS IS" 
AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY 
OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.   BECAUSE OF THE 
VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS SOFTWARE 
MAY BE USED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS 
OFFERED.  THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS 
PROGRAM.  ANY LIABILITY OF 'INDIGO SCRIPTS' WILL BE LIMITED 
EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.
IN NO CASE SHALL 'INDIGO SCRIPTS' OR IT'S OWNERS BE LIABLE FOR 
ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS, INCLUDING, 
WITHOUT LIMITATION, LOST PROFITS OR THE INABILITY TO USE EQUIPMENT 
OR ACCESS DATA, WHETHER SUCH DAMAGES ARE BASED UPON A BREACH OF 
EXPRESS OR IMPLIED WARRANTIES, BREACH OF CONTRACT, NEGLIGENCE, 
STRICT TORT, OR ANY OTHER LEGAL THEORY. THIS IS TRUE EVEN IF 
'INDIGO SCRIPTS' OR IT'S OWNERS IS ADVISED OF THE POSSIBILITY OF SUCH 
DAMAGES. IN NO CASE WILL 'INDIGO SCRIPTS' OR IT'S OWNERS LIABILITY EXCEED 
THE AMOUNT OF THE LICENSE FEE ACTUALLY PAID BY LICENSEE TO 'INDIGO SCRIPTS' 
OR OWNERS.

Warning: This program is protected by copyright law and is registered with 
the United States Copyright Office. Unauthorized reproduction or distribution 
of this program, or any portion of it, may result in severe civil and criminal 
penalties, and will be prosecuted to the maximum extent possible under the law.

For more information about this script or other scripts please visit
http://www.indigoscripts.com

Thank you for purchasing our script.
If you have any suggestions or ideas please direct them to info@indigoscripts.com
****************************************************************************/

####################################
session_start();
include $_SERVER['DOCUMENT_ROOT'].'/hostworx/includes/config.php';
include $_SERVER['DOCUMENT_ROOT'].'/hostworx/includes/default.css';
include $_SERVER['DOCUMENT_ROOT'].'/hostworx/admin/auth.php';
####################################

?>
<html>
<head>
<title>Paypal Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#666666" vlink="#666666" alink="#666666"> 
<?PHP
$SQL = "SELECT * from SETTINGS";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) 
{
$id = $row["ID"];
$s_signup = $row["S_SIGNUP"];
$s_cancel = $row["S_CANCEL"];
$s_modify = $row["S_MODIFY"];
$s_failure = $row["S_FAILURE"];
$s_payment = $row["S_PAYMENT"];
$s_eot = $row["S_EOT"];
}

?> 
<form name="form1" method="post" action="function.php?which=SETTINGS&edit=tru&id=<?php echo $id; ?>&t1=S_SIGNUP&t2=S_CANCEL&t3=S_MODIFY&t4=S_FAILURE&t5=S_PAYMENT&t6=S_EOT&return=emailconfig"> 
  <br> 
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#F9F9F9" width="90%" align="center"> 
    <tr bgcolor="#CCCCCC" valign="middle"> 
      <td valign="middle" width="50%" bgcolor="#F9F9F9"> <table width="50%" border="0" cellspacing="0" cellpadding="0"> 
          <tr> 
            <td bgcolor="#eeeeee" nowrap><font color="#000000"><b>Email Editor</b> [ <a href="#instructions"><i>Instructions</i></a> ] </font></td> 
          </tr> 
        </table></td> 
    </tr> 
  </table> 
  <table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC" bordercolor="#F9F9F9" width="90%" align="center"> 
    <tr bgcolor="#FFFFFF" valign="middle"> 
      <td valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
          <tr valign="top"> 
            <td bgcolor="#eeeeee" width="5%"><font color="#333333"></font> </td> 
            <td width="85%"> <table border="0" cellspacing="2" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#F9F9F9" width="95%" align="center"> 
                <tr valign="middle" bgcolor="#F9F9F9"> 
                  <td> <div align="left"><font color="#333333"><a href="#"><img src="question.jpg" width="15" height="15" onMouseUp="MM_popupMsg('When your visitor initially signs up for one of your hosting packages, they will receive this email message.')" border="0"></a></font><font color="#666666"></font></div></td> 
                  <td width="35%"> <div align="left"><font color="#666666"><b>Subscriber Sign Up</b></font></div></td> 
                  <td width="65%" bgcolor="#F9F9F9"> <textarea name="1" cols="60" rows="10"><?php if (empty($s_signup)){
echo '$message

Your account details are below :

Domain : <b>$domain</b>

Username : <b>$un</b>

Password : <b>$pw</b>

Package : <b>$name</b>

You may log into our client control panel at any time to view your account details

<a href=\"$url$members\">Client Area</a>

Thankyou

-Management';} else {echo $s_signup; }
?>
</textarea> </td> 
                </tr> 
                <tr bgcolor="#F9F9F9" valign="middle"> 
                  <td> <div align="left"><font color="#333333"><a href="#"><img src="question.jpg" width="15" height="15" onMouseUp="MM_popupMsg('If your client cancels his/her subscription, they will receive this email message.')" border="0"></a></font><font color="#666666"></font></div></td> 
                  <td width="35%"> <div align="left"> <b><font color="#666666"><b>Subscriber Cancellation</b></font></b></div></td> 
                  <td width="65%"><b> 
                    <textarea name="2" cols="60" rows="10"><?php if (empty($s_cancel)){
echo 'You have cancelled your subscription to $name. You will still be able to access your account until the end of your subscription term. Please recover any files & backup any databases that you do not wish to lose.

Thankyou

-Management';} else {echo $s_cancel; }
?>
</textarea> 
                    </b></td> 
                </tr> 
                <tr bgcolor="#F9F9F9" valign="middle"> 
                  <td><font color="#333333"><a href="#"><img src="question.jpg" width="15" height="15" onMouseUp="MM_popupMsg('If a clients subscription payment fails, due to insufficient funds, they will receive this email message.')" border="0"></a></font><font color="#666666"></font></td> 
                  <td width="35%"><font color="#666666"><b>Subscription Payment Failure</b></font> </td> 
                  <td width="65%"><font color="#333333"> 
                    <textarea name="4" cols="60" rows="10"><?php if (empty($s_failure)){
echo 'Your web hosting subscription to $name has failed, billing will be reattempted 3 days after failure date, and then again 5 days later, a third failure will lead to automatic cancellation of your subscription.

Thankyou
<br>
-Management ';} else {echo $s_failure; }
?>

</textarea> 
                    </font></td> 
                </tr> 
                <tr bgcolor="#F9F9F9" valign="middle"> 
                  <td><font color="#333333"><a href="#"><img src="question.jpg" width="15" height="15" onMouseUp="MM_popupMsg('On each successful subscription payment, your client will receive this email message. A successful payment will occur monthly, quarterly, semiannually (etc) depending which plan your customer chose.')" border="0"></a></font><font color="#666666"></font></td> 
                  <td width="35%"><font color="#666666"><b>Subscription Payment</b></font></td> 
                  <td width="65%"> <textarea name="5" cols="60" rows="10"><?php if (empty($s_payment)){
echo 'Your payment to $name has been successful!

You may log into our client control panel at any time to view your account details

<a href=\"$url$members\">Client Area</a>

Thankyou

-Management';} else {echo $s_payment; }
?>

</textarea> </td> 
                </tr> 
                <tr bgcolor="#F9F9F9" valign="middle"> 
                  <td><font color="#333333"><a href="#"><img src="question.jpg" width="15" height="15" onMouseUp="MM_popupMsg('An account will reach \&quot;End of Term\&quot; if a client cancels his/her subscription (at the end of the last billing cycle) or if his/her payment fails due to insufficient funds.\r\rYour client will receive this final email message at that point.')" border="0"></a></font><font color="#666666"></font></td> 
                  <td width="35%"><font color="#666666"><b>Subscription End of Term</b></font></td> 
                  <td width="65%"> <textarea name="6" cols="60" rows="10"><?php if (empty($s_eot)){
echo 'You subscription to $name has ended, thankyou for hosting with us.

-Management';} else {echo $s_eot; }
?>

</textarea> </td> 
                </tr> 
              </table></td> 
            <td width="10%" bgcolor="#F9F9F9" valign="bottom"> <div align="center"> 
                <input type="submit" name="Apply" value="Apply"> 
              </div></td> 
          </tr> 
        </table></td> 
    </tr> 
  </table> 
  <br> 
  <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#F9F9F9" width="90%" align="center"> 
    <tr bgcolor="#CCCCCC" valign="middle"> 
      <td valign="middle" width="50%" bgcolor="#F9F9F9"> <table width="50%" border="0" cellspacing="0" cellpadding="0"> 
          <tr> 
            <td bgcolor="#eeeeee" nowrap><a name="instructions"></a><b>Email Overview</b></td> 
          </tr> 
        </table></td> 
    </tr> 
  </table> 
  <table border="0" cellspacing="1" cellpadding="5" bgcolor="#CCCCCC" bordercolor="#F9F9F9" width="90%" align="center"> 
    <tr bgcolor="#FFFFFF" valign="middle"> 
      <td valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
          <tr valign="top"> 
            <td bgcolor="#eeeeee" width="5%">&nbsp; </td> 
            <td width="85%"> <table border="0" cellspacing="2" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#F9F9F9" width="95%" align="center"> 
                <tr valign="middle" bgcolor="#F9F9F9"> 
                  <td width="20%"> <div align="left"><font color="#333333">You may customize the email messages that get sent to your client, on signup, cancellation, end of term...<br> 
                      <br> 
                      <i>You <b>MUST</b> click 'Apply' at lease once, to insert our default values.<br> 
                      <b> </b></i> <br> 
                      Here are the variables used in eHostWorx WHM messages :<br> 
                      <br> 
&raquo; $message - the message assigned to the hosting package in <a href="hostingpackages.php" target="main">Hosting Packages</a> setup.<br> 
&raquo; $un - your customers username<br> 
&raquo; $pw - your customers password<br> 
&raquo; $domain - your customers domain name<br> 
&raquo; $name - your customers hosting package<br> 
&raquo; $url - http://www.yourdomain.com/Auto-Host/<br> 
&raquo; $members - /whm/ members directory</font> </div></td> 
                </tr> 
              </table></td> 
            <td width="10%" bgcolor="#F9F9F9" valign="bottom">&nbsp; </td> 
          </tr> 
        </table></td> 
    </tr> 
  </table> 
</form> 
</body>
</html>
