@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | Core::ensureFunctionExists('openssl_get_cipher_methods'); |
47 | 47 | if (\in_array(Core::CIPHER_METHOD, \openssl_get_cipher_methods()) === false) { |
48 | 48 | throw new Ex\EnvironmentIsBrokenException( |
49 | - 'Cipher method not supported. This is normally caused by an outdated ' . |
|
50 | - 'version of OpenSSL (and/or OpenSSL compiled for FIPS compliance). ' . |
|
51 | - 'Please upgrade to a newer version of OpenSSL that supports ' . |
|
52 | - Core::CIPHER_METHOD . ' to use this library.' |
|
49 | + 'Cipher method not supported. This is normally caused by an outdated '. |
|
50 | + 'version of OpenSSL (and/or OpenSSL compiled for FIPS compliance). '. |
|
51 | + 'Please upgrade to a newer version of OpenSSL that supports '. |
|
52 | + Core::CIPHER_METHOD.' to use this library.' |
|
53 | 53 | ); |
54 | 54 | } |
55 | 55 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | // Modifying the ciphertext: Appending a string. |
103 | 103 | try { |
104 | - Crypto::decrypt($ciphertext . 'a', $key, true); |
|
104 | + Crypto::decrypt($ciphertext.'a', $key, true); |
|
105 | 105 | throw new Ex\EnvironmentIsBrokenException(); |
106 | 106 | } catch (Ex\WrongKeyOrModifiedCiphertextException $e) { /* expected */ |
107 | 107 | } |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | $info = Encoding::hexToBin('f0f1f2f3f4f5f6f7f8f9'); |
160 | 160 | $length = 42; |
161 | 161 | $okm = Encoding::hexToBin( |
162 | - '3cb25f25faacd57a90434f64d0362f2a' . |
|
163 | - '2d2d0a90cf1a5a4c5db02d56ecc4c5bf' . |
|
162 | + '3cb25f25faacd57a90434f64d0362f2a'. |
|
163 | + '2d2d0a90cf1a5a4c5db02d56ecc4c5bf'. |
|
164 | 164 | '34007208d5b887185865' |
165 | 165 | ); |
166 | 166 | $computed_okm = Core::HKDF('sha256', $ikm, $length, $info, $salt); |
@@ -172,8 +172,8 @@ discard block |
||
172 | 172 | $ikm = \str_repeat("\x0c", 22); |
173 | 173 | $length = 42; |
174 | 174 | $okm = Encoding::hexToBin( |
175 | - '2c91117204d745f3500d636a62f64f0a' . |
|
176 | - 'b3bae548aa53d423b0d1f27ebba6f5e5' . |
|
175 | + '2c91117204d745f3500d636a62f64f0a'. |
|
176 | + 'b3bae548aa53d423b0d1f27ebba6f5e5'. |
|
177 | 177 | '673a081d70cce7acfc48' |
178 | 178 | ); |
179 | 179 | $computed_okm = Core::HKDF('sha1', $ikm, $length, '', null); |
@@ -207,20 +207,20 @@ discard block |
||
207 | 207 | { |
208 | 208 | // AES CTR mode test vector from NIST SP 800-38A |
209 | 209 | $key = Encoding::hexToBin( |
210 | - '603deb1015ca71be2b73aef0857d7781' . |
|
210 | + '603deb1015ca71be2b73aef0857d7781'. |
|
211 | 211 | '1f352c073b6108d72d9810a30914dff4' |
212 | 212 | ); |
213 | 213 | $iv = Encoding::hexToBin('f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff'); |
214 | 214 | $plaintext = Encoding::hexToBin( |
215 | - '6bc1bee22e409f96e93d7e117393172a' . |
|
216 | - 'ae2d8a571e03ac9c9eb76fac45af8e51' . |
|
217 | - '30c81c46a35ce411e5fbc1191a0a52ef' . |
|
215 | + '6bc1bee22e409f96e93d7e117393172a'. |
|
216 | + 'ae2d8a571e03ac9c9eb76fac45af8e51'. |
|
217 | + '30c81c46a35ce411e5fbc1191a0a52ef'. |
|
218 | 218 | 'f69f2445df4f9b17ad2b417be66c3710' |
219 | 219 | ); |
220 | 220 | $ciphertext = Encoding::hexToBin( |
221 | - '601ec313775789a5b7a7f504bbf3d228' . |
|
222 | - 'f443e3ca4d62b59aca84e990cacaf5c5' . |
|
223 | - '2b0930daa23de94ce87017ba2d84988d' . |
|
221 | + '601ec313775789a5b7a7f504bbf3d228'. |
|
222 | + 'f443e3ca4d62b59aca84e990cacaf5c5'. |
|
223 | + '2b0930daa23de94ce87017ba2d84988d'. |
|
224 | 224 | 'dfc9c58db67aada613c2dd08457941a6' |
225 | 225 | ); |
226 | 226 |
@@ -124,16 +124,16 @@ discard block |
||
124 | 124 | // being a prefix of another type's header, leading to ambiguity. |
125 | 125 | if (Core::ourStrlen($header) !== self::SERIALIZE_HEADER_BYTES) { |
126 | 126 | throw new Ex\EnvironmentIsBrokenException( |
127 | - 'Header must be ' . self::SERIALIZE_HEADER_BYTES . ' bytes.' |
|
127 | + 'Header must be '.self::SERIALIZE_HEADER_BYTES.' bytes.' |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 | |
131 | 131 | return Encoding::binToHex( |
132 | - $header . |
|
133 | - $bytes . |
|
132 | + $header. |
|
133 | + $bytes. |
|
134 | 134 | \hash( |
135 | 135 | self::CHECKSUM_HASH_ALGO, |
136 | - $header . $bytes, |
|
136 | + $header.$bytes, |
|
137 | 137 | true |
138 | 138 | ) |
139 | 139 | ); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $checksum_b = \hash(self::CHECKSUM_HASH_ALGO, $checked_bytes, true); |
198 | 198 | |
199 | 199 | /* Check if the checksum matches. */ |
200 | - if (! Core::hashEquals($checksum_a, $checksum_b)) { |
|
200 | + if (!Core::hashEquals($checksum_a, $checksum_b)) { |
|
201 | 201 | throw new Ex\BadFormatException( |
202 | 202 | "Data is corrupted, the checksum doesn't match" |
203 | 203 | ); |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * here in order to make the API simpler, avoiding the need to |
95 | 95 | * document that this method might throw an Ex\BadFormatException. */ |
96 | 96 | throw new Ex\WrongKeyOrModifiedCiphertextException( |
97 | - "The decrypted key was found to be in an invalid format. " . |
|
97 | + "The decrypted key was found to be in an invalid format. ". |
|
98 | 98 | "This very likely indicates it was modified by an attacker." |
99 | 99 | ); |
100 | 100 | } |
@@ -38,24 +38,24 @@ discard block |
||
38 | 38 | abstract class adLDAPCollection |
39 | 39 | { |
40 | 40 | /** |
41 | - * The current adLDAP connection via dependency injection |
|
42 | - * |
|
43 | - * @var adLDAP |
|
44 | - */ |
|
41 | + * The current adLDAP connection via dependency injection |
|
42 | + * |
|
43 | + * @var adLDAP |
|
44 | + */ |
|
45 | 45 | protected $adldap; |
46 | 46 | |
47 | 47 | /** |
48 | - * The current object being modifed / called |
|
49 | - * |
|
50 | - * @var mixed |
|
51 | - */ |
|
48 | + * The current object being modifed / called |
|
49 | + * |
|
50 | + * @var mixed |
|
51 | + */ |
|
52 | 52 | protected $currentObject; |
53 | 53 | |
54 | 54 | /** |
55 | - * The raw info array from Active Directory |
|
56 | - * |
|
57 | - * @var array |
|
58 | - */ |
|
55 | + * The raw info array from Active Directory |
|
56 | + * |
|
57 | + * @var array |
|
58 | + */ |
|
59 | 59 | protected $info; |
60 | 60 | |
61 | 61 | public function __construct($info, adLDAP $adldap) { |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | - * Set the raw info array from Active Directory |
|
68 | - * |
|
69 | - * @param array $info |
|
70 | - */ |
|
67 | + * Set the raw info array from Active Directory |
|
68 | + * |
|
69 | + * @param array $info |
|
70 | + */ |
|
71 | 71 | public function setInfo(array $info) { |
72 | 72 | if ($this->info && sizeof($info) >= 1) { |
73 | 73 | unset($this->info); |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * Magic get method to retrieve data from the raw array in a formatted way |
|
80 | - * |
|
81 | - * @param string $attribute |
|
82 | - * @return mixed |
|
83 | - */ |
|
79 | + * Magic get method to retrieve data from the raw array in a formatted way |
|
80 | + * |
|
81 | + * @param string $attribute |
|
82 | + * @return mixed |
|
83 | + */ |
|
84 | 84 | public function __get($attribute) { |
85 | 85 | if (isset($this->info[0]) && is_array($this->info[0])) { |
86 | 86 | foreach ($this->info[0] as $keyAttr => $valueAttr) { |
@@ -106,20 +106,20 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Magic set method to update an attribute |
|
110 | - * |
|
111 | - * @param string $attribute |
|
112 | - * @param string $value |
|
113 | - * @return bool |
|
114 | - */ |
|
109 | + * Magic set method to update an attribute |
|
110 | + * |
|
111 | + * @param string $attribute |
|
112 | + * @param string $value |
|
113 | + * @return bool |
|
114 | + */ |
|
115 | 115 | abstract public function __set($attribute, $value); |
116 | 116 | |
117 | 117 | /** |
118 | - * Magic isset method to check for the existence of an attribute |
|
119 | - * |
|
120 | - * @param string $attribute |
|
121 | - * @return bool |
|
122 | - */ |
|
118 | + * Magic isset method to check for the existence of an attribute |
|
119 | + * |
|
120 | + * @param string $attribute |
|
121 | + * @return bool |
|
122 | + */ |
|
123 | 123 | public function __isset($attribute) { |
124 | 124 | if (isset($this->info[0]) && is_array($this->info[0])) { |
125 | 125 | foreach ($this->info[0] as $keyAttr => $valueAttr) { |
@@ -129,6 +129,6 @@ discard block |
||
129 | 129 | } |
130 | 130 | } |
131 | 131 | return false; |
132 | - } |
|
132 | + } |
|
133 | 133 | } |
134 | 134 | ?> |
@@ -91,7 +91,7 @@ |
||
91 | 91 | else { |
92 | 92 | $array = array(); |
93 | 93 | foreach ($this->info[0][strtolower($attribute)] as $key => $value) { |
94 | - if ((string)$key != 'count') { |
|
94 | + if ((string) $key != 'count') { |
|
95 | 95 | $array[$key] = $value; |
96 | 96 | } |
97 | 97 | } |
@@ -87,8 +87,7 @@ discard block |
||
87 | 87 | if (strtolower($keyAttr) == strtolower($attribute)) { |
88 | 88 | if ($this->info[0][strtolower($attribute)]['count'] == 1) { |
89 | 89 | return $this->info[0][strtolower($attribute)][0]; |
90 | - } |
|
91 | - else { |
|
90 | + } else { |
|
92 | 91 | $array = array(); |
93 | 92 | foreach ($this->info[0][strtolower($attribute)] as $key => $value) { |
94 | 93 | if ((string)$key != 'count') { |
@@ -99,8 +98,7 @@ discard block |
||
99 | 98 | } |
100 | 99 | } |
101 | 100 | } |
102 | - } |
|
103 | - else { |
|
101 | + } else { |
|
104 | 102 | return NULL; |
105 | 103 | } |
106 | 104 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | function exportItemsToFile() |
167 | 167 | { |
168 | - $("#export_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?> ... <span id="export_progress">0%</span>').attr("class","").show(); |
|
168 | + $("#export_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?> ... <span id="export_progress">0%</span>').attr("class","").show(); |
|
169 | 169 | |
170 | 170 | //Get list of selected folders |
171 | 171 | var ids = ""; |
@@ -175,20 +175,20 @@ discard block |
||
175 | 175 | }); |
176 | 176 | |
177 | 177 | if (ids == "") { |
178 | - $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['error_no_selected_folder'];?>").attr("class","ui-state-error"); |
|
178 | + $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['error_no_selected_folder']; ?>").attr("class","ui-state-error"); |
|
179 | 179 | setTimeout(function(){$("#export_information").effect( "fade", "slow" );}, 1000); |
180 | 180 | return; |
181 | 181 | } |
182 | 182 | |
183 | 183 | if ($("input[name='export_format']:checked").length == 0) { |
184 | - $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['error_export_format_not_selected'];?>").attr("class","ui-state-error"); |
|
184 | + $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['error_export_format_not_selected']; ?>").attr("class","ui-state-error"); |
|
185 | 185 | setTimeout(function(){$("#export_information").effect( "fade", "slow" );}, 1000); |
186 | 186 | return; |
187 | 187 | } |
188 | 188 | |
189 | 189 | // Get PDF encryption password and make sure it is set |
190 | 190 | if (($("#export_pdf_password").val() == "") && ($("input[name='export_format']:checked").val() == "pdf")) { |
191 | - $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['pdf_password_warning'];?>").attr("class","ui-state-error"); |
|
191 | + $("#export_information").show().html("<i class='fa fa-exclamation-circle'></i> <?php echo $LANG['pdf_password_warning']; ?>").attr("class","ui-state-error"); |
|
192 | 192 | setTimeout(function(){$("#export_information").effect( "fade", "slow" );}, 1000); |
193 | 193 | return; |
194 | 194 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | type : "open_kb", |
33 | 33 | id : id, |
34 | - key : "<?php echo $_SESSION['key'];?>" |
|
34 | + key : "<?php echo $_SESSION['key']; ?>" |
|
35 | 35 | }, |
36 | 36 | function(data) { |
37 | 37 | data = $.parseJSON(data); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | type : "duplicate_suggestion", |
73 | 73 | id : $("#suggestion_id").val(), |
74 | - key : "<?php echo $_SESSION['key'];?>" |
|
74 | + key : "<?php echo $_SESSION['key']; ?>" |
|
75 | 75 | }, |
76 | 76 | function(data) { |
77 | 77 | if (data[0].status == "no") { |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | { |
102 | 102 | type : "get_complexity_level", |
103 | 103 | folder_id : $("#suggestion_folder").val(), |
104 | - key : "<?php echo $_SESSION['key'];?>" |
|
104 | + key : "<?php echo $_SESSION['key']; ?>" |
|
105 | 105 | }, |
106 | 106 | function(data) { |
107 | 107 | if (data[0].status == "ok") { |
108 | 108 | $("#complexity_required").val(data[0].complexity); |
109 | - $("#complexity_required_text").html("[<?php echo $LANG['complex_asked'];?> <span style=\"color:#D04806; font-weight:bold;\">"+data[0].complexity_text+"</span>]"); |
|
109 | + $("#complexity_required_text").html("[<?php echo $LANG['complex_asked']; ?> <span style=\"color:#D04806; font-weight:bold;\">"+data[0].complexity_text+"</span>]"); |
|
110 | 110 | } |
111 | 111 | $("#pw_wait").hide(); |
112 | 112 | }, |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | "sAjaxSource": "sources/datatable/datatable.suggestion.php", |
139 | 139 | "bJQueryUI": true, |
140 | 140 | "oLanguage": { |
141 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
141 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
142 | 142 | }, |
143 | 143 | "columns": [ |
144 | 144 | {"width": "7%", className: "dt-body-left"}, |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | "sAjaxSource": "sources/datatable/datatable.suggestion.php", |
165 | 165 | "bJQueryUI": true, |
166 | 166 | "oLanguage": { |
167 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
167 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
168 | 168 | }, |
169 | 169 | "columns": [ |
170 | 170 | {"width": "7%", className: "dt-body-left"}, |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | "sAjaxSource": "sources/datatable/datatable.items_change.php", |
187 | 187 | "bJQueryUI": true, |
188 | 188 | "oLanguage": { |
189 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
189 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
190 | 190 | }, |
191 | 191 | "columns": [ |
192 | 192 | {"width": "5%", className: "dt-body-left"}, |
@@ -211,15 +211,15 @@ discard block |
||
211 | 211 | autoOpen: false, |
212 | 212 | width: 300, |
213 | 213 | height: 150, |
214 | - title: "<?php echo $LANG['suggestion_delete_confirm'];?>", |
|
214 | + title: "<?php echo $LANG['suggestion_delete_confirm']; ?>", |
|
215 | 215 | buttons: { |
216 | - "<?php echo $LANG['del_button'];?>": function() { |
|
216 | + "<?php echo $LANG['del_button']; ?>": function() { |
|
217 | 217 | $.post( |
218 | 218 | "sources/suggestion.queries.php", |
219 | 219 | { |
220 | 220 | type : "delete_suggestion", |
221 | 221 | id : $("#suggestion_id").val(), |
222 | - key : "<?php echo $_SESSION['key'];?>" |
|
222 | + key : "<?php echo $_SESSION['key']; ?>" |
|
223 | 223 | }, |
224 | 224 | function(data) { |
225 | 225 | $("#div_suggestion_delete").dialog("close"); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | ) |
230 | 230 | }, |
231 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
231 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
232 | 232 | $(this).dialog("close"); |
233 | 233 | } |
234 | 234 | } |
@@ -241,19 +241,19 @@ discard block |
||
241 | 241 | autoOpen: false, |
242 | 242 | width: 400, |
243 | 243 | height: 240, |
244 | - title: "<?php echo $LANG['suggestion_validate_confirm'];?>", |
|
244 | + title: "<?php echo $LANG['suggestion_validate_confirm']; ?>", |
|
245 | 245 | open: function( event, ui ) { |
246 | 246 | $("#suggestion_edit_wait").hide(); |
247 | 247 | }, |
248 | 248 | buttons: { |
249 | - "<?php echo $LANG['confirm'];?>": function() { |
|
249 | + "<?php echo $LANG['confirm']; ?>": function() { |
|
250 | 250 | $("#suggestion_edit_wait").show(); |
251 | 251 | $.post( |
252 | 252 | "sources/suggestion.queries.php", |
253 | 253 | { |
254 | 254 | type : "validate_suggestion", |
255 | 255 | id : $("#suggestion_id").val(), |
256 | - key : "<?php echo $_SESSION['key'];?>" |
|
256 | + key : "<?php echo $_SESSION['key']; ?>" |
|
257 | 257 | }, |
258 | 258 | function(data) { |
259 | 259 | if (data[0].status == "done") { |
@@ -261,13 +261,13 @@ discard block |
||
261 | 261 | oTable.fnDraw(); |
262 | 262 | $("#div_suggestion_validate").dialog("close"); |
263 | 263 | } else if (data[0].status = "error_when_creating") { |
264 | - $("#suggestion_error").show().html("<?php echo $LANG['suggestion_error_cannot_add'];?>").addClass("ui-state-error"); |
|
264 | + $("#suggestion_error").show().html("<?php echo $LANG['suggestion_error_cannot_add']; ?>").addClass("ui-state-error"); |
|
265 | 265 | } |
266 | 266 | }, |
267 | 267 | "json" |
268 | 268 | ) |
269 | 269 | }, |
270 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
270 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
271 | 271 | $(this).dialog("close"); |
272 | 272 | } |
273 | 273 | } |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | autoOpen: false, |
281 | 281 | width: 450, |
282 | 282 | height: 550, |
283 | - title: "<?php echo $LANG['suggestion_add'];?>", |
|
283 | + title: "<?php echo $LANG['suggestion_add']; ?>", |
|
284 | 284 | buttons: { |
285 | - "<?php echo $LANG['save_button'];?>": function() { |
|
285 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
286 | 286 | $("#suggestion_error").hide(); |
287 | 287 | if ($("#suggestion_label").val() == "") { |
288 | 288 | $("#suggestion_label").addClass("ui-state-error"); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | } else if ($("#suggestion_folder").val() == "") { |
292 | 292 | $("#suggestion_folder").addClass("ui-state-error"); |
293 | 293 | } else if (parseInt($("#password_complexity").val()) < parseInt($("#complexity_required").val())) { |
294 | - $("#suggestion_error").show().html("<?php echo $LANG['error_complex_not_enought'];?>").addClass("ui-state-error"); |
|
294 | + $("#suggestion_error").show().html("<?php echo $LANG['error_complex_not_enought']; ?>").addClass("ui-state-error"); |
|
295 | 295 | } else { |
296 | 296 | $("#add_suggestion_wait").show(); |
297 | 297 | var data = '{"label":"'+sanitizeString($("#suggestion_label").val())+ |
@@ -303,8 +303,8 @@ discard block |
||
303 | 303 | $.post("sources/suggestion.queries.php", |
304 | 304 | { |
305 | 305 | type : "add_new", |
306 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
307 | - key : "<?php echo $_SESSION['key'];?>" |
|
306 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
307 | + key : "<?php echo $_SESSION['key']; ?>" |
|
308 | 308 | }, |
309 | 309 | function(data) { |
310 | 310 | if (data[0].status == "done") { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | oTable.fnDraw(); |
313 | 313 | $("#suggestion_form").dialog("close"); |
314 | 314 | } else if (data[0].status = "duplicate_suggestion") { |
315 | - $("#suggestion_error").show().html("<?php echo $LANG['suggestion_error_duplicate'];?>").addClass("ui-state-error"); |
|
315 | + $("#suggestion_error").show().html("<?php echo $LANG['suggestion_error_duplicate']; ?>").addClass("ui-state-error"); |
|
316 | 316 | } |
317 | 317 | $("#add_suggestion_wait").hide(); |
318 | 318 | }, |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | ); |
321 | 321 | } |
322 | 322 | }, |
323 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
323 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
324 | 324 | $(this).dialog("close"); |
325 | 325 | } |
326 | 326 | }, |
@@ -343,10 +343,10 @@ discard block |
||
343 | 343 | autoOpen: false, |
344 | 344 | width: 700, |
345 | 345 | height: 400, |
346 | - title: "<?php echo $LANG['suggestion_delete_confirm'];?>", |
|
346 | + title: "<?php echo $LANG['suggestion_delete_confirm']; ?>", |
|
347 | 347 | buttons: { |
348 | - "<?php echo $LANG['approve'];?>": function() { |
|
349 | - $("#suggestion_view_wait").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."...";?>").show(); |
|
348 | + "<?php echo $LANG['approve']; ?>": function() { |
|
349 | + $("#suggestion_view_wait").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."..."; ?>").show(); |
|
350 | 350 | |
351 | 351 | // select fields to update |
352 | 352 | var fields_to_update = ""; |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | type : "approve_item_change", |
363 | 363 | id : $("#suggestion_id").val(), |
364 | 364 | data : fields_to_update, |
365 | - key : "<?php echo $_SESSION['key'];?>" |
|
365 | + key : "<?php echo $_SESSION['key']; ?>" |
|
366 | 366 | }, |
367 | 367 | function(data) { |
368 | 368 | if (data[0].error === "") { |
@@ -382,18 +382,18 @@ discard block |
||
382 | 382 | "json" |
383 | 383 | ) |
384 | 384 | }, |
385 | - "<?php echo $LANG['reject'];?>": function() { |
|
386 | - $("#suggestion_view_wait").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."...";?>").show(); |
|
385 | + "<?php echo $LANG['reject']; ?>": function() { |
|
386 | + $("#suggestion_view_wait").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."..."; ?>").show(); |
|
387 | 387 | $.post( |
388 | 388 | "sources/suggestion.queries.php", |
389 | 389 | { |
390 | 390 | type : "reject_item_change", |
391 | 391 | id : $("#suggestion_id").val(), |
392 | - key : "<?php echo $_SESSION['key'];?>" |
|
392 | + key : "<?php echo $_SESSION['key']; ?>" |
|
393 | 393 | }, |
394 | 394 | function(data) { |
395 | 395 | |
396 | - $("#suggestion_view_wait").html("<?php echo $LANG['alert_message_done'];?>"); |
|
396 | + $("#suggestion_view_wait").html("<?php echo $LANG['alert_message_done']; ?>"); |
|
397 | 397 | oTable = $("#t_change").dataTable(); |
398 | 398 | oTable.fnDraw(); |
399 | 399 | setTimeout( |
@@ -405,24 +405,24 @@ discard block |
||
405 | 405 | } |
406 | 406 | ) |
407 | 407 | }, |
408 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
408 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
409 | 409 | $(this).dialog("close"); |
410 | 410 | } |
411 | 411 | }, |
412 | 412 | open: function (event, ui) { |
413 | - $("#div_suggestion_html").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."...";?>"); |
|
413 | + $("#div_suggestion_html").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."..."; ?>"); |
|
414 | 414 | |
415 | 415 | // load change |
416 | 416 | $.post("sources/suggestion.queries.php", |
417 | 417 | { |
418 | 418 | type : "get_item_change_detail", |
419 | 419 | id : $("#suggestion_id").val(), |
420 | - key : "<?php echo $_SESSION['key'];?>" |
|
420 | + key : "<?php echo $_SESSION['key']; ?>" |
|
421 | 421 | }, |
422 | 422 | function(data) { |
423 | 423 | //decrypt data |
424 | 424 | try { |
425 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
425 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
426 | 426 | } catch (e) { |
427 | 427 | // error |
428 | 428 | return; |
@@ -451,35 +451,35 @@ discard block |
||
451 | 451 | $("#suggestion_pwd").simplePassMeter({ |
452 | 452 | "requirements": {}, |
453 | 453 | "container": "#pw_strength", |
454 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
454 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
455 | 455 | "ratings": [ |
456 | 456 | {"minScore": 0, |
457 | 457 | "className": "meterFail", |
458 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
458 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
459 | 459 | }, |
460 | 460 | {"minScore": 25, |
461 | 461 | "className": "meterWarn", |
462 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
462 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
463 | 463 | }, |
464 | 464 | {"minScore": 50, |
465 | 465 | "className": "meterWarn", |
466 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
466 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
467 | 467 | }, |
468 | 468 | {"minScore": 60, |
469 | 469 | "className": "meterGood", |
470 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
470 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
471 | 471 | }, |
472 | 472 | {"minScore": 70, |
473 | 473 | "className": "meterGood", |
474 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
474 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
475 | 475 | }, |
476 | 476 | {"minScore": 80, |
477 | 477 | "className": "meterExcel", |
478 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
478 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
479 | 479 | }, |
480 | 480 | {"minScore": 90, |
481 | 481 | "className": "meterExcel", |
482 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
482 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
483 | 483 | } |
484 | 484 | ] |
485 | 485 | }); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | type : "open_kb", |
29 | 29 | id : id, |
30 | - key : "<?php echo $_SESSION['key'];?>" |
|
30 | + key : "<?php echo $_SESSION['key']; ?>" |
|
31 | 31 | }, |
32 | 32 | function(data) { |
33 | 33 | data = $.parseJSON(data); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | "sAjaxSource": "sources/datatable/datatable.kb.php", |
67 | 67 | "bJQueryUI": true, |
68 | 68 | "oLanguage": { |
69 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
69 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
70 | 70 | } |
71 | 71 | }); |
72 | 72 | |
@@ -77,15 +77,15 @@ discard block |
||
77 | 77 | autoOpen: false, |
78 | 78 | width: 300, |
79 | 79 | height: 150, |
80 | - title: "<?php echo $LANG['item_menu_del_elem'];?>", |
|
80 | + title: "<?php echo $LANG['item_menu_del_elem']; ?>", |
|
81 | 81 | buttons: { |
82 | - "<?php echo $LANG['del_button'];?>": function() { |
|
82 | + "<?php echo $LANG['del_button']; ?>": function() { |
|
83 | 83 | $.post( |
84 | 84 | "sources/kb.queries.php", |
85 | 85 | { |
86 | 86 | type : "delete_kb", |
87 | 87 | id : $("#kb_id").val(), |
88 | - key : "<?php echo $_SESSION['key'];?>" |
|
88 | + key : "<?php echo $_SESSION['key']; ?>" |
|
89 | 89 | }, |
90 | 90 | function(data) { |
91 | 91 | $("#div_kb_delete").dialog("close"); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | ) |
96 | 96 | }, |
97 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
97 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
98 | 98 | $(this).dialog("close"); |
99 | 99 | } |
100 | 100 | } |
@@ -107,9 +107,9 @@ discard block |
||
107 | 107 | autoOpen: false, |
108 | 108 | width: 900, |
109 | 109 | height: 600, |
110 | - title: "<?php echo $LANG['kb_form'];?>", |
|
110 | + title: "<?php echo $LANG['kb_form']; ?>", |
|
111 | 111 | buttons: { |
112 | - "<?php echo $LANG['save_button'];?>": function() { |
|
112 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
113 | 113 | if ($("#kb_label").val() == "") { |
114 | 114 | $("#kb_label").addClass("ui-state-error"); |
115 | 115 | } else if ($("#kb_category").val() == "") { |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | $.post("sources/kb.queries.php", |
131 | 131 | { |
132 | 132 | type : "kb_in_db", |
133 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
134 | - key : "<?php echo $_SESSION['key'];?>" |
|
133 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
134 | + key : "<?php echo $_SESSION['key']; ?>" |
|
135 | 135 | }, |
136 | 136 | function(data) { |
137 | 137 | if (data[0].status == "done") { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ); |
145 | 145 | } |
146 | 146 | }, |
147 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
147 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
148 | 148 | $(this).dialog("close"); |
149 | 149 | } |
150 | 150 | }, |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | $("#kb_associated_to").multiselect(); |
154 | 154 | var instance = CKEDITOR.instances["kb_description"]; |
155 | 155 | if (instance) { |
156 | - CKEDITOR.replace("kb_description",{toolbar:"Full", height: 250,language: "<?php echo $_SESSION['user_language_code'];?>"}); |
|
156 | + CKEDITOR.replace("kb_description",{toolbar:"Full", height: 250,language: "<?php echo $_SESSION['user_language_code']; ?>"}); |
|
157 | 157 | } else { |
158 | - $("#kb_description").ckeditor({toolbar:"Full", height: 250,language: "<?php echo $_SESSION['user_language_code'];?>"}); |
|
158 | + $("#kb_description").ckeditor({toolbar:"Full", height: 250,language: "<?php echo $_SESSION['user_language_code']; ?>"}); |
|
159 | 159 | } |
160 | 160 | }, |
161 | 161 | close: function(event,ui) { |
@@ -16,7 +16,7 @@ |
||
16 | 16 | !isset($_SESSION['CPM']) || $_SESSION['CPM'] != 1 || |
17 | 17 | !isset($_SESSION['user_id']) || empty($_SESSION['user_id']) || |
18 | 18 | !isset($_SESSION['key']) || empty($_SESSION['key']) |
19 | -){ |
|
19 | +) { |
|
20 | 20 | die('Hacking attempt...'); |
21 | 21 | } |
22 | 22 |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | <td> |
197 | 197 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
198 | 198 | <label>' . |
199 | - $LANG['settings_enable_sts'] . ' |
|
199 | + $LANG['settings_enable_sts'] . ' |
|
200 | 200 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_enable_sts_tip']), ENT_QUOTES).'"></i> |
201 | 201 | </label> |
202 | 202 | </td> |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | </tr>'; |
1154 | 1154 | |
1155 | 1155 | // AD Port |
1156 | - echo ' |
|
1156 | + echo ' |
|
1157 | 1157 | <tr> |
1158 | 1158 | <td><label for="ldap_port">'.$LANG['settings_ldap_port'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_port_tip']), ENT_QUOTES).'"></i></label></td> |
1159 | 1159 | <td><input type="text" size="50" id="ldap_port" name="ldap_port" class="text ui-widget-content" title="389" value="', isset($_SESSION['settings']['ldap_port']) ? $_SESSION['settings']['ldap_port'] : '389', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | <td> |
197 | 197 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
198 | 198 | <label>' . |
199 | - $LANG['settings_enable_sts'] . ' |
|
199 | + $LANG['settings_enable_sts'].' |
|
200 | 200 | <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_enable_sts_tip']), ENT_QUOTES).'"></i> |
201 | 201 | </label> |
202 | 202 | </td> |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | </td> |
290 | 290 | <td> |
291 | 291 | <select id="date_format" name="date_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
292 | - <option value="d/m/Y"', !isset($_SESSION['settings']['date_format']) || $_SESSION['settings']['date_format'] == "d/m/Y" ? ' selected="selected"':"", '>d/m/Y</option> |
|
293 | - <option value="m/d/Y"', $_SESSION['settings']['date_format'] == "m/d/Y" ? ' selected="selected"':"", '>m/d/Y</option> |
|
294 | - <option value="d-M-Y"', $_SESSION['settings']['date_format'] == "d-M-Y" ? ' selected="selected"':"", '>d-M-Y</option> |
|
295 | - <option value="d/m/y"', $_SESSION['settings']['date_format'] == "d/m/y" ? ' selected="selected"':"", '>d/m/y</option> |
|
296 | - <option value="m/d/y"', $_SESSION['settings']['date_format'] == "m/d/y" ? ' selected="selected"':"", '>m/d/y</option> |
|
297 | - <option value="d-M-y"', $_SESSION['settings']['date_format'] == "d-M-y" ? ' selected="selected"':"", '>d-M-y</option> |
|
298 | - <option value="d-m-y"', $_SESSION['settings']['date_format'] == "d-m-y" ? ' selected="selected"':"", '>d-m-y</option> |
|
299 | - <option value="Y-m-d"', $_SESSION['settings']['date_format'] == "Y-m-d" ? ' selected="selected"':"", '>Y-m-d</option> |
|
292 | + <option value="d/m/Y"', !isset($_SESSION['settings']['date_format']) || $_SESSION['settings']['date_format'] == "d/m/Y" ? ' selected="selected"' : "", '>d/m/Y</option> |
|
293 | + <option value="m/d/Y"', $_SESSION['settings']['date_format'] == "m/d/Y" ? ' selected="selected"' : "", '>m/d/Y</option> |
|
294 | + <option value="d-M-Y"', $_SESSION['settings']['date_format'] == "d-M-Y" ? ' selected="selected"' : "", '>d-M-Y</option> |
|
295 | + <option value="d/m/y"', $_SESSION['settings']['date_format'] == "d/m/y" ? ' selected="selected"' : "", '>d/m/y</option> |
|
296 | + <option value="m/d/y"', $_SESSION['settings']['date_format'] == "m/d/y" ? ' selected="selected"' : "", '>m/d/y</option> |
|
297 | + <option value="d-M-y"', $_SESSION['settings']['date_format'] == "d-M-y" ? ' selected="selected"' : "", '>d-M-y</option> |
|
298 | + <option value="d-m-y"', $_SESSION['settings']['date_format'] == "d-m-y" ? ' selected="selected"' : "", '>d-m-y</option> |
|
299 | + <option value="Y-m-d"', $_SESSION['settings']['date_format'] == "Y-m-d" ? ' selected="selected"' : "", '>Y-m-d</option> |
|
300 | 300 | </select> |
301 | 301 | </td> |
302 | 302 | </tr>'; |
@@ -309,10 +309,10 @@ discard block |
||
309 | 309 | </td> |
310 | 310 | <td> |
311 | 311 | <select id="time_format" name="time_format" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
312 | - <option value="H:i:s"', !isset($_SESSION['settings']['time_format']) || $_SESSION['settings']['time_format'] == "H:i:s" ? ' selected="selected"':"", '>H:i:s</option> |
|
313 | - <option value="h:m:s a"', $_SESSION['settings']['time_format'] == "h:i:s a" ? ' selected="selected"':"", '>h:i:s a</option> |
|
314 | - <option value="g:i:s a"', $_SESSION['settings']['time_format'] == "g:i:s a" ? ' selected="selected"':"", '>g:i:s a</option> |
|
315 | - <option value="G:i:s"', $_SESSION['settings']['time_format'] == "G:i:s" ? ' selected="selected"':"", '>G:i:s</option> |
|
312 | + <option value="H:i:s"', !isset($_SESSION['settings']['time_format']) || $_SESSION['settings']['time_format'] == "H:i:s" ? ' selected="selected"' : "", '>H:i:s</option> |
|
313 | + <option value="h:m:s a"', $_SESSION['settings']['time_format'] == "h:i:s a" ? ' selected="selected"' : "", '>h:i:s a</option> |
|
314 | + <option value="g:i:s a"', $_SESSION['settings']['time_format'] == "g:i:s a" ? ' selected="selected"' : "", '>g:i:s a</option> |
|
315 | + <option value="G:i:s"', $_SESSION['settings']['time_format'] == "G:i:s" ? ' selected="selected"' : "", '>G:i:s</option> |
|
316 | 316 | </select> |
317 | 317 | </td> |
318 | 318 | </tr>'; |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | </td></tr>'; |
863 | 863 | // Enable Item modification by anyone by default |
864 | 864 | echo ' |
865 | - <tr id="tr_option_anyone_can_modify_bydefault"', isset($_SESSION['settings']['anyone_can_modify']) && $_SESSION['settings']['anyone_can_modify'] == 1 ? '':' style="display:none;"', '><td> |
|
865 | + <tr id="tr_option_anyone_can_modify_bydefault"', isset($_SESSION['settings']['anyone_can_modify']) && $_SESSION['settings']['anyone_can_modify'] == 1 ? '' : ' style="display:none;"', '><td> |
|
866 | 866 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
867 | 867 | <label>'.htmlentities(strip_tags($LANG['settings_anyone_can_modify_bydefault'])).'</label> |
868 | 868 | </td><td> |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | </td></tr>'; |
879 | 879 | // enable restricted_to_roles |
880 | 880 | echo ' |
881 | - <tr id="tr_option_restricted_to_roles" style="display:', isset($_SESSION['settings']['restricted_to']) && $_SESSION['settings']['restricted_to'] == 1 ? 'inline':'none', ';"><td> |
|
881 | + <tr id="tr_option_restricted_to_roles" style="display:', isset($_SESSION['settings']['restricted_to']) && $_SESSION['settings']['restricted_to'] == 1 ? 'inline' : 'none', ';"><td> |
|
882 | 882 | <i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;"> </i> |
883 | 883 | <label>'.$LANG['restricted_to_roles'].'</label> |
884 | 884 | </td><td> |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | } |
1068 | 1068 | // LDAP inputs |
1069 | 1069 | echo ' |
1070 | - <div id="div_ldap_configuration" ', (isset($_SESSION['settings']['ldap_mode']) && $_SESSION['settings']['ldap_mode'] == 1) ? '':' style="display:none;"' , '> |
|
1070 | + <div id="div_ldap_configuration" ', (isset($_SESSION['settings']['ldap_mode']) && $_SESSION['settings']['ldap_mode'] == 1) ? '' : ' style="display:none;"', '> |
|
1071 | 1071 | <div style="font-weight:bold;font-size:14px;margin:15px 0px 8px 0px;">'.$LANG['admin_ldap_configuration'].'</div> |
1072 | 1072 | <table id="ldap_config_values">'; |
1073 | 1073 | // Type |
@@ -1086,14 +1086,14 @@ discard block |
||
1086 | 1086 | </tr>'; |
1087 | 1087 | // Domain |
1088 | 1088 | echo ' |
1089 | - <tr style="display:', (isset($ldap_type)) ? '' : 'none' , '" class="tr-windows tr-ldap tr-posix tr-posix-search"> |
|
1089 | + <tr style="display:', (isset($ldap_type)) ? '' : 'none', '" class="tr-windows tr-ldap tr-posix tr-posix-search"> |
|
1090 | 1090 | <td><label for="ldap_suffix">'.$LANG['settings_ldap_domain'].'</label></td> |
1091 | 1091 | <td><input type="text" size="50" id="ldap_suffix" name="ldap_suffix" class="text ui-widget-content" title="@dc=example,dc=com" value="', isset($_SESSION['settings']['ldap_suffix']) ? $_SESSION['settings']['ldap_suffix'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1092 | 1092 | </tr>'; |
1093 | 1093 | |
1094 | 1094 | // Domain DN |
1095 | 1095 | echo ' |
1096 | - <tr style="display:', (isset($ldap_type) && $ldap_type != 'posix-search') ? '' : 'none' , '" class="tr-windows tr-posix tr-ldap"> |
|
1096 | + <tr style="display:', (isset($ldap_type) && $ldap_type != 'posix-search') ? '' : 'none', '" class="tr-windows tr-posix tr-ldap"> |
|
1097 | 1097 | <td><label for="ldap_domain_dn">'.$LANG['settings_ldap_domain_dn'].'</label></td> |
1098 | 1098 | <td><input type="text" size="50" id="ldap_domain_dn" name="ldap_domain_dn" class="text ui-widget-content" title="dc=example,dc=com" value="', isset($_SESSION['settings']['ldap_domain_dn']) ? $_SESSION['settings']['ldap_domain_dn'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1099 | 1099 | </tr>'; |
@@ -1108,39 +1108,39 @@ discard block |
||
1108 | 1108 | // LDAP username attribute |
1109 | 1109 | // LDAP Object Class |
1110 | 1110 | echo ' |
1111 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1111 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1112 | 1112 | <td><label for="ldap_object_class">'.$LANG['settings_ldap_object_class'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_object_class_tip']), ENT_QUOTES).'"></i></label></td> |
1113 | 1113 | <td><input type="text" size="50" id="ldap_object_class" name="ldap_object_class" class="text ui-widget-content" title="Person" value="', |
1114 | 1114 | isset($_SESSION['settings']['ldap_object_class']) ? $_SESSION['settings']['ldap_object_class'] : 'posixAccount', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1115 | 1115 | </tr>'; |
1116 | 1116 | echo ' |
1117 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1117 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1118 | 1118 | <td><label for="ldap_user_attribute">'.$LANG['settings_ldap_user_attribute'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_user_attribute_tip']), ENT_QUOTES).'"></i></label></td> |
1119 | 1119 | <td><input type="text" size="50" id="ldap_user_attribute" name="ldap_user_attribute" class="text ui-widget-content" title="uid" value="', |
1120 | 1120 | isset($_SESSION['settings']['ldap_user_attribute']) ? $_SESSION['settings']['ldap_user_attribute'] : 'uid', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1121 | 1121 | </tr>'; |
1122 | 1122 | // LDAP |
1123 | 1123 | echo ' |
1124 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1124 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1125 | 1125 | <td><label for="ldap_usergroup">'.$LANG['settings_ldap_usergroup'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_usergroup_tip']), ENT_QUOTES).'"></i></label></td> |
1126 | 1126 | <td><input type="text" size="50" id="ldap_usergroup" name="ldap_usergroup" class="text ui-widget-content" title="uid" value="', |
1127 | 1127 | isset($_SESSION['settings']['ldap_usergroup']) ? $_SESSION['settings']['ldap_usergroup'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1128 | 1128 | </tr>'; |
1129 | 1129 | // LDAP BIND DN for search |
1130 | 1130 | echo ' |
1131 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1131 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1132 | 1132 | <td><label for="ldap_bind_dn">'.$LANG['settings_ldap_bind_dn'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_bind_dn_tip']), ENT_QUOTES).'"></i></label></td> |
1133 | 1133 | <td><input type="text" size="50" id="ldap_bind_dn" name="ldap_bind_dn" class="text ui-widget-content" title="uid=teampass,ou=people,dc=mydomain,dc=local" value="', isset($_SESSION['settings']['ldap_bind_dn']) ? $_SESSION['settings']['ldap_bind_dn'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1134 | 1134 | </tr>'; |
1135 | 1135 | // LDAP BIND PASSWD for search |
1136 | 1136 | echo ' |
1137 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1137 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1138 | 1138 | <td><label for="ldap_bind_passwd">'.$LANG['settings_ldap_bind_passwd'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_bind_passwd_tip']), ENT_QUOTES).'"></i></label></td> |
1139 | 1139 | <td><input type="text" size="50" id="ldap_bind_passwd" name="ldap_bind_passwd" class="text ui-widget-content" title="123password456" value="', isset($_SESSION['settings']['ldap_bind_passwd']) ? $_SESSION['settings']['ldap_bind_passwd'] : '', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1140 | 1140 | </tr>'; |
1141 | 1141 | // LDAP BASE for search |
1142 | 1142 | echo ' |
1143 | - <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none' , '" class="tr-posix-search tr-ldap"> |
|
1143 | + <tr style="display:', (isset($ldap_type) && $ldap_type === 'posix-search') ? '' : 'none', '" class="tr-posix-search tr-ldap"> |
|
1144 | 1144 | <td><label for="ldap_search_base">'.$LANG['settings_ldap_search_base'].' <i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['settings_ldap_search_base_tip']), ENT_QUOTES).'"></i></label></td> |
1145 | 1145 | <td><input type="text" size="50" id="ldap_search_base" name="ldap_search_base" class="text ui-widget-content" title="ou=people,dc=octopoos,dc=local" value="', isset($_SESSION['settings']['ldap_search_base']) ? $_SESSION['settings']['ldap_search_base'] : '', '" onchange="updateSetting($(this).attr(\'id\'));" /></td> |
1146 | 1146 | </tr>'; |
@@ -1440,9 +1440,9 @@ discard block |
||
1440 | 1440 | </td> |
1441 | 1441 | <td> |
1442 | 1442 | <select id="email_security" name="email_security" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));"> |
1443 | - <option value="none"', !isset($_SESSION['settings']['email_security']) || $_SESSION['settings']['email_security'] == "none" ? ' selected="selected"':"", '>None</option> |
|
1444 | - <option value="ssl"', isset($_SESSION['settings']['email_security']) && $_SESSION['settings']['email_security'] == "ssl" ? ' selected="selected"':"", '>SSL</option> |
|
1445 | - <option value="tls"', isset($_SESSION['settings']['email_security']) && $_SESSION['settings']['email_security'] == "tls" ? ' selected="selected"':"", '>TLS</option> |
|
1443 | + <option value="none"', !isset($_SESSION['settings']['email_security']) || $_SESSION['settings']['email_security'] == "none" ? ' selected="selected"' : "", '>None</option> |
|
1444 | + <option value="ssl"', isset($_SESSION['settings']['email_security']) && $_SESSION['settings']['email_security'] == "ssl" ? ' selected="selected"' : "", '>SSL</option> |
|
1445 | + <option value="tls"', isset($_SESSION['settings']['email_security']) && $_SESSION['settings']['email_security'] == "tls" ? ' selected="selected"' : "", '>TLS</option> |
|
1446 | 1446 | </select> |
1447 | 1447 | </td> |
1448 | 1448 | </tr>'; |
@@ -1594,8 +1594,7 @@ discard block |
||
1594 | 1594 | '</label> |
1595 | 1595 | </td><td> |
1596 | 1596 | <input type="text" size="5" id="upload_imageresize_width" name="upload_imageresize_width" value="', |
1597 | - isset($_SESSION['settings']['upload_imageresize_width']) ? $_SESSION['settings']['upload_imageresize_width'] : |
|
1598 | - '800', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1597 | + isset($_SESSION['settings']['upload_imageresize_width']) ? $_SESSION['settings']['upload_imageresize_width'] : '800', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1599 | 1598 | </td> |
1600 | 1599 | </tr> |
1601 | 1600 | <tr><td> |
@@ -1604,8 +1603,7 @@ discard block |
||
1604 | 1603 | '</label> |
1605 | 1604 | </td><td> |
1606 | 1605 | <input type="text" size="5" id="upload_imageresize_height" name="upload_imageresize_height" value="', |
1607 | - isset($_SESSION['settings']['upload_imageresize_height']) ? $_SESSION['settings']['upload_imageresize_height'] : |
|
1608 | - '600', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1606 | + isset($_SESSION['settings']['upload_imageresize_height']) ? $_SESSION['settings']['upload_imageresize_height'] : '600', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1609 | 1607 | </td> |
1610 | 1608 | </tr> |
1611 | 1609 | <tr><td> |
@@ -1614,8 +1612,7 @@ discard block |
||
1614 | 1612 | '</label> |
1615 | 1613 | </td><td> |
1616 | 1614 | <input type="text" size="5" id="upload_imageresize_quality" name="upload_imageresize_quality" value="', |
1617 | - isset($_SESSION['settings']['upload_imageresize_quality']) ? $_SESSION['settings']['upload_imageresize_quality'] : |
|
1618 | - '90', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1615 | + isset($_SESSION['settings']['upload_imageresize_quality']) ? $_SESSION['settings']['upload_imageresize_quality'] : '90', '" class="text ui-widget-content upl_img_opt" onchange="updateSetting($(this).attr(\'id\'));" /> |
|
1619 | 1616 | </td></tr>'; |
1620 | 1617 | echo ' |
1621 | 1618 | <tr><td colspan="3"><hr /></td></tr>'; |