Ho scritto il codice come mi hai indicato:
Codice PHP:
<?PHP
include ("../../functions.php");
function index($admin) {
global $db, $prefix, level;
if (is_logged_in_admin($admin) && $result['level'] == 'master') {
include("header.php");
$cookie_read = explode("|", base64_decode($admin));
$adminid = $cookie_read[0];
$admin_name = $cookie_read[1];
$password = $cookie_read[2];
$lastlogin_date = $cookie_read[4];
$lastlogin_time = $cookie_read[5];
echo "Welcome <b>$admin_name</b>, Last login on $lastlogin_date at $lastlogin_time (<a href=index.php?cat=Logout>Logout</a>)";
echo "<br><br><br><br>";
nav_menu();
include("footer.php");
}else{
include("header.php");
login_form();
include("footer.php");
}
}
Ma non ho capito il significato di result
In più ricevo errore:
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in index.php on line 5