Hey könnt ihr mir mal helfen?
Habe ein Problem:
1. IIS 500 Error
2. Es ist keine HoloCMS
3. bekomme wenn ich PHP Fehler einblenden lasse, das hier:
Fatal error: Call to undefined function session_is_registered() in C:\inetpub\wwwroot\global.php on line 26
Hier ist die global.php
PHP
<?PHP
#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|
#| #|
#| Site Web et Content Management System #|
#| Copyright © 2012 Rubaz. . #|
#| #|
#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|#|
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$debut = getmicrotime();
@session_start();
@include("./includes/MySQL.php");
@include("../includes/MySQL.php");
@include("./includes/CMS.php");
@include("../includes/CMS.php");
@include("./includes/Function.php");
@include("../includes/Function.php");
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == "78.251.208.86" || $ip == "94.156.59.61"){
print("You are banned, fuck you.");
exit;
}
if(session_is_registered(username))
{
if($_SESSION['ip'] != $ip){
session_destroy();
Redirect($url);
exit;
}
$username = Securise($_SESSION['username']);
$sql = mysql_query("SELECT * FROM users WHERE username = '".$username."' LIMIT 1") or die(mysql_error());
$row = mysql_num_rows($sql);
if($row > 0)
{
$user = mysql_fetch_assoc($sql);
mysql_query("UPDATE users SET ip_last = '".$_SERVER["REMOTE_ADDR"]."' WHERE id = '".$user['id']."'");
}
else {
session_destroy();
Redirect("".$url."");
exit();
}
$query = mysql_query("SELECT * FROM bans WHERE value = '".$_SERVER['REMOTE_ADDR']."' ") or die(mysql_error());
$data = mysql_fetch_assoc($query);
$ban = array($data['value']);
$ip = $_SERVER['REMOTE_ADDR'];
if (in_array($ip, $ban)) {
header('Location: /logout.php'); }
$sql = mysql_query("SELECT * FROM bans WHERE value = '".$username."'");
$b = mysql_fetch_assoc($sql);
$stamp_now = mktime(date('H:i:s d-m-Y'));
$stamp_expire = $b['expire'];
$expire = date('d/m/Y H:i:s', $b['expire']);
if($stamp_now < $stamp_expire){
header('Location: ./logout.php');
}
}
if ($user['rank'] >= 1) {
$query_home = mysql_query("SELECT * FROM user_home WHERE id = '".$id."'");
$home_nb = mysql_num_rows($query_home);
if ($home_nb <= 0) {
mysql_query("INSERT INTO user_home (id) VALUES ('" . $user['id'] . "')");
}
}
if ($user['rank'] == 2) {
$query = mysql_query("SELECT timestamp_expire FROM user_vip WHERE user_id = '".$user['id']."'");
$subscription = mysql_fetch_array($query);
$expire = $subscription['timestamp_expire'];
$date = time();
if($expire <= $date) {
mysql_query("DELETE FROM user_vip WHERE user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET rank = '1', vip = '0' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
}
}
if ($user['rank'] == 3) {
$query = mysql_query("SELECT timestamp_expire FROM user_vip WHERE user_id = '".$user['id']."'");
$subscription = mysql_fetch_array($query);
$expire = $subscription['timestamp_expire'];
$date = time();
if($expire <= $date) {
mysql_query("DELETE FROM user_vip WHERE user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP3' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP4' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP6' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("DELETE FROM user_badges WHERE badge_id = 'VIP7' AND user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET rank = '1', vip = '0' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
}
}
if ($user['HK'] == 1) {
$query = mysql_query("SELECT timestamp_expire FROM user_staff WHERE user_id = '".$user['id']."'");
$subscription = mysql_fetch_array($query);
$expire = $subscription['timestamp_expire'];
$date = time();
if($expire <= $date) {
mysql_query("DELETE FROM user_staff WHERE user_id = '".$user['id']."' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET HK = '0' WHERE id = '".$user['id']."' LIMIT 1") or die(mysql_error());
}
}
?>
Alles anzeigen