| 
 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.
 80.
 81.
 82.
 83.
 84.
 85.
 86.
 87.
 88.
 89.
 
 | 1. / 2. / ... 
 <?php// ClanSphere 2009 - www.clansphere.net
 // $Id: list.php 2266 2009-03-21 10:37:39Z duRiel $
 
 $cs_lang = cs_translate('users');
 
 $start = empty($_REQUEST['start']) ? 0 : $_REQUEST['start'];
 $cs_sort[1] = 'users_nick DESC';
 $cs_sort[2] = 'users_nick ASC';
 $cs_sort[3] = 'users_place DESC';
 $cs_sort[4] = 'users_place ASC';
 $cs_sort[5] = 'users_laston DESC';
 $cs_sort[6] = 'users_laston ASC';
 $cs_sort[7] = 'access_id ASC';
 $cs_sort[8] = 'access_id DESC';
 $cs_sort[9] = 'users_age ASC';
 $cs_sort[10] = 'users_age DESC';
 empty($_REQUEST['sort']) ? $sort = 2 : $sort = $_REQUEST['sort'];
 $order = $cs_sort[$sort];
 //$where = empty($_REQUEST['where']) ? 0 : $_REQUEST['where'];
 //$mof = empty($where) ? '' : " AND users_sex = '" . cs_sql_escape($where) . "'";
 $where = empty($_REQUEST['where']) ? 0 : $_REQUEST['where'];
 $mof = empty($where) ? '' : " AND users_nick LIKE '" . cs_sql_escape($where) . "%'";
 $condition = 'users_delete = 0 AND users_active = 1' . $mof;
 $users_count = cs_sql_count(__FILE__,'users',$condition);
 
 $data['head']['mod'] = $cs_lang['mod_name'];
 $data['head']['action'] = $cs_lang['list'];
 
 $data['lang']['total'] = $cs_lang['total'];
 $data['lang']['sex'] = $cs_lang['sex'];
 $data['lang']['female'] = $cs_lang['female'];
 $data['lang']['male'] = $cs_lang['male'];
 $data['lang']['show'] = $cs_lang['show'];
 $data['lang']['country'] = $cs_lang['country'];
 $data['lang']['nick'] = $cs_lang['nick'];
 $data['lang']['place'] = $cs_lang['place'];
 $data['lang']['laston'] = $cs_lang['laston'];
 $data['lang']['page'] = $cs_lang['page'];
 $data['lang']['all'] = $cs_lang['all'];
 
 $data['head']['total'] = $users_count;
 $data['head']['pages'] = cs_pages('users','list',$users_count,$start,$where,$sort);
 $sel_female = $where === 'female' ? 'selected' : '';
 $data['head']['sel_female'] = $sel_female;
 $sel_male = $where === 'male' ? 'selected' : '';
 $data['head']['sel_male'] = $sel_male;
 
 $data['sort']['nick'] = cs_sort('users','list',$start,$where,1,$sort);
 $data['sort']['place'] = cs_sort('users','list',$start,$where,3,$sort);
 $data['sort']['laston'] = cs_sort('users','list',$start,$where,5,$sort);
 $data['sort']['access'] = cs_sort('users','list',$start,$where,7,$sort);
 $data['sort']['age'] = cs_sort('users','list',$start,$where,9,$sort);
 
 
 $select = 'users_id, users_nick, users_place, users_laston, users_country, users_hidden, users_active, users_invisible, access_id, users_age';
 $cs_users = cs_sql_select(__FILE__,'users',$select,$condition,$order,$start,$account['users_limit']);
 $users_loop = count($cs_users);
 
 for($run=0; $run<$users_loop; $run++) {
 
 if (!empty($cs_users[$run]['users_age'])) {
 $birth = explode ('-', $cs_users[$run]['users_age']);
 $age = cs_datereal('Y') - $birth[0];
 if(cs_datereal('m')<=$birth[1]) { $age--; }
 if(cs_datereal('d')>=$birth[2] AND cs_datereal('m')==$birth[1]) { $age++; }
 $cs_users[$run]['age'] = $age;
 } else { $cs_users[$run]['age'] = ''; }
 $cs_users_access = cs_sql_select(__FILE__, 'access', 'access_id, access_name', "access_id = " . $cs_users[$run]['access_id'], 0, 0, 1);
 $cs_users[$run]['access_name'] = $cs_users_access['access_name'];
 $cs_users[$run]['country'] = cs_html_img('symbols/countries/' . $cs_users[$run]['users_country'] . '.png');
 $cs_users[$run]['users_id'] = cs_secure($cs_users[$run]['users_id']);
 $cs_users[$run]['nick'] = cs_user($cs_users[$run]['users_id'], $cs_users[$run]['users_nick'], $cs_users[$run]['users_active']);
 $content = cs_secure($cs_users[$run]['users_place']);
 $hidden = explode(',',$cs_users[$run]['users_hidden']);
 if(in_array('users_place',$hidden)) {
 $content = ($account['access_users'] > 4 OR $cs_users[$run]['users_id'] == $account['users_id']) ?
 cs_html_italic(1) . $content . cs_html_italic(0) : '';
 }
 $cs_users[$run]['place'] = $content;
 $cs_users[$run]['laston'] = cs_date('unix',$cs_users[$run]['users_laston']);
 $cs_users[$run]['page'] = cs_userstatus($cs_users[$run]['users_laston'],$cs_users[$run]['users_invisible']);
 
 }
 
 $data['users'] = $cs_users;
 echo cs_subtemplate(__FILE__,$data,'users','list');
 
 ?>
 |