Project

General

Profile

« Previous | Next » 

Revision 1313

Added by Dietmar over 14 years ago

show_menu2 remove unneeded code for WB < 2.7
class.wb.php, recoding backend preference
add a language variable $MESSAGE['PREFERENCES']['INVALID_CHARS']
update theme.css & preference.htt in argos_theme & wb_theme
remove classic_theme

View differences:

class.wb.php
26 26

  
27 27
class wb
28 28
{
29

  
30
	public $password_chars = 'a-zA-Z0-9\_\-\!\#\*\+';
29 31
	// General initialization function 
30 32
	// performed when frontend or backend is loaded.
31 33
	function wb() {
32 34
	}
33 35

  
36

  
34 37
	// Check whether a page is visible or not.
35 38
	// This will check page-visibility and user- and group-rights.
36 39
	/* page_is_visible() returns
......
278 281
 *
279 282
 * requirements: an active session must be available
280 283
 */
281
	public function getFTAN( $asTAG = true)
284
	public function getFTAN( $as_tag = true)
282 285
	{
283 286
		if(function_exists('microtime'))
284 287
		{
285 288
			list($usec, $sec) = explode(" ", microtime());
286
			$time = ((float)$usec + (float)$sec);
289
			$time = (string)((float)$usec + (float)$sec);
287 290
		}else{
288
			$time = time();
291
			$time = (string)time();
289 292
		}
290
		$ftan = md5(((string)$time).$_SERVER['SERVER_ADDR']);
293
		$salt  = ( isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : '');
294
		$salt .= ( isset($_SERVER['HTTP_ACCEPT_CHARSET']) ? $_SERVER['HTTP_ACCEPT_CHARSET'] : '');
295
		$salt .= ( isset($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : '');
296
		$salt .= ( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '');
297
		$salt .= ( isset($_SERVER['HTTP_CONNECTION']) ? $_SERVER['HTTP_CONNECTION'] : '');
298
		$salt .= ( isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '');
299
		$salt .= ( isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '');
300
		$salt  = ( $salt !== '' ) ? $salt : 'eXtremelyHotTomatoJuice';
301
		$ftan = md5($time.$salt);
291 302
		$_SESSION['FTAN'] = $ftan;
292 303
		$ftan0 = 'a'.substr($ftan, -(10 + hexdec(substr($ftan, 1))), 10);
293 304
		$ftan1 = 'a'.substr($ftan, hexdec(substr($ftan, -1)), 10);
294
		if($asTAG == true)
305
		if($as_tag == true)
295 306
		{
296 307
			return '<input type="hidden" name="'.$ftan0.'" value="'.$ftan1.'" title="" />';
297 308
		}else{

Also available in: Unified diff