Evet Arkadaşlar Bir Scriptimde Kullandığım login scriptimle ilgili cpanelin php 8.0 altı versiyonları kaldırmasından sonra aldığım hatalar var...
bilgim biraz kısıtlı kolay çözülebilecek bişeymi bi bakarmısınız ?
aldığım hatalar ve ilgili yerdeki kodlar
Notice: Undefined variable: _SESSION in /home/katalog/public_html/header.php on line 311
Notice: Trying to access array offset on value of type null in /home/katalog/public_html/header.php on line 311
<?php if(userValue($_SESSION['uid'], "avatar") == "") { ?>
--------------------------------------------------------------------------------------------------------------------------
Notice: Undefined variable: _SESSION in /home/katalog/public_html/header.php on line 343
Notice: Trying to access array offset on value of type null in /home/katalog/public_html/header.php on line 343
<?php if(userValue($_SESSION['uid'], "adsoyad") == "") { ?>
-----------------------------------------------------------------------------------------------------------------------------
Notice: Trying to access array offset on value of type null in /home/katalog/public_html/login/includes/api.php on line 252
// Function to check if a user has one of the specified levels
function is_allowedLevel($levels) {
global $con;
$uid = mysqli_real_escape_string($con, $_SESSION['uid']);
$getuser = mysqli_query($con,"SELECT * FROM login_users WHERE id='$uid'");
$gu = mysqli_fetch_array($getuser);
$permid = $gu['permission'];
$gperm = mysqli_query($con,"SELECT * FROM login_permissions WHERE id='$permid'");
$gp = mysqli_fetch_array($gperm);
(252) $level = explode(",", $levels); // Separate the levels FROM login_the commas
$found = 0;
// Check if the user has one of the specified levels
foreach($level as $l) {
$l = trim($l);
if($l == $gp['level']) {
$found++; // Count 1 to $found if the levels match
}
}
// If user does not have one of the specified level the function returns false
if($found == 0) {
return false;
} else {
return true;
}
}
-----------------------------------------------------------------------------------------------------