Skip to content

Instantly share code, notes, and snippets.

@joshmoto
Created Jul 19, 2012
Embed
What would you like to do?
Form will not submit with HTTPS / SSL in internet explorer
<?php
define('WP_USE_THEMES', false);
require('/home/sites/ ... /wp/wp-load.php');
require 'config.php';
require 'src/facebook.php';
//Create facebook application instance.
$facebook = new Facebook(array(
'appId' => $fb_app_id,
'secret' => $fb_secret,
'cookie' => true,
));
$signedRequest = $facebook->getSignedRequest();
?>
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta name="robots" content="noindex, nofollow">
<meta charset="utf-8" />
<meta property="fb:app_id" content="<?php echo $fb_app_id ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="shortcut icon" href="<?php bloginfo('url'); ?>/favicon.ico" />
<!-- <link rel="stylesheet" type="text/css" media="all" href="forms.css" /> -->
<link rel="stylesheet" type="text/css" media="screen" href="fancybox/jquery.fancybox.css" />
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="fancybox/jquery.fancybox.pack.js"></script>
<!--[if lt IE 9]>
<style type="text/css">
.panel {
behavior : url('PIE.php');
}
</style>
<![endif]-->
</head>
<body style="overflow: visible !important;">
<div id="wrapper">
<div id="header">
<a href="http://suzuki-gb.co.uk/" target="_blank" title="Suzuki Bikes UK" class="suzuki-logo"><img src="images/x.gif" alt="" /></a>
<div class="share-text">share this via</div>
<div class="share">
<!-- FACEBOOK -->
<div class="fb-like" data-href="<?php echo $fb_tab_url ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
<!-- GOOGLE +1 -->
<div class="g-plusone" data-size="medium" data-href="<?php echo $fb_tab_url ?>"></div>
<!-- TWITTER -->
<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $fb_tab_url ?>" data-via="your_screen_name" data-lang="en">Tweet</a>
</div>
<div id="fan-gate">
<a class="enter" title="Click Here"><img src="images/x.gif" alt=""/></a>
<div class="fb-like" data-href="<?php echo $fb_page_url ?>" data-send="true" data-width="750" data-show-faces="false"></div>
</div>
</div>
<div id="form" class="panel" style="display: none;">
<?php echo do_shortcode('[gravityform id="2" name="Clothing Competition July 2012" title="false" ajax="true"]'); ?>
</div>
<div id="rules" class="panel">
<h1>RULES &amp; PRIZES</h1>
<p>We've launched our new, 2012 clothing range, and to celebrate, we're giving you the chance to kit yourself and your significant other out in the new range. We're giving away a t-shirt, belt, hoodie, polo shirt and baseball cap from the male and female range, and to be in with a chance of winning them, simply answer the question and enter your details in the form. Be sure to select which sizes you want to win!</p>
<p>Click here to view the full clothing range, <a href="http://suzuki-gb.co.uk/accessories/" title="View the full clothing range" target="_blank">http://suzuki-gb.co.uk/accessories/</a></p>
</div>
<div id="terms" class="panel">
<h2>TERMS &amp; CONDITIONS</h2>
<small class="terms"><span>1.</span> Prize draw is open to UK, Channel Islands and Isle of Man residents only, excluding employees and immediate families of Suzuki GB PLC, their Dealerships or their associated companies and agents or anyone associated with the administration of this promotion. <span>2.</span> Entry restricted to over 18s only. <span>3.</span> Competition dates: the competition will start from 1 July 2012 and end on 31 July 2012. <span>4.</span> The prize is non-transferable, non-refundable and cannot be amended once confirmed. No cash alternative is available. <span>5.</span> Entrants will be deemed to have accepted these terms and conditions and agreed to be bound by them when entering this promotion. <span>6.</span> Maximum of 1 entry per person. <span>7.</span> The winner will be announced by 10 August 2012. If no contact from winner in 7 days there will be a redraw <span>8.</span> The winner will be selected at random from eligible entries. <span>9.</span> Suzuki GB does not accept responsibility for network, computer, hardware or software failures of any kind, which may restrict or delay the sending or receipt of your entry. <span>10.</span> A maximum of 1 combined prize will be available to win. <span>11.</span> Winners will be contacted within 2 working days from the last day of the competition. <span>12.</span> The Promoter reserves the right to amend these terms and conditions at any time. <span>13.</span> The winner will be required to provide Suzuki GB with content and images of their prize for use across Suzuki GB’s social media sites, and will be announced across all channels publicly. <span>14.</span> Items cannot be negotiated or swapped for others in the range. <span>15.</span> This Promotion, and any dispute or claim arising out of or in connection with it, shall be governed by and construed in accordance with English law. You irrevocably agree that the courts of England and Wales shall have exclusive jurisdiction to settle any dispute or claim that arises out of or in connection with this Promotion. <span>16.</span> The prize will be presented at an arranged date between Suzuki GB and the winner. <span>17.</span> Promoter: Suzuki GB PLC, Steinbeck Crescent, Snelshall West, Milton Keynes, Bucks MK4 4AE</small>
</div>
<div id="comments" class="panel">
<div class="fb-comments" data-href="<?php echo $fb_app_url ?>" data-num-posts="2" data-width="722"></div>
</div>
</div>
<div id="footer-wrapper">
<div id="footer">
<a href="http://suzuki-gb.co.uk/" target="_blank" title="Suzuki Bikes UK" class="suzuki-logo"><img src="images/x.gif" alt="" /></a>
<a href="http://suzuki-gb.co.uk/accessories" target="_blank" title="Suzuki Bikes UK Accessories" class="footer-link">www.suzuki-gb.co.uk/accessories</a>
<div class="association">
in association with<br />
<a href="http://suzukibulletin.co.uk/" title="Suzuki Bulletin" target="_blank"><img src="images/bulletin-logo.jpg" alt="" /></a>
<a href="http://www.motorcyclenews.com/Ride/" title="Ride Magazine" target="_blank"><img src="images/ride-logo.jpg" alt="" /></a>
</div>
</div>
</div>
<div id="fb-root"></div>
<script type="text/javascript">
// FACEBOOK
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $fb_app_id ?>',
channelUrl : '//www.fbapps.co.uk/channel.html', // Channel File
cookie: true,
xfbml: true,
oauth: true,
status: true // check login status
});
FB.Canvas.setAutoGrow(true);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
$(document).ready(function($) {
$(".enter").click(function () {
$('#form').slideDown();
// FB.Canvas.scrollTo(0,670);
FB.Canvas.scrollTo(0,670);
});
$('#gform_2').attr('action','../../../wp/#gf_2');
$.fn.cleardefault = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
};
$("input").cleardefault();
var $radio = $(".gchoice_1_0, .gchoice_1_1, .gchoice_1_2, .gchoice_1_3");
$radio.click(function() {
$radio.removeClass('current-answer');
$(this).addClass('current-answer').find('input:radio').prop('checked', true);
});
$("input#input_2_5_2").attr({
value: "DD"
});
$("input#input_2_5_1").attr({
value: "MM"
});
$("input#input_2_5_3").attr({
value: "YYYY"
});
$('.terms-button').click(function() {
FB.Canvas.scrollTo(0,1781);
});
$(document).bind('gform_post_render', function(){
$('#form').show();
$('#gform_2').attr('action','../../../wp/#gf_2');
var $radio = $(".gchoice_1_0, .gchoice_1_1, .gchoice_1_2, .gchoice_1_3");
$radio.click(function() {
$radio.removeClass('current-answer');
$(this).addClass('current-answer').find('input:radio').prop('checked', true);
});
FB.Canvas.scrollTo(0,670);
$('.terms-button').click(function() {
FB.Canvas.scrollTo(0,1781);
});
});
});
// TWITTER
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
// GOOGLE
window.___gcfg = {lang: 'en-GB'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment