www
/
wwwroot
/
magazinmiorita.be
/
admin
➕ New
📤 Upload
✎ Editing:
login.php
← Back
<?php ob_start(); session_start(); include('../includes/inc.config.php'); if(isset($_SESSION['admin_id'])){ header('Location: index.php'); exit; } if(isset($_POST['login'])){ $email = $_POST['email']; $password = md5($_POST['password']); $chk_user = $database->execute("select * from customers where email = '$email' and password = '$password' and status = '1' and level = '2'"); if($database->num($chk_user) == 1){ while($row = $database->fetch($chk_user)){ $user_id = $row['id']; } $_SESSION['admin_id'] = $user_id; header('Location: index.php'); exit; } else { header('Location: login.php?m=nok'); exit; } } if(isset($_GET['m']) && $_GET['m'] == 'nok'){ $smarty->assign("type", 'err'); $smarty->assign("message", 'Wrong Email or password!'); } $smarty->display(END_PATH.'login.tpl'); ?>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel