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.
72.
73.
74.
75.
76.
77.
78.
79.
| 1. / 2. / ...
<?php
// ClanSphere 2007 - www.clansphere.net
// $Id: teams.php 101 2006-07-12 09:36:29Z hajo $
$clan_id = 1;
$cs_lang = cs_translate('members');
$op_members = cs_sql_option(__FILE__,'members');
$squads_order = 'squads_order, squads_name';
$cs_squads = cs_sql_select(__FILE__,'squads','*','squads_own = \'1\'',$squads_order,0,0);
$squads_loop = count($cs_squads);
$data['lang']['mod'] = $cs_lang[$op_members['label']];
$data['lang']['body'] = sprintf($cs_lang['body_list'], $squads_loop);
if(empty($squads_loop)) {
$data['members'] = '';
}
for($sq_run=0; $sq_run<$squads_loop; $sq_run++) {
$select = 'mem.members_admin AS members_admin, mem.users_id AS users_id, usr.users_nick AS users_nick';
$from = 'members mem INNER JOIN {pre}_users usr ON mem.users_id = usr.users_id ';
$where = "mem.squads_id = '" . $cs_squads[$sq_run]['squads_id'] . "'";
$order = 'mem.members_order ASC, usr.users_nick ASC';
$cs_members = cs_sql_select(__FILE__,$from,$select,$where,$order,0,0);
$members_loop = count($cs_members);
if(empty($cs_squads[$sq_run]['squads_picture'])) {
$data['members'][$sq_run]['pic'] = $cs_lang['nopic'];
}
else {
$place = 'uploads/squads/' . $cs_squads[$sq_run]['squads_picture'];
$size = getimagesize($cs_main['def_path'] . '/' . $place);
$data['members'][$sq_run]['pic'] = cs_html_img($place,$size[1],$size[0]);
}
$id = 'id=' . $cs_squads[$sq_run]['squads_id'];
$squads_name = cs_secure($cs_squads[$sq_run]['squads_name']);
$data['members'][$sq_run]['name'] = cs_link($squads_name,'squads','view',$id);
if(!empty($cs_squads[$sq_run]['games_id'])) {
$data['members'][$sq_run]['name'] = cs_html_img('uploads/games/' . $cs_squads[$sq_run]['games_id'] . '.gif');
$where = "games_id = '" . $cs_squads[$sq_run]['games_id'] . "'";
$cs_game = cs_sql_select(__FILE__,'games','games_name, games_id',$where);
$id = 'id=' . $cs_game['games_id'];
$data['members'][$sq_run]['game'] = ' ' . cs_link($cs_game['games_name'],'games','view',$id);
}
else {
$data['members'][$sq_run]['game'] = ' - ';
}
if(empty($members_loop)) {
$data['squad_members'] = '';
}
for($run=0; $run<$members_loop; $run++) {
$id = 'id=' . $cs_members[$run]['users_id'];
$users_nick = cs_secure($cs_members[$run]['users_nick']);
$data['members'][$sq_run]['squad_members'][$run]['members'] = cs_link($users_nick,'users','view',$id);
if(!empty($run)) {
$data['members'][$sq_run]['squad_members'][$run]['dot'] = ', ';
}
else {
$data['members'][$sq_run]['squad_members'][$run]['dot'] = ', ';
}
}
}
echo cs_subtemplate(__FILE__,$data,'members','teams');
?> |