php microtime include_once _SERVER DOCUMENT_ROOT sys fnc php include_o

 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
39
40
41
42
43
44
45
46
<?php
$t = microtime(1);
include_once $_SERVER['DOCUMENT_ROOT'] . '/sys/fnc.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/scripts/strana.php'; // Находим страну
# Возращаем баннер банки
function noBaner() {
header('Content-Type: image/gif');
readfile($_SERVER['DOCUMENT_ROOT'] . '/style/b_2.gif');
}
$sql = mysql_query("SELECT * FROM `playground` AS `p`, `my_banner` AS `b`, `user` AS `u`
WHERE
`u`.`id` = `b`.`user_id`
AND
`b`.`limit_credits` > `b`.`today_raskhod_credits`
AND
`b`.`status` = '1'
AND
`b`.`mod` = '1'
AND
`u`.`credit` > '10'
AND
`b`.`site` != '".$_SERVER['HTTP_HOST']."'
AND
`b`.`forbidden` != `p`.`id`
ORDER BY RAND() LIMIT 1
");
if (mysql_num_rows($sql)) {
echo $id_banner['name'].$id_banner['ext'];
//banner($id_banner['name'].$id_banner['ext']);
} else {
//noBaner();
}
echo '<h4>'.round(microtime(1) - $t, 4).'</h4>';
?>