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.
| 1. / 2. / ...
<?php
// ClanSphere 2007 - www.clansphere.net
// $Id: navnext.php 101 2006-07-12 09:36:29Z hajo $
$cs_lang = cs_translate('wars');
$select = 'war.games_id AS games_id, war.wars_date AS wars_date, sqd.squads_name AS squads_name, cln.clans_country AS clans_country, cln.clans_short AS clans_short, cln.clans_name AS clans_name, cln.clans_picture AS clans_picture, war.wars_id AS wars_id, war.categories_id AS categories_id, cat.categories_name AS categories_name';
$from = 'wars war INNER JOIN {pre}_squads sqd ON war.squads_id = sqd.squads_id INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id INNER JOIN {pre}_categories cat ON war.categories_id = cat.categories_id ';
$upcome = "war.wars_date > '" . cs_time() . "' AND war.wars_status = 'upcoming'";
$order = 'war.wars_date ASC';
$data['wars'] = $cs_wars;
$count_wars = count($cs_wars);
$data = array();
$data['wars'] = cs_sql_select(__FILE__,$from,$select,$upcome,$order,0,1);
if(empty($data['wars'])) {
echo cs_html_table(1);
echo cs_html_roco(1,'nonewposts');
echo cs_html_br(4);
echo $cs_lang['noupcomingwar'];
echo cs_html_roco(0);
echo cs_html_table(0);
}
else {
$data['categorie'] = cs_sql_select(__FILE__,'categories','*','categories_id = ' . $data['wars']['categories_id']);
$data['clan1'] = cs_sql_select(__FILE__,'clans','*','clans_id = 1');
foreach($data['categorie'] AS $categorie){
$data['categorie'][key($data['categorie'])] = cs_secure($categorie);
next($data['categorie']);
}
foreach($data['clan1'] AS $clan1){
$data['clan1'][key($data['clan1'])] = cs_secure($clan1);
next($data['clan1']);
}
$data['clan1']['clans_picture'] = !empty($data['clan1']['clans_picture']) ? cs_html_img('uploads/clans/'.$data['clan1']['clans_picture']) : '-';
$data['clan2']['clans_picture'] = !empty($data['wars']['clans_picture']) ? cs_html_img('uploads/clans/'.$data['wars']['clans_picture']) : '';
$data['wars']['date'] = cs_date('unix',$data['wars']['wars_date'],1);
$data['wars']['url'] = cs_url('wars','view','id=' . $data['wars']['wars_id']);
$data['clan1']['squads_name'] = cs_secure($data['wars']['squads_name']);
$data['clan2']['clans_name'] = cs_secure($data['wars']['clans_name']);
$data['clan2']['clans_short'] = cs_secure($data['wars']['clans_short']);
for ($i = 0; $i < $all; $i++) {
$cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ?
cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : '';
$secure_short = cs_secure($cs_wars[$i]['clans_short']);
$cs_wars[$i]['enemy'] = cs_link($secure_short,'wars','view','id=' . $cs_wars[$i]['wars_id']);
$result = $cs_wars[$i]['wars_score1'] - $cs_wars[$i]['wars_score2'];
$result >= 1 ? $icon = 'won' : $icon = 'lose';
if(empty($result)) { $icon = 'drow'; }
$cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
$result >= 1 ? $color = 'green' : $color = 'red';
if(empty($result)) { $color = 'blue'; }
$cs_wars[$i]['color'] = $color;
}
echo cs_subtemplate(__FILE__,$data,'wars','nextmatch');
}
?> |