<?php
if(isset($_GET['olay']))
{
$source=$_GET['olay'];
}
else
{
$source="";
}
switch($source)
{
case "newsletter":
$string='onload="$.fn.colorbox({href:\'/welcome-email.php\', open:true, width:600}); "';
break;
case "partner":
$string='onload="$.fn.colorbox({href:\'/welcome-partner.php\', open:true, width:400}); "';
break;
}
?>
<body <?php echo $string; ?>>
[!choose-olay!] <body [!call-url!] >
<body onload="$.fn.colorbox({href:’/welcome-partner.php’, open:true, width:400}); ">I’m not sure what the two different snippet calls in your post are supposed to do, or how they relate to your code.
<?php
if(isset($_GET['olay']))
{
$source=$_GET['olay'];
}
else
{
$source="";
}
switch($source)
{
case "newsletter":
$string='onload="$.fn.colorbox({href:\'/welcome-email.php\', open:true, width:600}); "';
break;
case "partner":
$string='onload="$.fn.colorbox({href:\'/welcome-partner.php\', open:true, width:400}); "';
break;
}
?><?php echo $string; ?>
<?php
if(isset($_GET['olay']))
{
$source=$_GET['olay'];
}
else
{
$source="default";
}
switch($source)
{
case "newsletter":
$string='<body onload="$.fn.colorbox({href:\'/welcome-email.php\', open:true, width:600}); ">';
break;
case "partner":
$string='<body onload="$.fn.colorbox({href:\'/welcome-partner.php\', open:true, width:400}); ">';
break;
case "default":
$string='<body>';
break;
}
return $string;
?><?php if ($source == "social-notes"): ?>
<script type="text/javascript">
if ( typeof(pmi_share) != 'undefined' ) {
pmi_share("link","http://www.mydomain.com/","Title","http://www.mydomain.com/images/logo.gif","Description sentence.")
}
$(window).ready(function () {
var foundin = $('span:contains("Forward to a Friend")');
foundin.css('display', 'none')
foundin.trigger('click');
});
</script>
<?php endif; ?>
<?php
if(isset($_GET['olay']))
{
$source=$_GET['olay'];
}
else
{
$source="default";
}
switch($source)
{
case "newsletter":
$string='<body onload="$.fn.colorbox({href:\'/welcome-email.php\', open:true, width:600}); ">';
break;
case "partner":
$string='<body onload="$.fn.colorbox({href:\'/welcome-partner.php\', open:true, width:400}); ">';
break;
case "social-notes":
$string='<script type="text/javascript">
if ( typeof(pmi_share) != \'undefined\' ) {
pmi_share("link","http://www.mydomain.com/","Title","http://www.mydomain.com/images/logo.gif","Description sentence.")
}
$(window).ready(function () {
var foundin = $(\'span:contains("Forward to a Friend")\');
foundin.css(\'display\', \'none\')
foundin.trigger(\'click\');
});
</script>
<body>';
break;
case "default":
$string='<body>';
break;
}
return $string;
?>