| Current Path : /home/copmadinaarea/.trash/ |
| Current File : /home/copmadinaarea/.trash/README.md |
# COP News Portal A comprehensive news management system for the Church of Pentecost (COP) designed to connect communities across Areas, Districts, and Assemblies worldwide. ## Features ### Core Functionality - **User Management**: Multi-level user accounts (Superuser, Admin, User) - **News Management**: Create, edit, publish, and manage news articles - **Category System**: Organize content by program types (Area, District, Local, General) - **Location-based Organization**: Support for Area, District, and Assembly levels - **Rich Text Editor**: TinyMCE integration for content creation - **Responsive Design**: Mobile-friendly interface with modern UI ### Administrative Features - **Audit Logging**: Complete activity tracking and monitoring - **Reports & Analytics**: Comprehensive reporting with charts and export capabilities - **User Management**: Admin tools for user creation and management - **Settings Management**: System configuration and customization - **Notification System**: User notifications and alerts ### Security & Performance - **Secure Authentication**: Password hashing and session management - **Role-based Access Control**: Granular permissions system - **Input Sanitization**: Protection against common vulnerabilities - **Database Optimization**: Efficient queries and indexing ## Technology Stack - **Backend**: PHP 7.4+ - **Database**: MySQL 5.7+ - **Frontend**: HTML5, CSS3, JavaScript - **Styling**: Custom CSS with Tailwind-inspired utilities - **Rich Text**: TinyMCE Editor - **Charts**: Chart.js for analytics - **Icons**: Font Awesome 6 ## Installation ### Prerequisites - XAMPP/WAMP/LAMP server - PHP 7.4 or higher - MySQL 5.7 or higher - Web browser (Chrome, Firefox, Safari, Edge) ### Setup Instructions 1. **Download and Extract** ``` Extract the project files to your web server directory: - XAMPP: C:\xampp\htdocs\copmadnews\ - WAMP: C:\wamp64\www\copmadnews\ ``` 2. **Database Setup** ```sql -- Create database CREATE DATABASE cop_news_portal; -- Import schema mysql -u root -p cop_news_portal < database/schema.sql ``` 3. **Configuration** - Update database credentials in `config/database.php` if needed - Default settings work with standard XAMPP installation 4. **File Permissions** - Ensure web server has write permissions to `uploads/` directory - Create uploads directory if it doesn't exist 5. **Access the Application** ``` Open your web browser and navigate to: http://localhost/copmadnews/ ``` ## Default Login Credentials ### Superuser Account - **Email**: nabibo2@yahoo.co.uk - **Password**: Swanzy10@ - **Access Level**: Full system administration ## Directory Structure ``` copmadnews/ ├── admin/ # Admin panel files │ ├── index.php # Admin dashboard │ ├── users.php # User management │ ├── categories.php # Category management │ ├── audit.php # Audit logs │ ├── reports.php # Reports & analytics │ └── settings.php # System settings ├── assets/ │ └── css/ │ └── style.css # Main stylesheet ├── classes/ # PHP classes │ ├── User.php # User management │ ├── News.php # News management │ ├── Category.php # Category management │ └── Notification.php # Notification system ├── config/ # Configuration files │ ├── config.php # Global configuration │ └── database.php # Database connection ├── database/ │ └── schema.sql # Database schema ├── news/ # News management │ ├── index.php # News listing │ ├── create.php # Create news │ ├── edit.php # Edit news │ ├── view.php # View news │ └── delete.php # Delete news ├── dashboard.php # User dashboard ├── index.php # Landing page ├── profile.php # User profile ├── logout.php # Logout handler └── README.md # This file ``` ## User Roles & Permissions ### Superuser - Complete system access - User management (create, edit, delete users) - System settings and configuration - All admin and user capabilities ### Admin - User management (limited) - Content moderation - Category management - Reports and analytics - All user capabilities ### User - Create and manage own news articles - View published content - Profile management - Submit news for publication ## Usage Guide ### For Regular Users 1. **Registration** - Visit the homepage - Fill out the registration form - Select appropriate location type and name - Wait for account activation (if required) 2. **Creating News Articles** - Login to your account - Navigate to "Add News" - Fill in article details - Use the rich text editor for content - Save as draft or publish immediately 3. **Managing Articles** - View all your articles in "News" section - Edit, update, or delete your articles - Track article views and engagement ### For Administrators 1. **User Management** - Access Admin panel - Create new user accounts - Modify user permissions and details - Activate/deactivate accounts 2. **Content Management** - Review and moderate submitted content - Manage categories and organization - Monitor system activity through audit logs 3. **System Monitoring** - Generate reports and analytics - Monitor user activity and engagement - Configure system settings and preferences ## Database Schema ### Key Tables - **users**: User accounts and profiles - **news**: News articles and content - **categories**: Content categorization - **notifications**: User notifications - **audit_logs**: System activity tracking - **settings**: System configuration ## Customization ### Theme Colors - Primary: #3B82F6 (Blue) - Secondary: #6B7280 (Grey) - Success: #10B981 (Green) - Warning: #F59E0B (Orange) - Error: #EF4444 (Red) ### Adding Custom Features 1. **New User Fields** - Update database schema - Modify User class methods - Update forms and validation 2. **Additional Content Types** - Extend News class - Add new categories - Update admin interface ## Security Considerations - Change default superuser password immediately - Use HTTPS in production environments - Regular database backups - Keep PHP and MySQL updated - Monitor audit logs for suspicious activity ## Troubleshooting ### Common Issues 1. **Database Connection Error** - Check database credentials in `config/database.php` - Ensure MySQL service is running - Verify database exists and schema is imported 2. **File Upload Issues** - Check file permissions on uploads directory - Verify PHP upload limits in php.ini - Ensure adequate disk space 3. **Login Problems** - Verify user account is active - Check password requirements - Clear browser cache and cookies ### Support For technical support or questions: - Check the audit logs for error details - Review PHP error logs - Ensure all file permissions are correct ## License This project is developed for the Church of Pentecost community. All rights reserved. ## Version History - **v1.0.0** - Initial release with core functionality - User management and authentication - News creation and management - Admin panel and reporting - Responsive design implementation --- **Developed for the Church of Pentecost** *Connecting COP communities worldwide through digital communication*