Verfasst: 15.02.2005 10:50
Damit du dir die Tabelle anschauen kannst, benötigst du phpMyAdmin..
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
$zeit= date("G");
if( $zeit >= 19 || $zeit < 6 )
{
$theme['head_stylesheet'] = 'style_nacht.css';
}
elseif( $zeit >= 6 && $zeit < 11 )
{
$theme['head_stylesheet'] = 'style_morgen.css';
}
else
{
$theme['head_stylesheet'] = 'style_tag.css';
}
Code: Alles auswählen
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
if (date("G") >= 0 && date("G") <= 8) $board_config['default_style'] = 2;
elseif (date("G") >= 9 && date("G") <= 15) $board_config['default_style'] = 3;
elseif (date("G") >= 16 && date("G") <= 21) $board_config['default_style'] = 3;
else $board_config['default_style'] = 1;
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted');
}
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
?>
Code: Alles auswählen
if (date("H")>6 && date("H")<18){
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_style = 4';
$db->sql_query($sql);
$sql = 'UPDATE ' . CONFIG_TABLE . '
SET config_value = 4
WHERE config_name = "default_style"';
$db->sql_query($sql);
$sql = 'UPDATE ' . CONFIG_TABLE . '
SET config_value =1
WHERE config_name = "override_user_style"';
$db->sql_query($sql);
} else {
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_style = 1';
$db->sql_query($sql);
$sql = 'UPDATE ' . CONFIG_TABLE . '
SET `config_value` = 1
WHERE config_name = "default_style"';
$db->sql_query($sql);
$sql = 'UPDATE ' . CONFIG_TABLE . '
SET config_value = 1
WHERE config_name = "override_user_style"';
$db->sql_query($sql);
}