# SRGROUPSECURITYSYSTEM - Complete Website with Admin Dashboard A professional security solutions and building management systems website with a powerful admin dashboard for complete content management. ## Features ### Frontend Features - Responsive design for all devices - Hero banner carousel - Services showcase with WhatsApp integration - Product categories and featured products - Statistics counter - Why Choose Us section - Contact form with WhatsApp redirect - Social media integration - SEO optimized ### Admin Dashboard Features - Secure login with IP tracking - Banner management (Add/Edit/Delete) - Services management with WhatsApp numbers - Products and categories management - Site work management (Sites, Teams, Assignments) - Service applications tracking - Statistics management - Why Choose Us items management - Site settings (Contact info, Social links, SEO) - Header & Footer content management - Login activity logs with system info - Admin profile management ## Installation ### Requirements - PHP 7.4 or higher - MySQL 5.7 or higher - Apache with mod_rewrite enabled ### Step 1: Upload Files Upload all files to your web server root directory or a subdirectory. ### Step 2: Create Database 1. Create a new MySQL database named `srgroup_security` 2. Import the `database.sql` file using phpMyAdmin or command line: ```bash mysql -u username -p srgroup_security < database.sql ``` ### Step 3: Configure Database Edit `includes/config.php` and update the database credentials: ```php define('DB_HOST', 'localhost'); define('DB_USERNAME', 'your_username'); define('DB_PASSWORD', 'your_password'); define('DB_NAME', 'srgroup_security'); ``` ### Step 4: Set Permissions Ensure the following directories are writable (755 or 777): - `assets/uploads/` - `assets/uploads/banners/` - `assets/uploads/products/` - `assets/uploads/categories/` ### Step 5: Access Admin Panel 1. Go to `https://yourdomain.com/admin/login.php` 2. Default login credentials: - **Username:** admin - **Password:** admin123 3. Change the default password immediately after first login ## Admin Dashboard URL ``` https://yourdomain.com/admin/login.php ``` ## Default Admin Credentials - **Username:** admin - **Password:** admin123 **IMPORTANT:** Change the default password after first login! ## Security Features ### Admin Login Security - All login attempts are logged with: - IP Address - Browser information - Operating System - Device type - User Agent - Timestamp - Success/Failure status ### Failed Login Protection - Tracks failed login attempts - Shows warning after multiple failed attempts - IP-based logging for security analysis ### CSRF Protection - All forms include CSRF tokens - Token validation on all POST requests ### File Upload Security - Allowed file types: jpg, jpeg, png, gif, webp - Maximum file size: 5MB - Unique filename generation - File type validation ## Directory Structure ``` srgroup/ ├── admin/ # Admin dashboard │ ├── assets/ # Admin CSS/JS │ ├── includes/ # Admin header/sidebar │ ├── *.php # Admin pages │ └── .htaccess # Admin security ├── assets/ # Frontend assets │ ├── css/ # Stylesheets │ ├── js/ # JavaScript files │ ├── images/ # Static images │ └── uploads/ # Uploaded files ├── includes/ # Core files │ ├── config.php # Database config │ └── functions.php # Common functions ├── database.sql # Database schema ├── .htaccess # Apache config ├── error.php # Error page ├── index.php # Home page ├── contact-submit.php # Contact form handler └── README.md # This file ``` ## Database Tables ### Core Tables - `admin` - Admin users - `admin_login_logs` - Login activity tracking - `site_settings` - Website configuration ### Content Tables - `banners` - Homepage banners - `services` - Services offered - `service_applications` - Customer inquiries - `products` - Product listings - `product_categories` - Product categories - `statistics` - Homepage statistics - `why_choose_us` - Why choose us items ### Site Management Tables - `sites` - Work sites - `teams` - Work teams - `site_team_assignments` - Team-site assignments ## WhatsApp Integration When a customer clicks on a service and submits the inquiry form: 1. Their information is saved to the database 2. They are redirected to WhatsApp with a pre-filled message 3. Admin can view all applications in the dashboard 4. Each service can have its own WhatsApp number ## Customization ### Change Site Title/Logo Go to Admin → Site Settings → General Settings ### Update Contact Information Go to Admin → Site Settings → Contact Information ### Add Social Media Links Go to Admin → Site Settings → Social Media Links ### Manage Homepage Content - Banners: Admin → Banners - Services: Admin → Services - Products: Admin → Products - Statistics: Admin → Statistics - Why Choose Us: Admin → Why Choose Us ## Troubleshooting ### HTTP ERROR 500 1. Check PHP version (must be 7.4+) 2. Check database connection in `includes/config.php` 3. Check file permissions 4. Check Apache error logs ### Database Connection Error 1. Verify database credentials in `includes/config.php` 2. Ensure MySQL is running 3. Check if database exists ### File Upload Not Working 1. Check `assets/uploads/` directory permissions 2. Ensure PHP file_uploads is enabled 3. Check PHP upload_max_filesize ### Admin Login Not Working 1. Clear browser cookies 2. Check database connection 3. Reset admin password directly in database: ```sql UPDATE admin SET password = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi' WHERE username = 'admin'; ``` This sets password back to `admin123`. ## Support For support or customization, please contact: - Email: support@srgroupsecuritysystem.com - Phone: 9664496934 ## License This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited. ## Version History ### Version 1.0 (2024) - Initial release - Complete admin dashboard - WhatsApp integration - Site management system - Security features --- **Developed by SRGROUPSECURITYSYSTEM Team**