Skip to content

Instantly share code, notes, and snippets.

@jhoughtelin
Created May 24, 2023 14:12
Show Gist options
  • Select an option

  • Save jhoughtelin/1d48a8f5d9abb72f67fb88a8b2b06cc9 to your computer and use it in GitHub Desktop.

Select an option

Save jhoughtelin/1d48a8f5d9abb72f67fb88a8b2b06cc9 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Email Standard</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<?php if (!empty($_POST)): ?>
<div class="code">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td><img src="http://alldigitalrewards.com/resources/images/logo.png" width="100"/></td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray"><strong><span class="name"><?=!empty($_POST['name']) ? $_POST['name'] : '[name]';?></span></strong> | <span class="position"><?=!empty($_POST['position']) ? $_POST['position'] : '[position]';?></span>
</td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray">
<span class="address"><?=!empty($_POST['address']) ? $_POST['address'] : 'Scottsdale Financial Center III, 7272 E. Indian School Rd., Suite 540, Scottsdale, AZ 85251';?></span><br/>
P: <span class="phone"><?=!empty($_POST['phone']) ? $_POST['phone'] : '+1 866-415-7703';?></span> | <span class="email"><?=!empty($_POST['email']) ? $_POST['email'] : '[email]';?></span> | alldigitalrewards.com
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray">Connect with us:</td>
</tr>
<tr>
<td>
<a style="text-decoration:none;" target="_BLANK" rel="facebook"
href="<?=!empty($_POST['facebook']) ? $_POST['facebook'] : 'https://www.facebook.com/pages/All-Digital-Rewards/396100027217995';?>">
<img src="http://alldigitalrewards.com/resources/images/fb-icon.png" width="14" height="14"/>
</a>
<a style="text-decoration:none;" target="_BLANK" rel="twitter"
href="<?=!empty($_POST['twitter']) ? $_POST['twitter'] : 'https://twitter.com/loyaltyinsights';?>">
<img src="http://alldigitalrewards.com/resources/images/twitter-icon.png" width="14" height="14"/>
</a>
<a style="text-decoration:none;" target="_BLANK" rel="linkedin"
href="<?=!empty($_POST['linkedin']) ? $_POST['linkedin'] : 'https://www.linkedin.com/company/1909031?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1436380480513%2Ctas%3Aall%20digital%20rewards';?>">
<img src="http://alldigitalrewards.com/resources/images/ln-icon.png" width="14" height="14"/>
</a>
</td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray"><br/> Visit All Digital Rewards' new website, <a href="http://alldigitalrewards.com"
target="_BLANK">alldigitalrewards.com</a>,
top resource on marketing products and services.
</td>
</tr>
<!-- <tr>
<td style="font-size:0.80em;color:darkslategrayfont-weight:bold;"><strong><a href="http://alldigitalrewards.com/corporate-profile.pdf">Download our 2015 Corporate Profile here!</a></strong></td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray">If you do not want to receive future notices about direct response
marketing/promotion opportunities from me,<br/> please reply to this message with the word REMOVE in the
subject line. I apologize for any inconvenience.
</td>
</tr>
-->
<tr>
<td style="font-size:0.80em;color:dimgray">
The information transmitted in this message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged <br/>
material. Any review, transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities. If you received this in error, please contact the sender and delete the material from the appropriate devices.
</td>
</tr>
</table>
</div>
<?php else: ?>
<style>
input[type=text] {
font-size: 18px;
width: 800px;
}
button {
font-size: 30px;
}
</style>
<form method="post">
<input type="text" class="text-gap" name="name" placeholder="Name"/><br/>
<input type="text" class="text-gap" name="position" placeholder="Position"/><br/>
<input type="text" class="text-gap" name="email" placeholder="Email"/><br/>
<input type="text" class="text-gap" name="address" placeholder="Address" value="Scottsdale Financial Center III, 7272 E. Indian School Rd., Suite 540, Scottsdale, AZ 85251"/><br/>
<input type="text" class="text-gap" name="phone" placeholder="Phone" value="+1 866-415-7703"/><br/>
<p>Social media links: Be sure to include http:// in the URL</p>
<input type="text" class="social-media" name="facebook" placeholder="Facebook"/><br/>
<input type="text" class="social-media" name="linkedin" placeholder="Linkedin"/><br/>
<input type="text" class="social-media" name="twitter" placeholder="Twitter"/><br/>
<button class="generate">Generate Signature</button>
<button class="ggenerate">Generate Gmail</button>
</form>
<hr/>
<div class="code">
<table border="0" cellpadding="0" cellspacing="5">
<tr>
<td><img src="https://alldigitalrewards.com/resources/images/logo.png" width="100"/></td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray"><strong><span class="name">[name]</span></strong> | <span class="position">[position]</span>
</td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray">
<span class="address">Scottsdale Financial Center III, 7272 E. Indian School Rd., Suite 540, Scottsdale, AZ 85251</span> <br/>
P: <span class="phone">+1 866-415-7703</span> | <span class="email">[email]</span> | alldigitalrewards.com
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray">Connect with us:</td>
</tr>
<tr>
<td>
<a style="text-decoration:none;" target="_BLANK" rel="facebook" href="https://www.facebook.com/pages/All-Digital-Rewards/396100027217995"><img src="https://alldigitalrewards.com/resources/images/fb-icon.png" width="14" height="14"/></a>
<a style="text-decoration:none;" target="_BLANK" rel="twitter" href="https://twitter.com/loyaltyinsights"><img src="https://alldigitalrewards.com/resources/images/twitter-icon.png" width="14" height="14"/></a>
<a style="text-decoration:none;" target="_BLANK" rel="linkedin" href="https://www.linkedin.com/company/1909031?trk=tyah&trkInfo=clickedVertical%3Acompany%2Cidx%3A1-1-1%2CtarId%3A1436380480513%2Ctas%3Aall%20digital%20rewards"><img src="https://alldigitalrewards.com/resources/images/ln-icon.png" width="14" height="14"/></a>
</td>
</tr>
<tr>
<td style="font-size:0.80em;color:darkslategray"><br/> Visit All Digital Rewards' new website, 
<a href="https://alldigitalrewards.com" target="_BLANK">alldigitalrewards.com</a>,
top resource on marketing products and services.
</td>
</tr>
<!--<tr>
<td style="font-size:0.80em;color:darkslategrayfont-weight:bold;"><strong><a href="https://alldigitalrewards.com/corporate-profile.pdf">Download our 2015 Corporate Profile here!</a></strong></td>
</tr>-->
<!--
<tr>
<td style="font-size:0.80em;color:darkslategray">If you do not want to receive future notices about direct response
marketing/promotion opportunities from me,<br/> please reply to this message with the word REMOVE in the
subject line. I apologize for any inconvenience.
</td>
</tr>
-->
<tr>
<td style="font-size:0.80em;color:dimgray">
The information transmitted in this message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.<br/>
Any review, transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities. If you received this in error,<br/>
please contact the sender and delete the material from the appropriate devices.
</td>
</tr>
</table>
</div>
<hr/>
<textarea cols="100" rows="10" class="result"></textarea>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('.generate').click(function (e) {
e.preventDefault();
$('.result').html($('.code').html());
});
$('body').on('change, keyup', '.text-gap', function () {
var that = $(this);
if (that.val() == '') return;
var field = that.attr('name');
$('.' + field).html(that.val());
});
$('body').on('change, keyup', '.social-media', function () {
var that = $(this);
if (that.val() == '') return;
var field = that.attr('name');
$('a[rel='+field+']').attr('href',that.val());
});
// This is more like it!
});
</script>
</body>
</html>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment