Parašė sniuff· 2008 Lap. 7 16:11:37
#1
Pristatau modą ant v6, su kurio pagalba, galėsite padaryti, kad puslapis veiktų tik tam tikru metu. Tai yra pvz: nuo 8.00 iki 24.00
atsidarom subheader.php failą ir dalį:
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }
require_once THEME."theme.php";
if ($settings['maintenance'] == "1" && !iADMIN) fallback(BASEDIR."maintenance.php");
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>".$settings['sitename']."</title>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<meta name='description' content='".$settings['description']."'>
<meta name='keywords' content='".$settings['keywords']."'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
<script type='text/javascript' src='".INCLUDES."jscript.js'></script>
</head>
<body bgcolor='$body_bg' text='$body_text'>\n";
render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");
keičiam į:
if (!defined("IN_FUSION")) { header("Location: index.php"); exit; }
require_once THEME."theme.php";
$time = date('H.i');
$isjungti = "24.00";
$ijungti = "8.00";
if($time < $isjungti AND $time > $ijungti) {
if ($settings['maintenance'] == "1" && !iADMIN) fallback(BASEDIR."maintenance.php");
if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_lastvisit='".time()."', user_ip='".USER_IP."' WHERE user_id='".$userdata['user_id']."'");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<title>".$settings['sitename']."</title>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<meta name='description' content='".$settings['description']."'>
<meta name='keywords' content='".$settings['keywords']."'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
<script type='text/javascript' src='".INCLUDES."jscript.js'></script>
</head>
<body bgcolor='$body_bg' text='$body_text'>\n";
render_header("<img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' title='".$settings['sitename']."'>");
} else {
echo "Puslapis neveikia nuo ".$ijungti." iki ".$ijungti.".";
}
Ten kur $isjungti ir $ijungti, pakeičiam pagal save. Tik palikite tokį patį formatą. Tai yra Valanda
.minutės