############################################################## 
## MOD Title:          Advanced time management
## MOD Author:         -=ET=- < space_et@tiscali.fr > (n/a) http://www.golfexpert.net/phpbb
## MOD Description:    This MOD allow the board administrator(s)
##                     and each user to manage the time displayed
##                     on the board.
##                     They can...
##                     - set the DST time lag of their state/country
##                     - enable/disable manually the DST
##                     - just synchronize DST switches with the server ones
##                     - fully use the server local time
##                     - fully use the server UTC time & the user's computer settings
##                     - fully use the user's computer local time
## MOD Version:        2.0.1
## Compatibility:      2.0.5->2.0.6 (prior release not tested)
##
## Installation Level: Intermediate
## Installation Time:  15 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:      15
##      admin/admin_board.php
##      admin/admin_users.php
##      includes/functions.php
##      includes/functions_selects.php
##      includes/page_header.php
##      includes/usercp_avatar.php 
##      includes/usercp_register.php
##      templates/subSilver/formIE.css
##      templates/subSilver/overall_header.tpl
##      templates/subSilver/profile_add_body.tpl
##      templates/subSilver/simple_header.tpl
##      templates/subSilver/subSilver.css
##      templates/subSilver/admin/board_config_body.tpl
##      templates/subSilver/admin/page_header.tpl
##      templates/subSilver/admin/user_edit_body.tpl
##
## Included Files:     7
##      adv_time_db_update.php
##      root/includes/pc_time_data.php
##      root/language/lang_english/lang_adv_time.php 
##      root/language/lang_french/lang_adv_time.php
##      root/language/lang_german/lang_adv_time.php 
##      root/language/lang_italian/lang_adv_time.php
##      root/language/lang_spanish/lang_adv_time.php
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
## 1. EasyMOD
## -----------
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## However, on alpha releases of EM and meanwhile beta or 
## final release some actions are NOT performed.
## You'll have to do them manually !
##
## 1.1 SQL commands are not performed
## -----------
## This MOD need a database update.
## Then, in any case if you install this MOD manually or using
## an alpha release of EM, please copying the *_db_update.php
## in your phpBB root directory, run it with your navigator,
## and then delete it from the phpBB root directory.
##
## Please, do it NOW! Before editing phpBB files by EM or manually!!!
## Otherwise, you may have an error message during your next
## connection.
##
## 1.2 Translation are not managed
## -----------
## Moreover, EM can not already manage actions for any other
## language than English (but language intructions are proceed
## to all installed languages in order to prevent errors).
## So the translations provided with this MOD must be installed
## manually if you need them.
## For this MOD, copy lang_adv_time.php file(s) manually from
## their root/language/lang_xxx directories to their respective
## language/lang_xxx directories in the phpBB root dir.
##
## 2. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://www.golfexpert.net/phpBB
##
## 3. Special note for www.free.fr
## -----------
## This MOD uses session variables but with this host you must
## create a "sessions" directory in your FTP root directory in
## order to make this kind of variable available.
##
## Special thanks!
## -----------
## A very big thank you to Mara's dad for its advices in JavaScript!
## He prevents me from becoming crazy with computer settings modes! lol ;-)
## 
############################################################## 
## MOD History: 
## 
##   2003-12-06 - Version 2.0.1
##      - $lang['server_pc_mode'] language entry modified
##      - Add a language_change_log.txt file in the archive
##      - Italian translation improved
##      - For the language file include(), the code now test if the
##        translation file exist and otherwise use the English file.
##      - Comments has been add in every FIND instruction on part of code
##        line(s) to help identifying those lines in manual installations
##
##   2003-11-07 - Version 2.0.0
##      - Fix: modes choices alignment in ACP with IE
##      - Fix: little height space inserted on the index page when 1st seen
##      - Fix: error message on 5th & 6th mode with GZip compression enabled
##      - Instructions rewrite for adv_time_db_update.php use
##      - MOD now provide with German, Italian and Spanish translations
##
##   2003-09-30 - Version 2.0.0 Release Candidate 1
##      - MOD rename from DST time management to Advanced time management
##      - A new user's computer time mode has been add
##      - The 2 old modes using the server UTC time & the user's
##        computer settings have been merge in a new one which
##        does not need a cookie or a page reload anymore
##      - In user's profile, the default board mode is now bring to the fore by an "*"
##      - Replace "GMT" by "UTC" in timezone drop down lists
##      - Fix: modes choices alignment with Mozilla
##
##   2003-08-21 - Version 1.1.1
##      - Fix reload not executed for the 5th mode with Mozilla
##      - Minor improvements to be fully W3C compliant
##        (in session management & form attributes)
##      - Change the 5th mode information message on the index page
##      - dst_db_update.php updated to ask to delete it after use
##
##   2003-08-17 - Version 1.1.0
##      - Add the ability to set a default dst mode and a default
##        dst time lag for anonymous users and new accounts
##      - Replace "GMT" by "UTC" in the time status line as the "GMT"
##        time is not the official universal time anymore since 1985
##      - Several improvements in page_header.php & overall_header.tpl
##        for the 5th mode
##
##   2003-08-05 - Version 1.0.1
##      - Fix a minor issue in an input attribute of overall_header.tpl
##      - Update "Author notes" for EasyMOD 0.0.10a
##      - Release confirmed as phpBB 2.0.6 compliant (no change needed)
##
##   2003-07-12 - Version 1.0.0
##      - Initial final release
##      - Beta & RC releases are not supported anymore
##        (no update available - reinstall the MOD)
##
##   2003-07-12 - Version 0.4.2 - Release candidate 4c
##      - The MOD can now be installed by EasyMOD 0.0.9c
##        of Nutzzy (but is not yet an officially EasyMOD
##        Compliant MOD)!
##
##   2003-07-09 - Version 0.4.1 - Release candidate 4b
##      - Fix: correct the DST modes choice alignment
##      - Reduce DST time lag field width
##      - Minor messages update
##
##   2003-07-09 - Version 0.4.0 - Release candidate 4
##      - Minor messages update
##      - Add 2 news modes and rename all 5 modes
##
##   2003-07-08 - Version 0.3.0 - Release candidate 3
##      - Add specific time information messages on index page
##      - PC synchro mode does not use cookies anymore
##
##   2003-07-04 - Version 0.2.1 - Release candidate 2
##      - Modify Server synchro mode to be fully synchronized
##      - Minor messages update
##      - Fix: messages not displayed
##
##   2003-07-02 - Version 0.2.0 - Release candidate 1
##      - Add DST time lag validity control
##      - Add PC synchro mode
##
##   2003-06-26 - Version 0.1.0 - Initial beta release
##      - No DST time lag validity control
##      - No PC synchro mode
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ COPY ]------------------------------------------------
#
copy adv_time_db_update.php to adv_time_db_update.php
copy root/includes/pc_time_data.php to includes/pc_time_data.php
copy root/language/lang_english/lang_adv_time.php to language/lang_english/lang_adv_time.php

#
# This MOD need a database update.
# Then, as you must have now copied the adv_time_db_update.php file
# in your phpBB root directory, run it with your navigator...
# http://www.yourWebSite.xxx/phpbbRootDir/adv_time_db_update.php
#
# ...and then delete it from the phpBB root directory!!!
#
# Please, do it NOW! Before editing phpBB files by EM or manually!!!
# Otherwise, you may have an error message during your next
# connection.
#
#
# Moreover, because EM 0.0.10a can not already manage files for not
# necessarily existing language, language provide with this MOD can
# not be automatically installed (if I add the above instruction it
# can cause an installation error). So, if you need this language
# copy this file manually.
#
# copy root/language/lang_french/lang_adv_time.php to language/lang_french/lang_adv_time.php
# copy root/language/lang_german/lang_adv_time.php to language/lang_german/lang_adv_time.php
# copy root/language/lang_italian/lang_adv_time.php to language/lang_italian/lang_adv_time.php
# copy root/language/lang_spanish/lang_adv_time.php to language/lang_spanish/lang_adv_time.php
#

# 
#-----[ OPEN ]------------------------------------------------ 
# 
admin/admin_board.php 

# 
#-----[ FIND ]------------------------------------------------
# 
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx)) ) 
{ 
	include($phpbb_root_path . 'language/lang_english/lang_adv_time.' . $phpEx); 
} else 
{ 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx); 
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : "";
#
$gzip_yes = (

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

// Start add - Advanced time management MOD
switch ($new['default_time_mode']) 
{ 
	case 1:
		$time_mode_manual_dst_checked="checked=\"checked\"";
		break; 
	case 2:
		$time_mode_server_switch_checked="checked=\"checked\"";
		break; 
	case 3:
		$time_mode_full_server_checked="checked=\"checked\"";
		break; 
	case 4:
	case 5:
		$time_mode_server_pc_checked="checked=\"checked\"";
		break; 
	case 6:
		$time_mode_full_pc_checked="checked=\"checked\"";
		break; 
	default:
		$time_mode_manual_checked="checked=\"checked\""; 
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# "L_SYSTEM_TIMEZONE" => $lang['System_timezone'],
#
"L_SYSTEM_TIMEZONE" =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Advanced time management MOD
'L_TIME_MODE' => $lang['time_mode'],
'L_TIME_MODE_TEXT' => $lang['time_mode_text'],
'L_TIME_MODE_MANUAL' => $lang['time_mode_manual'],
'L_TIME_MODE_MANUAL_DST' => $lang['time_mode_manual_dst'],
'L_TIME_MODE_SERVER_SWITCH' => $lang['time_mode_server_switch'],
'L_TIME_MODE_FULL_SERVER' => $lang['time_mode_full_server'],
'L_TIME_MODE_SERVER_PC' => $lang['time_mode_server_pc'],
'L_TIME_MODE_FULL_PC' => $lang['time_mode_full_pc'],
'L_DST_TIME_LAG' => $lang['dst_time_lag'],
'L_DST_TIME_LAG_TEXT' => $lang['dst_time_lag_text'],
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# "TIMEZONE_SELECT" => $timezone_select,
#
"TIMEZONE_SELECT" =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Advanced time management MOD
'TIME_MODE' => $time_mode,
'TIME_MODE_MANUAL_CHECKED' => $time_mode_manual_checked,
'TIME_MODE_MANUAL_DST_CHECKED' => $time_mode_manual_dst_checked,
'TIME_MODE_SERVER_SWITCH_CHECKED' => $time_mode_server_switch_checked,
'TIME_MODE_FULL_SERVER_CHECKED' => $time_mode_full_server_checked,
'TIME_MODE_SERVER_PC_CHECKED' => $time_mode_server_pc_checked,
'TIME_MODE_FULL_PC_CHECKED' => $time_mode_full_pc_checked,
'DST_TIME_LAG' => $new['default_dst_time_lag'],
// End add - Advanced time management MOD

# 
#-----[ OPEN ]------------------------------------------------
# 
admin/admin_users.php

# 
#-----[ FIND ]------------------------------------------------
# 
require($phpbb_root_path . 'includes/functions_validate.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx)) ) 
{ 
	include($phpbb_root_path . 'language/lang_english/lang_adv_time.' . $phpEx); 
} else 
{ 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx); 
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $user_timezone = ( isset( $HTTP_POST_VARS['timezone']) ) ? doubleval( $HTTP_POST_VARS['timezone'] ) : $board_config['board_timezone'];
#
$user_timezone = ( isset(

#
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$time_mode = ( isset($HTTP_POST_VARS['time_mode']) ) ? intval ($HTTP_POST_VARS['time_mode']) : $board_config['default_time_mode'];
if ( !eregi("[^0-9]",$HTTP_POST_VARS['dst_time_lag']) )
{
	$dst_time_lag = ( isset($HTTP_POST_VARS['dst_time_lag']) ) ? intval  ($HTTP_POST_VARS['dst_time_lag']) : $board_config['default_dst_time_lag'];
}
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
//
// Avatar stuff

#
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

// Start add - Advanced time management MOD
if ( eregi("[^0-9]",$HTTP_POST_VARS['dst_time_lag']) || $dst_time_lag<0 || $dst_time_lag>120 )
{
	$error = TRUE;
	$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['dst_time_lag_error'];
}
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $sql = "UPDATE " . USERS_TABLE . "
# 	SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = ...
#
$sql = "UPDATE " . USERS_TABLE . "
SET

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$user_timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, user_time_mode = '$time_mode', user_dst_time_lag = '$dst_time_lag'

# 
#-----[ FIND ]------------------------------------------------ 
# 
$user_timezone = $this_userdata['user_timezone'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$time_mode = $this_userdata['user_time_mode'];
$dst_time_lag = $this_userdata['user_dst_time_lag'];
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
$s_hidden_fields .= '<input type="hidden" name="timezone" value="' . $user_timezone . '" />';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$s_hidden_fields .= '<input type="hidden" name="time_mode" value="' . $time_mode . '" />';
$s_hidden_fields .= '<input type="hidden" name="dst_time_lag" value="' . $dst_time_lag . '" />';
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
//
// Let's do an overall check for settings/versions which would prevent

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

// Start add - Advanced time management MOD
$l_time_mode_0 = $lang['time_mode_manual'];
$l_time_mode_1 = $lang['time_mode_manual_dst'];
$l_time_mode_2 = $lang['time_mode_server_switch'];
$l_time_mode_3 = $lang['time_mode_full_server'];
$l_time_mode_4 = $lang['time_mode_server_pc'];
$l_time_mode_6 = $lang['time_mode_full_pc'];

switch ($board_config['default_time_mode']) 
{ 
	case 1:
		$l_time_mode_1 = $l_time_mode_1 . "*";
		break;
	case 2:
		$l_time_mode_2 = $l_time_mode_2 . "*";
		break;
	case 3:
		$l_time_mode_3 = $l_time_mode_3 . "*";
		break;
	case 4:
	case 5:
		$l_time_mode_4 = $l_time_mode_4 . "*";
		break;
	case 6:
		$l_time_mode_6 = $l_time_mode_6 . "*";
		break;
	default:
		$l_time_mode_0 = $l_time_mode_0 . "*";
		break;
} 

switch ($time_mode) 
{ 
	case 1:
		$time_mode_manual_dst_checked="checked=\"checked\"";
		break;
	case 2:
		$time_mode_server_switch_checked="checked=\"checked\"";
		break;
	case 3:
		$time_mode_full_server_checked="checked=\"checked\"";
		break;
	case 4:
	case 5:
		$time_mode_server_pc_checked="checked=\"checked\"";
		break;
	case 6:
		$time_mode_full_pc_checked="checked=\"checked\"";
		break;
	default:
		$time_mode_manual_checked="checked=\"checked\"";
		break;
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# 'TIMEZONE_SELECT' => tz_select($user_timezone),
#
'TIMEZONE_SELECT' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
'TIME_MODE' => $time_mode,
'TIME_MODE_MANUAL_CHECKED' => $time_mode_manual_checked,
'TIME_MODE_MANUAL_DST_CHECKED' => $time_mode_manual_dst_checked,
'TIME_MODE_SERVER_SWITCH_CHECKED' => $time_mode_server_switch_checked,
'TIME_MODE_FULL_SERVER_CHECKED' => $time_mode_full_server_checked,
'TIME_MODE_SERVER_PC_CHECKED' => $time_mode_server_pc_checked,
'TIME_MODE_FULL_PC_CHECKED' => $time_mode_full_pc_checked,
'DST_TIME_LAG' => $dst_time_lag,
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# 'L_TIMEZONE' => $lang['Timezone'],
#
'L_TIMEZONE' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
'L_TIME_MODE' => $lang['time_mode'],
'L_TIME_MODE_TEXT' => $lang['time_mode_text'],
'L_TIME_MODE_MANUAL' => $l_time_mode_0,
'L_TIME_MODE_MANUAL_DST' => $l_time_mode_1,
'L_TIME_MODE_SERVER_SWITCH' => $l_time_mode_2,
'L_TIME_MODE_FULL_SERVER' => $l_time_mode_3,
'L_TIME_MODE_SERVER_PC' => $l_time_mode_4,
'L_TIME_MODE_FULL_PC' => $l_time_mode_6,
'L_DST_TIME_LAG' => $lang['dst_time_lag'],
'L_DST_TIME_LAG_TEXT' => $lang['dst_time_lag_text'],
// End add - Advanced time management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
#
includes/functions.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# global $board_config, $lang;
#
global $board_config, $lang

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$lang

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, $userdata

# 
#-----[ FIND ]------------------------------------------------ 
# 
	return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));

# 
#-----[ REPLACE WITH ]---------------------------------------- 
#

// Start replacement - Advanced time management MOD
if ( $userdata['user_id'] != ANONYMOUS )
{
	switch ( $userdata['user_time_mode'] )
	{
		case 1:
			$dst_sec = $userdata['user_dst_time_lag'] * 60;
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec);
			break;
		case 2:
			$dst_sec = date('I', $gmepoch) * $userdata['user_dst_time_lag'] * 60;
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec);
			break;
		case 3:
			return ( !empty($translate) ) ? strtr(@date($format, $gmepoch), $translate) : @date($format, $gmepoch);
			break;
		case 4:
		case 5:
			if ( !($board_config['gzip_compress']==1 && ob_get_level()==0) )
			{
				@ini_set('arg_separator.output', '&amp;');
				session_start();
			}

			if ( isset($HTTP_SESSION_VARS['pc_timezoneoffset']) )
			{
				$tzo_sec = $HTTP_SESSION_VARS['pc_timezoneoffset'] * (-60);
			} else
			{
				$tzo_sec = $userdata['user_pc_time_offset'];
			}
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + $tzo_sec), $translate) : @gmdate($format, $gmepoch + $tzo_sec); 
			break;
		case 6:
			if ( !($board_config['gzip_compress']==1 && ob_get_level()==0) )
			{
				@ini_set('arg_separator.output', '&amp;');
				session_start();
			}

			if ( isset($HTTP_SESSION_VARS['pc_time_offset']) )
			{
				$tzo_sec = $HTTP_SESSION_VARS['pc_time_offset'];
			} else
			{
				$tzo_sec = $userdata['user_pc_time_offset'];
			}
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + $tzo_sec), $translate) : @gmdate($format, $gmepoch + $tzo_sec); 
			break;
		default:
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); 
			break;
	}
} else
{
	switch ( $board_config['default_time_mode'] )
	{
		case 1:
			$dst_sec = $board_config['default_dst_time_lag'] * 60;
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec);
			break;
		case 2:
			$dst_sec = date('I', $gmepoch) * $board_config['default_dst_time_lag'] * 60; 
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst_sec);
			break;
		case 3:
			return ( !empty($translate) ) ? strtr(@date($format, $gmepoch), $translate) : @date($format, $gmepoch);
			break;
		case 4:
		case 5:
			if ( !($board_config['gzip_compress']==1 && ob_get_level()==0) )
			{
				@ini_set('arg_separator.output', '&amp;');
				session_start();
			}

			if ( isset($HTTP_SESSION_VARS['pc_timezoneoffset']) )
			{
				$tzo_sec = $HTTP_SESSION_VARS['pc_timezoneoffset'] * (-60);
			} else
			{
				$tzo_sec = $userdata['user_pc_time_offset'];
			}
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + $tzo_sec), $translate) : @gmdate($format, $gmepoch + $tzo_sec); 
			break;
		case 6:
			if ( !($board_config['gzip_compress']==1 && ob_get_level()==0) )
			{
				@ini_set('arg_separator.output', '&amp;');
				session_start();
			}

			if ( isset($HTTP_SESSION_VARS['pc_time_offset']) )
			{
				$tzo_sec = $HTTP_SESSION_VARS['pc_time_offset'];
			} else
			{
				$tzo_sec = $userdata['user_pc_time_offset'];
			}
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + $tzo_sec), $translate) : @gmdate($format, $gmepoch + $tzo_sec); 
			break;
		default:
			return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); 
			break;
	} 
}
// End replacement - Advanced time management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
#
includes/functions_selects.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
#
$zone . '</option>'

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$zone

# 
#-----[ IN-LINE REPLACE WITH ]-------------------------------- 
# 
str_replace('GMT', 'UTC', $zone)

# 
#-----[ OPEN ]------------------------------------------------ 
#
includes/page_header.php 

# 
#-----[ FIND ]------------------------------------------------ 
#
ob_start('ob_gzhandler');

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
ob_start

# 
#-----[ IN-LINE BEFORE, ADD ]--------------------------------- 
# 
@

# 
#-----[ FIND ]------------------------------------------------ 
#
ob_start();
ob_implicit_flush(0);

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
ob_start

# 
#-----[ IN-LINE BEFORE, ADD ]--------------------------------- 
# 
@

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
ob_implicit_flush

# 
#-----[ IN-LINE BEFORE, ADD ]--------------------------------- 
# 
@

# 
#-----[ FIND ]------------------------------------------------ 
#
//
// Parse and show the overall header.

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

// Start add - Advanced time management MOD
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx)) ) 
{ 
	include($phpbb_root_path . 'language/lang_english/lang_adv_time.' . $phpEx); 
} else 
{ 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx); 
} 

global $userdata;

if ( ($userdata['user_id'] != ANONYMOUS && $userdata['user_time_mode'] >= 4) || ($userdata['user_id'] == ANONYMOUS && $board_config['default_time_mode'] >= 4) )
{
	@ini_set('arg_separator.output', '&amp;');
	session_start();

	if ( !isset($HTTP_SESSION_VARS['pc_timezoneoffset']) && !isset($HTTP_POST_VARS['pc_timezoneoffset']) )
	{
		$template->assign_block_vars('switch_pc_time_data_search', array());
	} else
	{
		$template->assign_block_vars('switch_no_pc_time_data_search', array());
	}
} else
{
	$template->assign_block_vars('switch_no_pc_time_data_search', array());
}
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
//
// The following assigns all _common_ variables that may be used at any point

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

// Start add - Advanced time management MOD
if ( $userdata['user_id'] != ANONYMOUS )
{
	switch ( $userdata['user_time_mode'] ) 
	{ 
		case 1:
			$time_message = sprintf($lang['All_times'], $l_timezone) . $lang['dst_enabled_mode'];
			break;
		case 2:
			$time_message = sprintf($lang['All_times'], $l_timezone);
			if ( date('I', time()) )
			{
				$time_message = $time_message . $lang['dst_enabled_mode'];
			}
			break;
		case 3:
			$time_message = $lang['full_server_mode'];
			break;
		case 4:
		case 5:
			$time_message = $lang['server_pc_mode'];
			break;
		case 6:
			$time_message = $lang['full_pc_mode'];
			break;
		default:
			$time_message = sprintf($lang['All_times'], $l_timezone);
			break;
	}
} else
{
	switch ( $board_config['default_time_mode'] ) 
	{ 
		case 1:
			$time_message = sprintf($lang['All_times'], $l_timezone) . $lang['dst_enabled_mode'];
			break;
		case 2:
			$time_message = sprintf($lang['All_times'], $l_timezone);
			if ( date('I', time()) )
			{
				$time_message = $time_message . $lang['dst_enabled_mode'];
			}
			break;
		case 3:
			$time_message = $lang['full_server_mode'];
			break;
		case 4:
		case 5:
			$time_message = $lang['server_pc_mode'];
			break;
		case 6:
			$time_message = $lang['full_pc_mode'];
			break;
		default:
			$time_message = sprintf($lang['All_times'], $l_timezone);
			break;
	}
}

$time_message = str_replace('GMT', 'UTC', $time_message);
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
'U_GROUP_CP' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Advanced time management MOD
'U_PC_TIME_DATA' => append_sid('includes/pc_time_data.'.$phpEx),
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
#
	'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),

# 
#-----[ REPLACE WITH ]---------------------------------------- 
#

// Start replacement - Advanced time management MOD
'S_TIMEZONE' => $time_message,
// End replacement - Advanced time management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, ...
#
function display_avatar_gallery(

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
&$timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, &$time_mode, &$dst_time_lag

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', ...
#
$params = array(

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
'timezone'

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, 'time_mode', 'dst_time_lag'

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_register.php 

# 
#-----[ FIND ]------------------------------------------------ 
# 
// Check and initialize some variables if needed
//

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx)) ) 
{ 
	include($phpbb_root_path . 'language/lang_english/lang_adv_time.' . $phpEx); 
} else 
{ 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_adv_time.' . $phpEx); 
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
#
$user_timezone = ( isset(

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$time_mode = ( isset($HTTP_POST_VARS['time_mode']) ) ? intval ($HTTP_POST_VARS['time_mode']) : $board_config['default_time_mode'];

if ( eregi("[^0-9]",$HTTP_POST_VARS['dst_time_lag']) || $dst_time_lag<0 || $dst_time_lag>120 )
{
	$error = TRUE;
	$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['dst_time_lag_error'];
}
else
{
$dst_time_lag = ( isset($HTTP_POST_VARS['dst_time_lag']) ) ? intval ($HTTP_POST_VARS['dst_time_lag']) : $board_config['default_dst_time_lag'];
}
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $sql = "UPDATE " . USERS_TABLE . "
# 	SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = ...
#
$sql = "UPDATE " . USERS_TABLE . "
SET

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$user_timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, user_time_mode = $time_mode, user_dst_time_lag = $dst_time_lag

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, ...
# 	VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", ...
#
$sql = "INSERT INTO " . USERS_TABLE . "
VALUES (

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
, user_timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, user_time_mode, user_dst_time_lag

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$user_timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, $time_mode, $dst_time_lag

# 
#-----[ FIND ]------------------------------------------------ 
# 
$user_timezone = $userdata['user_timezone'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$time_mode=$userdata['user_time_mode']; 
$dst_time_lag=$userdata['user_dst_time_lag']; 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, ...
#
display_avatar_gallery(

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
$user_timezone

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, $time_mode, $dst_time_lag

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# $smilies_status = ( $userdata['user_allowsmile'] && $board_config['allow_smilies']  ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
#
$smilies_status = (

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
$l_time_mode_0 = $lang['time_mode_manual'];
$l_time_mode_1 = $lang['time_mode_manual_dst'];
$l_time_mode_2 = $lang['time_mode_server_switch'];
$l_time_mode_3 = $lang['time_mode_full_server'];
$l_time_mode_4 = $lang['time_mode_server_pc'];
$l_time_mode_6 = $lang['time_mode_full_pc'];

switch ($board_config['default_time_mode']) 
{ 
	case 1:
		$l_time_mode_1 = $l_time_mode_1 . "*";
		break;
	case 2:
		$l_time_mode_2 = $l_time_mode_2 . "*";
		break;
	case 3:
		$l_time_mode_3 = $l_time_mode_3 . "*";
		break;
	case 4:
	case 5:
		$l_time_mode_4 = $l_time_mode_4 . "*";
		break;
	case 6:
		$l_time_mode_6 = $l_time_mode_6 . "*";
		break;
	default:
		$l_time_mode_0 = $l_time_mode_0 . "*";
		break;
} 

switch ($time_mode) 
{ 
	case 1:
		$time_mode_manual_dst_checked="checked=\"checked\"";
		break;
	case 2:
		$time_mode_server_switch_checked="checked=\"checked\"";
		break;
	case 3:
		$time_mode_full_server_checked="checked=\"checked\"";
		break;
	case 4:
	case 5:
		$time_mode_server_pc_checked="checked=\"checked\"";
		break;
	case 6:
		$time_mode_full_pc_checked="checked=\"checked\"";
		break;
	default:
		$time_mode_manual_checked="checked=\"checked\"";
		break;
} 
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# 'TIMEZONE_SELECT' => tz_select($user_timezone, 'timezone'),
#
'TIMEZONE_SELECT' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
'TIME_MODE' => $time_mode,
'TIME_MODE_MANUAL_CHECKED' => $time_mode_manual_checked,
'TIME_MODE_MANUAL_DST_CHECKED' => $time_mode_manual_dst_checked,
'TIME_MODE_SERVER_SWITCH_CHECKED' => $time_mode_server_switch_checked,
'TIME_MODE_FULL_SERVER_CHECKED' => $time_mode_full_server_checked,
'TIME_MODE_SERVER_PC_CHECKED' => $time_mode_server_pc_checked,
'TIME_MODE_FULL_PC_CHECKED' => $time_mode_full_pc_checked,
'DST_TIME_LAG' => $dst_time_lag,
// End add - Advanced time management MOD

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# 'L_TIMEZONE' => $lang['Timezone'],
#
'L_TIMEZONE' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

// Start add - Advanced time management MOD
'L_TIME_MODE' => $lang['time_mode'],
'L_TIME_MODE_TEXT' => $lang['time_mode_text'],
'L_TIME_MODE_MANUAL' => $l_time_mode_0,
'L_TIME_MODE_MANUAL_DST' => $l_time_mode_1,
'L_TIME_MODE_SERVER_SWITCH' => $l_time_mode_2,
'L_TIME_MODE_FULL_SERVER' => $l_time_mode_3,
'L_TIME_MODE_SERVER_PC' => $l_time_mode_4,
'L_TIME_MODE_FULL_PC' => $l_time_mode_6,
'L_DST_TIME_LAG' => $lang['dst_time_lag'],
'L_DST_TIME_LAG_TEXT' => $lang['dst_time_lag_text'],
// End add - Advanced time management MOD

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/formIE.css

# 
#-----[ FIND ]------------------------------------------------ 
# 
input { text-indent : 2px; }

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

/* Start replacement - Advanced time management MOD */
/* input { text-indent : 2px; }
/* End replacement - Advanced time management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/overall_header.tpl 

# 
#-----[ FIND ]------------------------------------------------ 
# 
input { text-indent : 2px; }

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

/* Start replacement - Advanced time management MOD */
/* input { text-indent : 2px; }
/* End replacement - Advanced time management MOD */

# 
#-----[ FIND ]------------------------------------------------ 
# 
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

<!-- Start replacement - Advanced time management MOD -->
<!-- BEGIN switch_no_pc_time_data_search -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<!-- END switch_no_pc_time_data_search -->

<!-- BEGIN switch_pc_time_data_search -->
<script language="JavaScript" type="text/javascript">
function pc_time_data() {
	var pc_dateTime = new Date()
	document.currentForm.pc_timezoneoffset.value = pc_dateTime.getTimezoneOffset();
	document.currentForm.pc_date.value = pc_dateTime.getFullYear()*10000 + (pc_dateTime.getMonth()+1)*100 + pc_dateTime.getDate();
	document.currentForm.pc_time.value = pc_dateTime.getHours()*3600 + pc_dateTime.getMinutes()*60 + pc_dateTime.getSeconds();
	document.currentForm.submit();
}
</script>

</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" onload="pc_time_data()">

<IFRAME name="RemoteScripting" width="0" height="0" frameborder="0" src="blank.htm"></IFRAME>
<!-- END switch_pc_time_data_search -->
<!-- End replacement - Advanced time management MOD -->

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# <table cellspacing="0" cellpadding="2" border="0">
# 	<tr>
#
<table cellspacing="0" cellpadding="2" border="0"
<tr> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<!-- Start add - Advanced time management MOD -->
<!-- BEGIN switch_pc_time_data_search -->
<FORM action="{U_PC_TIME_DATA}" method="post" target="RemoteScripting" id="currentForm" name="currentForm">
	<input type="hidden" name="pc_timezoneoffset">
	<input type="hidden" name="pc_date">
	<input type="hidden" name="pc_time">
</FORM>
<!-- END switch_pc_time_data_search -->
<!-- End add - Advanced time management MOD -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/profile_add_body.tpl 

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# <tr> 
#   <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
#   <td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
# </tr>
#
<tr>
{L_TIMEZONE}
{TIMEZONE_SELECT}
</tr>

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
# 

<!-- Start add - Advanced time management MOD -->
<tr> 
	<td class="row1"><span class="gen">{L_TIME_MODE}:</span><br />
		<span class="gensmall">{L_TIME_MODE_TEXT}</span></td>
	<td class="row2">
		<input type="radio" name="time_mode" value="0" {TIME_MODE_MANUAL_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL}</span>&nbsp;&nbsp;<br /> 
		<input type="radio" name="time_mode" value="1" {TIME_MODE_MANUAL_DST_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL_DST}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="2" {TIME_MODE_SERVER_SWITCH_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_SWITCH}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="3" {TIME_MODE_FULL_SERVER_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_SERVER}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="4" {TIME_MODE_SERVER_PC_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_PC}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="6" {TIME_MODE_FULL_PC_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_PC}</span></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<!-- Start add - Advanced time management MOD -->
<tr>
	<td class="row1"><span class="gen">{L_DST_TIME_LAG}:</span><br />
		<span class="gensmall">{L_DST_TIME_LAG_TEXT}</span></td>
	<td class="row2"><input type="text" name="dst_time_lag" value="{DST_TIME_LAG}" maxlength="3" size="3" class="post" /></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/simple_header.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
input { text-indent : 2px; }

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

/* Start replacement - Advanced time management MOD */
/* input { text-indent : 2px; }
/* End replacement - Advanced time management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/subSilver.css

# 
#-----[ FIND ]------------------------------------------------ 
# 
input { text-indent : 2px; }

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

/* Start replacement - Advanced time management MOD */
/* input { text-indent : 2px; }
/* End replacement - Advanced time management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/admin/board_config_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# <tr>
# 	<td class="row1">{L_SYSTEM_TIMEZONE}</td>
# 	<td class="row2">{TIMEZONE_SELECT}</td>
# </tr>
#
<tr>
{L_SYSTEM_TIMEZONE}
{TIMEZONE_SELECT}
</tr>

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

<!-- Start add - Advanced time management MOD -->
<tr> 
	<td class="row1"><span class="gen">{L_TIME_MODE}:</span><br />
		<span class="gensmall">{L_TIME_MODE_TEXT}</span></td>
	<td class="row2" nowrap="nowrap">
		<input type="radio" name="default_time_mode" value="0" {TIME_MODE_MANUAL_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL}</span>&nbsp;&nbsp;<br /> 
		<input type="radio" name="default_time_mode" value="1" {TIME_MODE_MANUAL_DST_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL_DST}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="default_time_mode" value="2" {TIME_MODE_SERVER_SWITCH_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_SWITCH}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="default_time_mode" value="3" {TIME_MODE_FULL_SERVER_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_SERVER}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="default_time_mode" value="4" {TIME_MODE_SERVER_PC_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_PC}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="default_time_mode" value="6" {TIME_MODE_FULL_PC_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_PC}</span></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

<!-- Start add - Advanced time management MOD -->
<tr>
	<td class="row1"><span class="gen">{L_DST_TIME_LAG}:</span><br />
		<span class="gensmall">{L_DST_TIME_LAG_TEXT}</span></td>
	<td class="row2"><input type="text" name="default_dst_time_lag" value="{DST_TIME_LAG}" maxlength="3" size="3" class="post" /></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/admin/page_header.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
input { text-indent : 2px; }

# 
#-----[ REPLACE WITH ]---------------------------------------- 
# 

/* Start replacement - Advanced time management MOD */
/* input { text-indent : 2px; }
/* End replacement - Advanced time management MOD */

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/admin/user_edit_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
# NOTE: this is a search by part(s) of code line(s)!
# The original line(s) to find is(are) longer and must look like this (if no MOD has already modify them):
#
# <tr> 
#   <td class="row1"><span class="gen">{L_TIMEZONE}</span></td>
#   <td class="row2">{TIMEZONE_SELECT}</td>
# </tr>
#
<tr>
{L_TIMEZONE}
{TIMEZONE_SELECT}
</tr>

# 
#-----[ BEFORE, ADD ]----------------------------------------- 
#

<!-- Start add - Advanced time management MOD -->
<tr> 
	<td class="row1"><span class="gen">{L_TIME_MODE}:</span><br />
		<span class="gensmall">{L_TIME_MODE_TEXT}</span></td>
	<td class="row2" nowrap="nowrap">
		<input type="radio" name="time_mode" value="0" {TIME_MODE_MANUAL_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL}</span>&nbsp;&nbsp;<br /> 
		<input type="radio" name="time_mode" value="1" {TIME_MODE_MANUAL_DSL_CHECKED}/><span class="gen">{L_TIME_MODE_MANUAL_DST}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="2" {TIME_MODE_SERVER_SWITCH_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_SWITCH}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="3" {TIME_MODE_FULL_SERVER_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_SERVER}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="4" {TIME_MODE_SERVER_PC_CHECKED}/><span class="gen">{L_TIME_MODE_SERVER_PC}</span>&nbsp;&nbsp;<br />
		<input type="radio" name="time_mode" value="6" {TIME_MODE_FULL_PC_CHECKED}/><span class="gen">{L_TIME_MODE_FULL_PC}</span></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

<!-- Start add - Advanced time management MOD -->
<tr>
	<td class="row1"><span class="gen">{L_DST_TIME_LAG}:</span><br />
		<span class="gensmall">{L_DST_TIME_LAG_TEXT}</span></td>
	<td class="row2"><input type="text" name="dst_time_lag" value="{DST_TIME_LAG}" maxlength="3" size="3" class="post" /></td>
</tr>
<!-- End add - Advanced time management MOD -->

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM 
