<?php
session_start();
if (!isset($_SESSION['lang'])) {
    $_SESSION['lang'] = 'en';
}
if (isset($_GET['lang'])) {
    $_SESSION['lang'] = $_GET['lang'] === 'ar' ? 'ar' : 'en';
}

require_once 'db/config.php';
require_once 'lang.php';
require_once 'helpers.php';

require_once __DIR__ . '/includes/auth.php';
check_auth();

$db = db();
$lang = $_SESSION['lang'];
$section = 'positions';

require_once 'includes/actions.php';
require_once 'includes/common_data.php';

include 'includes/layout/header.php';
include 'includes/pages/positions.php';
include 'includes/layout/footer.php';