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.
| 1. / 2. / ...
<?php
$cs_lang = cs_translate('users');
$data = array();
$data['options'] = cs_sql_option(__FILE__,'users');
$styles_array = array('horizontal', 'icons', 'picture', 'admin');
$style = '';
if(!empty($_GET['style']))
if(in_array($_GET['style'], $styles_array)) {
$style = '_' . $_GET['style'];
}
else {
cs_error($_GET['style'], 'The given navlogin style cannot be found');
}
global $login;
if(empty($login['mode'])) {
if(empty($login['nick'])) {
$login['nick'] = 'Nick';
if($data['options']['login'] == 'email') {
$login['nick'] = 'E-Mail';
}
}
if(empty($login['password'])) {
$login['password'] = 'Pass';
}
$data['form']['navlogin'] = cs_url('users','login');
$data['login']['nick'] = cs_secure($login['nick']);
$data['login']['password'] = cs_secure($login['password']);
$data['link']['uri'] = cs_url_self();
echo cs_subtemplate(__FILE__,$data,'users','navlogin_form' . $style);
}
else {
if($style == '_picture') {
$cells = 'users_picture, users_country';
$user = cs_sql_select(__FILE__, 'users', $cells, 'users_id = ' . (int) $account['users_id']);
$data['users']['country_icon'] = cs_html_img('symbols/countries/' . cs_secure($user['users_country']) . '.png');
if(empty($user['users_picture']))
$data['users']['pic'] = cs_html_img('uploads/users/nopic.jpg');
else
$data['users']['pic'] = cs_html_img('uploads/users/' . $user['users_picture']);
}
$data['users']['name'] = cs_user($account['users_id'], $account['users_name']);
$data['users']['surname'] = cs_user($account['users_id'], $account['users_surname']);
$data['users']['link'] = cs_user($account['users_id'], $account['users_nick']);
$data['if']['panel'] = ($cs_main['def_admin'] == 'separated' AND $cs_main['tpl_file'] != 'admin.htm') ? 1 : 0;
$data['if']['contact'] = (empty($data['if']['panel']) AND $account['access_contact'] >= 3) ? 1 : 0;
$data['if']['admin'] = (empty($data['if']['panel']) AND $account['access_clansphere'] >= 3) ? 1 : 0;
$data['if']['system'] = (empty($data['if']['panel']) AND $account['access_clansphere'] >= 4) ? 1 : 0;
$data['if']['more'] = (empty($data['if']['contact']) AND empty($data['if']['admin']) AND empty($data['if']['panel'])) ? 0 : 1;
if(empty($data['if']['panel']) AND $account['access_contact'] >= 3) {
$data['contact']['new'] = cs_cache_load('count_mail_unread');
if($data['contact']['new'] === false)
$data['contact']['new'] = cs_cache_save('count_mail_unread', (int) cs_sql_count(__FILE__,'mail','mail_answered = 0'));
}
if(!empty($data['if']['panel']) AND $account['access_clansphere'] >= 3) {
$data['link']['panel'] = cs_url('clansphere', 'admin', '', 'admin');
}
echo cs_subtemplate(__FILE__,$data,'users','navlogin_view' . $style);
}
|