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.
| 1. / 2. / ...
<?php
// ClanSphere 2006 - www.clansphere.net
// $Id: navlist.php 101 2006-07-12 09:36:29Z hajo $
$cs_lang = cs_translate('wars','navlist');
$select = 'war.games_id AS games_id, cln.clans_short AS clans_short, war.wars_score1 AS ';
$select .= 'wars_score1, war.wars_score2 AS wars_score2, war.wars_id AS wars_id';
$from = 'wars war INNER JOIN {pre}_categories cat ON war.categories_id = cat.categories_id ';
$from .= 'INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id';
$order = 'wars_date DESC';
$cs_wars = cs_sql_select(__FILE__,$from,$select,"war.wars_status = 'played'",$order,0,4);
if(empty($cs_wars)) {
echo $cs_lang['no_wars'];
}
else {
echo cs_html_table(1);
foreach ($cs_wars AS $wars) {
$result = $wars['wars_score1'] - $wars['wars_score2'];
$result >= 1 ? $color1 = 'green' : $color2 = 'red';
$result <= 1 ? $color2 = 'green' : $color1 = 'red';
if(empty($result)) {
$color1 = 'grey';
$color2 = 'grey';
}
echo cs_html_roco(1,'left');
echo cs_html_img('uploads/games/' . $wars['games_id'] . '.gif');
echo cs_html_roco(2,'left');
$secure_short = cs_secure($wars['clans_short']);
echo cs_link($secure_short,'wars','view','id=' . $wars['wars_id']);
echo cs_html_roco(3,'right');
echo bx_html_span(1,"color:".$color1).$wars['wars_score1'].bx_html_span(0);
echo cs_html_roco(4,'center');
echo ':';
echo cs_html_roco(5,'left');
echo bx_html_span(1,"color:".$color2).$wars['wars_score2'].bx_html_span(0);
echo cs_html_roco(0);
}
echo cs_html_table(0);
}
?> |