# Euroturk Media - Project Overview ## Description Euroturk Media is a custom PHP-based content management system (CMS) and web portal. It includes features for publishing articles, managing videos & shorts, displaying prayer times (Namaz vakitleri), and a custom administrative panel. ## Tech Stack - **Backend:** PHP (Vanilla) - **Database:** MySQL / MariaDB - **Frontend:** HTML, CSS, JavaScript (Vanilla/jQuery depending on context) - **Architecture:** Procedural/Functional PHP with a modular directory structure using includes. ## Directory Structure - `/admin/` - The administrative dashboard and CMS management scripts. - `/assets/` - Static frontend assets (CSS, JS, images, fonts). - `/config/` - Configuration files (e.g., `security.php`, database connection settings). - `/includes/` - Reusable PHP components (like header, footer, sidebar, DB connection). - `/migrations/` - Database migration scripts for creating and updating tables. ## Key Files & Routes - `index.php` - The main landing page/homepage. - `article.php` - Renders individual news articles or blog posts. - `category.php` - Displays lists of articles within specific categories. - `arama.php` - Search results page. - `watch.php`, `videolar.php`, `shorts-page.php` - Video and Shorts gallery and playback pages. - `namaz-vakitleri.php`, `namaz_page.php` - Prayer times display functionalities. - `iletisim.php` - Contact page. - `maintenance.php` - Under construction/maintenance toggle page. - `blog.php`, `page.php` - Standard page and blog templates. ## Security Overview The application handles security in `/config/security.php` which includes: - Secure Session Configuration (HttpOnly, CSRF protection via SameSite) - Security Headers (XSS-Protection, Content-Type-Options) - Rate limiting for login attempts - CSRF Token generation and validation - Input sanitization functions (`sanitizeInput`) - File upload validation ## Coding Conventions - **PHP:** Procedural/Functional style is heavily used, relying on includes for templating. - **Language:** The site is targeted at a Turkish-speaking audience, thus variables, page names, and content often use Turkish terminology (e.g., `namaz-vakitleri`, `iletisim`, `arama`). - **Includes:** Typically, pages will require/include header and footer components from the `/includes/` directory. ## Maintenance and Updates - Database modifications should be tracked via the `/migrations/` directory. - Security protocols must be strictly adhered to whenever expanding input fields or forms.