-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadold.php
29 lines (27 loc) · 1.1 KB
/
adold.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
<?
if ($action == "ad")
{
if (!$lockdb)
{
$giveturns = ceil(60 / $perminutes) * $turnsper;
mysql_query("UPDATE $playerdb SET free=$time+86400,turns=turns+$giveturns WHERE free<$time AND username='$cookie[usernamecookie]' AND password='$cookie[passwordcookie]';");
}
if ($ad_ismap)
$ad_url .= "?$ad_img_x,$ad_img_y";
Header("Location: $ad_url");
exit;
}
$numads = 0;
// ADD YOUR ADS HERE
// Syntax: $ads[$numads++] = array('label'=>'Ad Caption','image'=>'Ad Image','url'=>'Ad URL','ismap'=>'1 if ad is imagemap, omit if not');
$ads[$numads++] = array('label'=>'slashdot.org','image'=>'http://images.qm.ath.cx/slashdot.gif','url'=>'http://slashdot.org/');
if ($numads > 1)
$ad = mt_rand(0,$numads-1);
else $ad = 0;
?>
<form method="post" action="<?=$config[main]?>?action=ad" target="_blank">
<input type="hidden" name="ad_id" value="<?=$ad?>">
<input type="hidden" name="ad_url" value="<?=$ads[$ad][url]?>">
<input type="hidden" name="ad_ismap" value="<?=$ads[$ad][ismap]?>">
<input type="image" name="ad_img" src="<?=$ads[$ad][image]?>" alt="<?=$ads[$ad][label]?>" style="width:468px;height:60px;border:0">
</form>