forked from ethgasstation/ethgasstation-frontend
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadSvg.php
38 lines (33 loc) · 1.4 KB
/
adSvg.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<div class="promo-wrap">
<div class="promo-svg-cont">
<!-- DEFAULT DFP FARMER NEWSLETTER -->
<!-- <a href="http://bit.ly/3c1v8ds" target="_blank">
<img class="promo-desktop" src="/images/farmer_desktop_purple.svg" alt="DFP Farmer Newsletter">
<img class="promo-mobile" src="/images/farmer_mobile_purple.svg" alt="DFP Farmer Newsletter">
</a> -->
<?php
class ad {
public $desktopLink;
public $mobileLink;
public $desktopImg;
public $mobileImg;
public $alt;
}
$defiPulse = new ad();
$defiPulse->desktopLink = 'https://bit.ly/3zIj37P';
$defiPulse->mobileLink = 'https://bit.ly/3zIj37P';
$defiPulse->desktopImg = '/images/solana-desktop.png';
$defiPulse->mobileImg = '/images/solana-mobile.png';
$defiPulse->alt = 'Solana Banner';
$ads = array($defiPulse);
$arrLength = count($ads) - 1;
$index = mt_rand(0, $arrLength);
?>
<a class="promo-desktop" href="<?php echo ($ads[$index]->desktopLink); ?>" target="_blank">
<img class="promo-desktop" src="<?php echo ($ads[$index]->desktopImg); ?>" alt="<?php echo ($ads[$index]->alt); ?>">
</a>
<a class="promo-mobile" href="<?php echo ($ads[$index]->mobileLink); ?>" target="_blank">
<img class="promo-mobile" src="<?php echo ($ads[$index]->mobileImg); ?>" alt="<?php echo ($ads[$index]->alt); ?>">
</a>
</div>
</div>