Spaces:
Running
Running
File size: 1,074 Bytes
3b11c5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
```php
<?php
session_start();
session_destroy();
header('Location: admin_login.php');
exit;
```
Setup Instructions:
1. Create the database by running the SQL in database.sql
2. Change the default admin password (currently "password") by running:
```sql
UPDATE admins SET password = '$2y$10$yourhashedpassword' WHERE username = 'admin';
```
(Generate a new hash using `password_hash('yournewpassword', PASSWORD_BCRYPT)` in PHP)
3. Create an "uploads" directory in your project root and make it writable
4. Configure database credentials in database_connection.php
5. The system is now ready to use:
- Public page: index.php
- Admin login: admin_login.php (username: admin, password: password - change this!)
- Admin dashboard: admin_dashboard.php (accessible after login)
- Logout: admin_logout.php
Key Features:
- Secure admin authentication with password hashing
- Visitor tracking with total and live visitor counts
- Product management with image uploads
- Clean responsive design
- Protection against common security issues (SQL injection, XSS) |