PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home/jairosvt/public_html/afmedios.com/modules/mod_flexbanner/ |
| Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64 IP: 107.161.180.42 |
| Dir : /home/jairosvt/public_html/afmedios.com/modules/mod_flexbanner/helper.php |
<?php
/**
* @copyright Copyright (C) 2009 - 2011 inch communications ltdg
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
// no direct access
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
class modFlexBannerHelper {
function FlexBannerQuery($details) {
if($details['sectionid'] == "com_weblinks") { $details['sectionid'] = "1";
}
$menu = &JSite::getMenu();
if($menu -> getActive() == $menu -> getDefault()) {
$contentif = "AND IF((select count(distinct bannerid) from `#__fabanner`
where `#__fabanner`.`frontpage` = 1)>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabanner`.`bannerid` FROM `#__fabanner`
WHERE `#__fabanner`.`frontpage` = 1)
AND `#__fabanner`.`restrictbyid`=1,
`#__fabanner`.`restrictbyid`=0)";
} elseif(!is_null($details['contentid']) and $details['categoryid'] == 0 and $details['sectionid'] == 0) {
$contentif = "AND IF((select count(distinct bannerid) from `#__fabannerin`
where `#__fabannerin`.`contentid` = " . $details['contentid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin`
WHERE `#__fabannerin`.`contentid` = '" . $details['contentid'] . "')
AND `#__fabanner`.`restrictbyid`=1,
`#__fabanner`.`restrictbyid`=0)";
} elseif(!is_null($details['contentid'])) {
$contentif = "AND IF((select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`contentid` = " . $details['contentid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`contentid` = '" . $details['contentid'] . "') AND `#__fabanner`.`restrictbyid`=1,
IF(`#__fabanner`.`restrictbyid` and (select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`categoryid` = " . $details['categoryid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`categoryid` = '" . $details['categoryid'] . "') AND `#__fabanner`.`restrictbyid`=1,
IF(`#__fabanner`.`restrictbyid` and (select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`sectionid` = " . $details['sectionid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`sectionid` = '" . $details['sectionid'] . "') AND `#__fabanner`.`restrictbyid`=1,
`#__fabanner`.`restrictbyid`=0)))";
} elseif(!is_null($details['categoryid'])) {
$contentif = "AND IF((select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`categoryid` = " . $details['categoryid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`categoryid` = '" . $details['categoryid'] . "') AND `#__fabanner`.`restrictbyid`=1,
IF(`#__fabanner`.`restrictbyid` and (select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`sectionid` = " . $details['sectionid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`sectionid` = '" . $details['sectionid'] . "') AND `#__fabanner`.`restrictbyid`=1,
`#__fabanner`.`restrictbyid`=0))";
} elseif(!is_null($details['sectionid'])) {
$contentif = "AND IF((select count(distinct bannerid) from `#__fabannerin` where `#__fabannerin`.`sectionid` = " . $details['sectionid'] . ")>0,
`#__fabanner`.`bannerid` in (SELECT `#__fabannerin`.`bannerid` FROM `#__fabannerin` WHERE `#__fabannerin`.`sectionid` = '" . $details['sectionid'] . "') AND `#__fabanner`.`restrictbyid`=1,
`#__fabanner`.`restrictbyid`=0)";
} else {
$contentif = "AND `#__fabanner`.`restrictbyid`=0";
}
return $contentif;
}
function FlexBannerSWF($bannerwidth, $bannerheight, $link, $imageurl, $blankimageurl, $newwindow, $moduleclass_sfx, $nofollow) {
$bannerie = $bannerheight + 20;
if($newwindow) {
return '<div id="flashcontent' . $moduleclass_sfx . '" style="overflow: hidden; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px;">
<!-- this iframe is above the Flash, but below the div -->
<iframe src="javascript:false" style="position:relative; top: 0px; left: 0px; display: none; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px; z-index: 5;" id="iframe" frameborder="0" scrolling="no">
</iframe>
<!-- iframe width is width of the div + borders, so 100 + 1 + 1 = 102 -->
<!-- the div we want to be displayed above the Flash -->
<div style="position: relative; top: 0px; left: 0px; z-index: 10; display: block; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px; background: none">
<div class="advert' . $moduleclass_sfx . '" style="width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;">
<a ' . $nofollow . ' href="' . $link . '" style="width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;display:block;margin:0;padding:0;border:0;text-decoration:none;"
target="_blank"
><img src="' . $blankimageurl . '" style="position: relative;float:left; top: 0px; left: 0px;width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;display:block;cursor: pointer;" alt="trans" /> </a></div>
</div>
<!-- this is the Flash element which we want as background -->
<script type="text/javascript" src="' . JURI::base() . 'modules/mod_flexbanner/swfobject.js"></script>
<script type="text/javascript">
var params = { wmode: "transparent", movie: "' . $imageurl . '" };
swfobject.registerObject("myFlashContent", "9.0.0");
</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" onclick="window.location.href=\'' . $link . '\'" width=" ' . $bannerwidth . '" height=" ' . $bannerheight . '" style="position:relative;top:-' . $bannerheight . 'px!important;top:-' . $bannerie . 'px;">
<param name="movie" value="' . $imageurl . '" /><param name="wmode" value="transparent"/>
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="' . $imageurl . '" width="' . $bannerwidth . '" height="' . $bannerheight . '" >
<param name="wmode" value="transparent"/>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer" >
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>';
} else {
return '<div id="flashcontent' . $moduleclass_sfx . '" style="overflow: hidden; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px;">
<!-- this iframe is above the Flash, but below the div -->
<iframe src="javascript:false" style="position:relative; top: 0px; left: 0px; display: none; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px; z-index: 5;" id="iframe" frameborder="0" scrolling="no">
</iframe>
<!-- iframe width is width of the div + borders, so 100 + 1 + 1 = 102 -->
<!-- the div we want to be displayed above the Flash -->
<div style="position: relative; top: 0px; left: 0px; z-index: 10; display: block; width: ' . $bannerwidth . 'px; height: ' . $bannerheight . 'px; background: none">
<div class="advert' . $moduleclass_sfx . '" style="width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;">
<a ' . $nofollow . ' href="' . $link . '" style="width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;display:block;margin:0;padding:0;border:0;text-decoration:none;"
><img src="' . $blankimageurl . '" style="position: relative;float:left; top: 0px; left: 0px;width: ' . $bannerwidth . 'px;height: ' . $bannerheight . 'px;display:block;cursor: pointer;" alt="trans" /> </a></div>
</div>
<!-- this is the Flash element which we want as background -->
<script type="text/javascript" src="' . JURI::base() . 'modules/mod_flexbanner/swfobject.js"></script>
<script type="text/javascript">
var params = { wmode: "transparent", movie: "' . $imageurl . '" };
swfobject.registerObject("myFlashContent", "9.0.0");
</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" onclick="window.location.href=\'' . $link . '\'" width=" ' . $bannerwidth . '" height=" ' . $bannerheight . '" style="position:relative;top:-' . $bannerheight . 'px!important;top:-' . $bannerie . 'px;">
<param name="movie" value="' . $imageurl . '" /><param name="wmode" value="transparent"/>
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="' . $imageurl . '" width="' . $bannerwidth . '" height="' . $bannerheight . '" >
<param name="wmode" value="transparent"/>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer" >
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>';
}
}
function FlexBannerloadlast($bannerwidth, $bannerheight, $link, $imageurl, $bannerimagealt, $newwindow, $moduleclass_sfx, $nofollow) {
if($newwindow) {
return '<div class="advert' . $moduleclass_sfx . '" style="display:block;width:' . $bannerwidth . 'px;height:' . $bannerheight . 'px;background:url(' . $imageurl . ') no-repeat;">
<a' . $nofollow . ' href="' . $link . '" style="width:' . $bannerwidth . 'px;height:' . $bannerheight . 'px;display:block;margin:0;padding:0;border:0;text-decoration:none;" target="_blank" > </a>
</div>';
} else {
return '<div class="advert' . $moduleclass_sfx . '" style="display:block;width:' . $bannerwidth . 'px;height:' . $bannerheight . 'px;background:url(' . $imageurl . ') no-repeat;">
<a' . $nofollow . ' href="' . $link . '" style="width:' . $bannerwidth . 'px;height:' . $bannerheight . 'px;display:block;margin:0;padding:0;border:0;text-decoration:none;"> </a>
</div>';
}
}
function FlexBannerloadfirst($bannerwidth, $bannerheight, $link, $imageurl, $bannerimagealt, $newwindow, $moduleclass_sfx, $nofollow) {
if($newwindow) {
return '<div class="advert' . $moduleclass_sfx . '">
<a' . $nofollow . ' href="' . $link . '" target="_blank" >
<img src="' . $imageurl . '" alt="' . $bannerimagealt . '" title="' . $bannerimagealt . '" ' . ($bannerwidth ? 'width="' . $bannerwidth . '"' : '') . ($bannerheight ? ' height="' . $bannerheight . '"' : '') . ' />
</a>
</div>';
} else {
return '<div class="advert' . $moduleclass_sfx . '">
<a' . $nofollow . ' href="' . $link . '" >
<img src="' . $imageurl . '" alt="' . $bannerimagealt . '" title="' . $bannerimagealt . '" ' . ($bannerwidth ? 'width="' . $bannerwidth . '"' : '') . ($bannerheight ? ' height="' . $bannerheight . '"' : '') . ' />
</a>
</div>';
}
}
}
?>