Skip to content

Commit

Permalink
Merge pull request #2 from spokanemac/patch-1
Browse files Browse the repository at this point in the history
Update index.php
  • Loading branch information
YesThatAllen committed Aug 1, 2014
2 parents 06fd47e + b9bf047 commit 832add5
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions sample-agreement-php/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
$mycompanystate = 'LA';
$mycompanyzip = '70809';
$mycompanyphone = '+1-408-352-6145';
$mycompanyfax = '+1-408-352-6145';
$mycompanyemail = "[email protected]";
$mycompanyemailsubject = "Website Agreement Form";



// Be sure to update lines 107-108 for the email delivery address
// TODO move email/subject to variables
Expand All @@ -19,7 +24,7 @@

$item1name = 'Monitored Computers';
$item1price = 10;
$item1description = 'Active monitoring for impending failure for each computer with <?php echo $mycustombranding; ?>.';
$item1description = 'Active monitoring for impending failure for each computer with ' . $mycustombranding . '.';

$item2name = 'Family Pack';
$item2price = 15;
Expand All @@ -39,7 +44,7 @@

$item6name = 'Personal Support Users';
$item6price = 25;
$item6description = "The total number of people who will be contacting <?php echo $mycompanyname; ?> for technical support.";
$item6description = "The total number of people who will be contacting " . $mycompanyname . " for technical support.";

$item7name = 'Premier Support Users';
$item7price = 70;
Expand Down Expand Up @@ -106,8 +111,6 @@

?>
<?php
$to = "[email protected]";
$subject = "Website Agreement Form";
$company = $_POST["company"];
$name = $_POST["firstname"] . " " . $_POST["lastname"];
$email = $_POST["email"];
Expand Down Expand Up @@ -138,22 +141,22 @@
Phone: $phone
--Agreement Information--
<?php echo $item1name; ?>: $qty_item_1
<?php echo $item2name; ?>: $qty_item_2
<?php echo $item3name; ?>: $qty_item_3
<?php echo $item4name; ?>: $qty_item_4
<?php echo $item5name; ?>: $qty_item_5
<?php echo $item6name; ?>: $qty_item_6
<?php echo $item7name; ?>: $qty_item_7
<?php echo $item8name; ?>: $qty_item_8
$item1name: $qty_item_1
$item2name: $qty_item_2
$item3name: $qty_item_3
$item4name: $qty_item_4
$item5name: $qty_item_5
$item6name: $qty_item_6
$item7name: $qty_item_7
$item8name: $qty_item_8
Amount to be billed: $agreementAmount
Billing interval: $agreementText
";
$from = $_POST["email"];
$headers = "From:" . $from;


mail($to,$subject,$message,$headers);
mail($mycompanyemail,$mycompanyemailsubject,$message,$headers);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
Expand Down Expand Up @@ -282,33 +285,37 @@
<legend>Monthly Agreement Quantities</legend>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><label class="form-label" for="qty_item_2">Personal Support</label></td>
<td><label class="form-label" for="qty_item_1"><?php echo $item1name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_1"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_1">Monitored Computers</label></td>
<td><label class="form-label" for="qty_item_2"><?php echo $item2name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_2"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_3">Monitored Servers</label></td>
<td><label class="form-label" for="qty_item_3"><?php echo $item3name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_3"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_4">Managed Clients</label></td>
<td><label class="form-label" for="qty_item_4"><?php echo $item4name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_4"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_5">Windows Servers</label></td>
<td><label class="form-label" for="qty_item_5"><?php echo $item5name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_5"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_6">Prepaid Hours</label></td>
<td><label class="form-label" for="qty_item_6"><?php echo $item6name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_6"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_7">Premier Support</label></td>
<td><label class="form-label" for="qty_item_7"><?php echo $item7name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_7"]; ?></td>
</tr>
<tr>
<td><label class="form-label" for="qty_item_8"><?php echo $item8name; ?></label></td>
<td style="text-align: right;" align="right"><?php echo $_POST["qty_item_8"]; ?></td>
</tr>
<tr>

<td><label class="form-label"><?php echo $agreementText; ?></label></td>
Expand Down

0 comments on commit 832add5

Please sign in to comment.