-
Notifications
You must be signed in to change notification settings - Fork 0
/
attack.php
71 lines (67 loc) · 2.81 KB
/
attack.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/*
* Project: Clan Stat
* License: Creative Commons - Attribution-Noncommercial-Share Alike 3.0 Unported
* Link: http://creativecommons.org/licenses/by-nc-sa/3.0/
* -----------------------------------------------------------------------
* Began: 2011
* Date: $Date: 2011-10-24 11:54:02 +0200 $
* -----------------------------------------------------------------------
* @author $Author: Edd $
* @copyright 2011-2011 Edd - Aleksandr Ustinov
* @link http://wot-news.com
* @package Clan Stat
* @version $Rev: 1.2.4 $
*
*/
define('ROOT_DIR', dirname(__FILE__));
include_once(ROOT_DIR.'/function/config.php');
include_once(ROOT_DIR.'/nosql/'.$language.'.php');
include_once(ROOT_DIR.'/nosql/config_'.SERVER.'.php');
if(MYSQL == 'on' && MYSQL_ERROR != 'on'){
include_once(ROOT_DIR.'/function/mysql.php');
}
include_once(ROOT_DIR.'/function/get.php');
include_once(ROOT_DIR.'/function/html_dom.php');
include_once(ROOT_DIR.'/function/func.php');
$battel = array();
if(is_valid_url($config['td']) == true){
$battel = get_clan_attack($config,CLAN);
}
include_once(ROOT_DIR.'/header.php');
?>
<div align="center">
<table id="stat6" class="tablesorter" cellspacing="1" style="width: 70%;">
<thead>
<tr>
<th width="40"><?php echo $lang['type']; ?></th>
<th><?php echo $lang['time']; ?></th>
<th><?php echo $lang['province']; ?></th>
</tr>
</thead>
<tbody>
<?php foreach($battel['request_data']['items'] as $val){
if(strlen($val['time']) > 1){
$date = date('H:i',$val['time']);
}else{
$date = '--:--';
}
if($val['type'] == 'landing'){
$type = '<img src="/images/landing.png">';
}elseif($val['type'] == 'for_province'){
$type = '<img src="/images/attacked.png">';
}elseif($val['type'] == 'meeting_engagement'){
$type = '<img src="/images/combats_running.png">';
}
?>
<tr>
<td align="center"><?php echo $type; ?></td>
<td><?php echo $date; ?></td>
<td><a href="<?php echo $config['clan_link']; ?>maps/?province=<?php echo $val['provinces'][0]['id']; ?>" target="_blank"><?php echo $val['provinces'][0]['name']; ?></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</body>
</html>