@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | Event::addEvent( |
61 | 61 | LOG_ATTEMPTED_FORCED_LOGIN, |
62 | 62 | 'tried_hacking_get', |
63 | - $_SERVER['REMOTE_ADDR'].(empty($_POST['login'])?'':'/'.$_POST['login']), |
|
63 | + $_SERVER['REMOTE_ADDR'].(empty($_POST['login']) ? '' : '/'.$_POST['login']), |
|
64 | 64 | null, |
65 | 65 | $i |
66 | 66 | ); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | if (!empty($_POST['submitAuth'])) { |
93 | 93 | // The user has been already authenticated, we are now to find the last login of the user. |
94 | 94 | if (isset ($_user['user_id'])) { |
95 | - $track_login_table = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
95 | + $track_login_table = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN); |
|
96 | 96 | $sql_last_login = "SELECT UNIX_TIMESTAMP(login_date) |
97 | 97 | FROM $track_login_table |
98 | 98 | WHERE login_user_id = '".$_user['user_id']."' |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (Database::num_rows($result_last_login) > 0) { |
103 | 103 | $user_last_login_datetime = Database::fetch_array($result_last_login); |
104 | 104 | $user_last_login_datetime = $user_last_login_datetime[0]; |
105 | - Session::write('user_last_login_datetime',$user_last_login_datetime); |
|
105 | + Session::write('user_last_login_datetime', $user_last_login_datetime); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | //Event::event_login(); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | if (!isset($_GET['id'])) { |
62 | 62 | if (api_get_setting('allow_social_tool') == 'true') { |
63 | 63 | if (!api_is_anonymous()) { |
64 | - $query = isset($_GET['q']) ? $_GET['q']: null; |
|
64 | + $query = isset($_GET['q']) ? $_GET['q'] : null; |
|
65 | 65 | $social_search = UserManager::get_search_form($query); |
66 | 66 | } |
67 | 67 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $time_limit = 60; |
78 | 78 | } |
79 | 79 | |
80 | - $online_time = time() - $time_limit*60; |
|
80 | + $online_time = time() - $time_limit * 60; |
|
81 | 81 | $current_date = api_get_utc_datetime($online_time); |
82 | 82 | |
83 | 83 | $students_online = array(); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $result = Database::query($sql); |
99 | 99 | |
100 | - while($user_list = Database::fetch_array($result)) { |
|
100 | + while ($user_list = Database::fetch_array($result)) { |
|
101 | 101 | $students_online[$user_list['access_user_id']] = $user_list; |
102 | 102 | } |
103 | 103 | } |
@@ -27,8 +27,8 @@ |
||
27 | 27 | $array_keys = array_keys($_GET); |
28 | 28 | |
29 | 29 | if (!empty($array_keys)) { |
30 | - $username = substr($array_keys[0],0,20); // max len of an username |
|
31 | - $friend_id = UserManager::get_user_id_from_username($username); |
|
30 | + $username = substr($array_keys[0], 0, 20); // max len of an username |
|
31 | + $friend_id = UserManager::get_user_id_from_username($username); |
|
32 | 32 | |
33 | 33 | if ($friend_id) { |
34 | 34 | SocialManager::display_individual_user($friend_id); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | ?> |
12 | 12 | <html> |
13 | 13 | <head> |
14 | - <title><?php echo custompages_get_lang('LostPassword');?></title> |
|
14 | + <title><?php echo custompages_get_lang('LostPassword'); ?></title> |
|
15 | 15 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
16 | 16 | <!--[if !IE 6]><!--> |
17 | 17 | <link rel="stylesheet" type="text/css" href="../../custompages/style.css" /> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <div id="lostpassword-form-box" class="form-box"> |
44 | 44 | <?php |
45 | 45 | if (isset($content['info']) && !empty($content['info'])) { |
46 | - echo '<div id="registration-form-error" class="form-error"><ul>' . $content['info'] . '</ul></div>'; |
|
46 | + echo '<div id="registration-form-error" class="form-error"><ul>'.$content['info'].'</ul></div>'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | echo isset($content['form']) ? $content['form'] : '' |
@@ -81,7 +81,7 @@ |
||
81 | 81 | ?> |
82 | 82 | <html> |
83 | 83 | <head> |
84 | - <title><?php echo custompages_get_lang('Registration');?></title> |
|
84 | + <title><?php echo custompages_get_lang('Registration'); ?></title> |
|
85 | 85 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
86 | 86 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
87 | 87 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
@@ -89,14 +89,14 @@ |
||
89 | 89 | ?> |
90 | 90 | <form id="login-form" class="form" action="<?php echo api_get_path(WEB_PATH)?>index.php" method="post"> |
91 | 91 | <div> |
92 | - <label for="login">*<?php echo custompages_get_lang('User');?></label> |
|
92 | + <label for="login">*<?php echo custompages_get_lang('User'); ?></label> |
|
93 | 93 | <input name="login" type="text" /><br /> |
94 | - <label for="password">*<?php echo custompages_get_lang('Password');?></label> |
|
94 | + <label for="password">*<?php echo custompages_get_lang('Password'); ?></label> |
|
95 | 95 | <input name="password" type="password" /><br /> |
96 | 96 | </div> |
97 | 97 | </form> |
98 | 98 | <div id="login-form-submit" class="form-submit" onclick="document.forms['login-form'].submit();"> |
99 | - <span><?php echo custompages_get_lang('LoginEnter');?></span> |
|
99 | + <span><?php echo custompages_get_lang('LoginEnter'); ?></span> |
|
100 | 100 | </div> <!-- #form-submit --> |
101 | 101 | <div id="links"> |
102 | 102 |
@@ -13,17 +13,17 @@ discard block |
||
13 | 13 | /** |
14 | 14 | * Security checks |
15 | 15 | */ |
16 | -if (! isset($_SESSION['conditional_login']['uid'])) |
|
16 | +if (!isset($_SESSION['conditional_login']['uid'])) |
|
17 | 17 | die("Not Authorised"); |
18 | 18 | |
19 | 19 | if (isset($_POST['password'])) { |
20 | 20 | $u = api_get_user_info($_SESSION['conditional_login']['uid']); |
21 | 21 | if ($_POST['password'] != $_POST['password2']) { |
22 | - header('Location: '. api_get_self().'?invalid=2'); |
|
22 | + header('Location: '.api_get_self().'?invalid=2'); |
|
23 | 23 | exit(); |
24 | 24 | } |
25 | - if (empty($_POST['password'])){ //|| !api_check_password($password)) { //Pass must be at least 5 char long with 2 digits and 3 letters |
|
26 | - header('Location: '. api_get_self().'?invalid=1'); |
|
25 | + if (empty($_POST['password'])) { //|| !api_check_password($password)) { //Pass must be at least 5 char long with 2 digits and 3 letters |
|
26 | + header('Location: '.api_get_self().'?invalid=1'); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 | $password = $_POST['password']; |
@@ -99,23 +99,23 @@ discard block |
||
99 | 99 | <div id="header"> |
100 | 100 | <img src="/custompages/images/header.png" alt="Logo" /> |
101 | 101 | </div> <!-- #header --> |
102 | - <h2> <?php echo custompages_get_lang('FirstLogin');?> </h2> |
|
102 | + <h2> <?php echo custompages_get_lang('FirstLogin'); ?> </h2> |
|
103 | 103 | |
104 | 104 | <div id="changepassword-form-box" class="form-box"> |
105 | - <div class="info"> <?php echo custompages_get_lang('FirstLoginChangePassword');?> </div> |
|
105 | + <div class="info"> <?php echo custompages_get_lang('FirstLoginChangePassword'); ?> </div> |
|
106 | 106 | <?php if (isset($error_message)) { |
107 | 107 | echo '<div id="changepassword-form-error" class="form-error">'.$error_message.'</div>'; |
108 | 108 | }?> |
109 | 109 | <form id="changepassword-form" class="form" method="post"> |
110 | 110 | <div> |
111 | - <label for="password">*<?php echo custompages_get_lang('Password');?></label> |
|
111 | + <label for="password">*<?php echo custompages_get_lang('Password'); ?></label> |
|
112 | 112 | <input name="password" type="password" /><br /> |
113 | - <label for="password2">*<?php echo custompages_get_lang('Password');?></label> |
|
113 | + <label for="password2">*<?php echo custompages_get_lang('Password'); ?></label> |
|
114 | 114 | <input name="password2" type="password" /><br /> |
115 | 115 | </div> |
116 | 116 | </form> |
117 | 117 | <div id="changepassword-form-submit" class="form-submit" onclick="document.forms['changepassword-form'].submit();"> |
118 | - <span><?php echo custompages_get_lang('LoginEnter');?></span> |
|
118 | + <span><?php echo custompages_get_lang('LoginEnter'); ?></span> |
|
119 | 119 | </div> <!-- #form-submit --> |
120 | 120 | </div> <!-- #form --> |
121 | 121 | <div id="footer"> |
@@ -52,7 +52,7 @@ |
||
52 | 52 | You have been logged out. |
53 | 53 | </div> |
54 | 54 | </div> |
55 | - <a href="<?php echo $www . 'user_portal.php'; ?>">Go to your portal</a> |
|
55 | + <a href="<?php echo $www.'user_portal.php'; ?>">Go to your portal</a> |
|
56 | 56 | <div id="footer"> |
57 | 57 | <img src="<?php echo $www ?>/custompages/images/footer.png" alt="footer"/> |
58 | 58 | </div> |