yks hat geschrieben:$hour = create_date(H, time(), $board_config['board_timezone']);
if ( $hour >= 11 && $hour <= 17 )
dann bastel es raus aus dem code.daran hatte ich gar nicht gedacht : unterschied englisches und deutsches datumsformat, je nach forumseinstellung ?
somit aber auch wieder einen bezug zum forum hat, der eigentlich von mir aus gar nicht nötig wäre
hatte die "anleitung zum erstellen eigener seite in phpbb3" mit dazu gemixt,
aber im grunde > board-standardzeit = serverzeit
eigentlich brauchst du nur das (minus lang's und board_config's)
Code: Alles auswählen
<?php
//
// Create date/time from format and timezone
//
function create_date($format, $gmepoch, $tz)
{
global $board_config, $lang;
static $translate;
if ( empty($translate) && $board_config['default_lang'] != 'english' )
{
@reset($lang['datetime']);
while ( list($match, $replace) = @each($lang['datetime']) )
{
$translate[$match] = $replace;
}
}
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * ($tz+date("I")))), $translate) : @gmdate($format, $gmepoch + (3600 * ($tz+date("I"))));
}
$hour = create_date(H, time(), $board_config['board_timezone']);
if ( $hour >= 11 && $hour <= 17 )
{
chmod("night/.htacces", 0777);
chmod(".htacces", 0777);
copy("night/.htacces",".htaccess");
chmod(".htacces", 0644);
}
else
{
chmod("day/.htacces", 0777);
chmod(".htacces", 0777);
copy("day/.htacces",".htaccess");
chmod(".htacces", 0644);
}
);
?>