Changement d'heure

This commit is contained in:
Gauvain Boiché
2020-04-02 18:25:50 +02:00
parent f9dd4257ca
commit aaa005ec33
2 changed files with 3 additions and 3 deletions

View File

@@ -4130,7 +4130,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
} }
$current_hour = date('H'); $current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit';
// The following assigns all _common_ variables that may be used at any point in a template. // The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array( $template->assign_vars(array(

View File

@@ -422,7 +422,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
} }
$current_hour = date('H'); $current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit';
$forum_image = str_replace(".", "_$day_state.", $row['forum_image']); $forum_image = str_replace(".", "_$day_state.", $row['forum_image']);
$cat_row = array( $cat_row = array(
@@ -606,7 +606,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
} }
$current_hour = date('H'); $current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit';
$forum_image = str_replace(".", "_$day_state.", $row['forum_image']); $forum_image = str_replace(".", "_$day_state.", $row['forum_image']);
$forum_row = array( $forum_row = array(