New Paste

 

Recent Pastes

Administrate




PageLines PasteBin.

PasteID: 9b
Pasted by Danny, 2012-04-04 10:54:56 GMT
Expires Never
Paste size 4.08 Kb
Toggle Expand   Wrap   Raw
Copy Contents   Copy URL
 
  1. add_action('pagelines_before_branding_icons', 'a_man');
  2. 	function a_man(){?>
  3.  
  4. 	<div style="float:right;">
  5. 		<img class="alignleft size-full wp-image-68" title="Report-cover-1" src="http://www.americasguy.com/wp-content/uploads/2012/04/Report-cover-1.png" alt="" width="120" height="154"><strong></strong>
  6.  
  7. 			<strong>Claim Your Free Report- </strong>
  8. 			<em>Avoiding Home Repair Hell:<br>
  9. 			</em><em>What You Should Ask To Make Sure
  10. 			</em><em>You Find A True Home Repair Hero<br>
  11. 			</em><script type="text/javascript">
  12. 				jQuery(document).ready(function($){
  13. 					function blankFieldCheck()
  14. 						{
  15. 							err	= 0;
  16. 							msg	= '';
  17.  
  18. 				if($('#31d5a31b1e-email').val() == '')
  19. 						{
  20. 							msg += '* Email Address'+"\n";
  21. 							err++;
  22. 						}
  23. 							if(msg != '')
  24. 						{
  25. 							msg	= 'Please fix the following fields before submitting the form:'+"\n\n"+msg;
  26. 							alert(msg);
  27. 						}
  28. 							return (err > 0 ? false : true);
  29. 						}
  30. 							$('#yks-mailchimp-form_31d5a31b1e').submit(function(e){
  31. 							e.preventDefault();
  32. 					// Make sure the api key exists
  33. 							if(blankFieldCheck())
  34. 						{
  35. 				$('#ykfmc-submit_31d5a31b1e').attr('disabled', 'disabled');
  36. 				$('#yks-status-31d5a31b1e').slideUp('fast');
  37. 				$.ajax({
  38. 					type:	'POST',
  39. 					url:	'http://www.americasguy.com/wp-admin/admin-ajax.php',
  40. 					data: {
  41. 								action:					'yks_mailchimp_form',
  42. 								form_action:		'frontend_submit_form',
  43. 								form_data:			$(this).serialize()
  44. 								},
  45. 					dataType: 'json',
  46. 					success: function(MAILCHIMP)
  47. 						{
  48. 						if(MAILCHIMP == '1')
  49. 							{
  50. 							$('#yks-status-31d5a31b1e').html('<div class="yks-success"><p>Thank You for subscribing! Check your email for the confirmation message.</p></div>');
  51. 							$('#yks-mailchimpFormContainerInner_31d5a31b1e').slideUp('fast', function(){
  52. 								$('#yks-status-31d5a31b1e').slideDown('fast');
  53. 							});
  54. 							}
  55. 						else
  56. 							{
  57. 							$('#ykfmc-submit_31d5a31b1e').removeAttr('disabled');
  58. 							$('#yks-status-31d5a31b1e').html('<div class="yks-error"><p>There was an error submiting the form -- please try again!</p></div>');
  59. 							$('#yks-status-31d5a31b1e').slideDown('fast');
  60. 							}
  61. 						}
  62. 				});
  63. 				}
  64. 			return false;
  65. 		});
  66. 		$('.yks-field-type-date').datepicker({
  67. 			changeMonth:	true,
  68. 			changeYear:		true,
  69. 			yearRange:		((new Date).getFullYear()-100)+':'+((new Date).getFullYear()),
  70. 			altFormat:		'yy-mm-dd'
  71. 		});
  72. 		$('#ui-datepicker-div').addClass('yks-mailchimpFormDatepickerContainer');
  73. 	});
  74. </script>
  75.  
  76. <div class="yks-mailchimpFormContainer">
  77. 	<div class="yks-status" id="yks-status-31d5a31b1e"></div>
  78.  
  79. 	<div class="yks-mailchimpFormContainerInner" id="yks-mailchimpFormContainerInner_31d5a31b1e">
  80. 		<form method="post" name="yks-mailchimp-form" id="yks-mailchimp-form_31d5a31b1e" rel="31d5a31b1e">
  81. 			<input type="hidden" name="yks-mailchimp-list-id" id="yks-mailchimp-list-id_31d5a31b1e" value="31d5a31b1e">
  82. 						<div class="yks-mailchimpFormDiv">
  83. 									<div class="yks-mailchimpFormDivRow">
  84. 						<label class="prompt yks-mailchimpFormDivRowLabel" for="31d5a31b1e-EMAIL">Email Address</label>
  85. 						<div class="prompt yks-mailchimpFormDivRowField">
  86. 							<input type="text" name="31d5a31b1e-EMAIL" class="31d5a31b1e-EMAIL yks-require" id="31d5a31b1e-email" value="">						</div>
  87. 					</div>
  88. 									<div class="yks-mailchimpFormDivRow">
  89. 						<label class="prompt yks-mailchimpFormDivRowLabel" for="31d5a31b1e-FNAME">First Name</label>
  90. 						<div class="prompt yks-mailchimpFormDivRowField">
  91. 							<input type="text" name="31d5a31b1e-FNAME" class="31d5a31b1e-FNAME" id="31d5a31b1e-fname" value="">						</div>
  92. 					</div>
  93. 								<div class="yks-mailchimpFormDivRow">
  94. 					<div class="yks-mailchimpFormDivSubmit">
  95. 						<p><input type="submit" class="ykfmc-submit" id="ykfmc-submit_31d5a31b1e" value="Submit"></p>
  96. 					</div>
  97. 				</div>
  98. 			</div>
  99. 					</form>
  100. 	</div>
  101.  
  102. </div>
  103. </div>
  104.  
  105. <?php }
  106.  
 
 
 

 
 
 
 
 
Written by Xan Manning, 2010.
YOU NEED FLASH!