diff --git a/admin.php b/admin.php index f2662c9..6b7bf2c 100644 --- a/admin.php +++ b/admin.php @@ -34,12 +34,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && $page === 'profile') { } } - $stmt = db()->prepare("UPDATE platform_profile SET name = :name, description = :description, logo_path = :logo, favicon_path = :favicon WHERE id = 1"); + $ctr_no = $_POST['ctr_no'] ?? ''; + $telephone_no = $_POST['telephone_no'] ?? ''; + $email_id = $_POST['email_id'] ?? ''; + + $stmt = db()->prepare("UPDATE platform_profile SET name = :name, description = :description, logo_path = :logo, favicon_path = :favicon, ctr_no = :ctr_no, telephone_no = :telephone_no, email_id = :email_id WHERE id = 1"); $stmt->execute([ 'name' => $name, 'description' => $description, 'logo' => $logo_path, - 'favicon' => $favicon_path + 'favicon' => $favicon_path, + 'ctr_no' => $ctr_no, + 'telephone_no' => $telephone_no, + 'email_id' => $email_id ]); header('Location: ' . app_url('admin.php', ['page' => 'profile', 'saved' => 1])); @@ -114,6 +121,11 @@ render_head( +
  • + > + + +
  • > @@ -135,23 +147,42 @@ render_head(
  • - - - - - @@ -252,18 +283,41 @@ render_head( + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + - + + + + + + + @@ -315,4 +369,4 @@ render_head( - + \ No newline at end of file diff --git a/admin_classes.php b/admin_classes.php index 94e9f00..d5ed423 100644 --- a/admin_classes.php +++ b/admin_classes.php @@ -23,13 +23,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name_ar = $_POST['name_ar'] ?? ''; $desc_en = $_POST['description_en'] ?? ''; $desc_ar = $_POST['description_ar'] ?? ''; + $status = $_POST['status'] ?? 'active'; if ($post_action === 'edit' && $post_id > 0) { - $stmt = db()->prepare("UPDATE classes SET name_en=?, name_ar=?, description_en=?, description_ar=? WHERE id=?"); - $stmt->execute([$name_en, $name_ar, $desc_en, $desc_ar, $post_id]); + $stmt = db()->prepare("UPDATE classes SET name_en=?, name_ar=?, description_en=?, description_ar=?, status=? WHERE id=?"); + $stmt->execute([$name_en, $name_ar, $desc_en, $desc_ar, $status, $post_id]); } else { - $stmt = db()->prepare("INSERT INTO classes (name_en, name_ar, description_en, description_ar) VALUES (?, ?, ?, ?)"); - $stmt->execute([$name_en, $name_ar, $desc_en, $desc_ar]); + $stmt = db()->prepare("INSERT INTO classes (name_en, name_ar, description_en, description_ar, status) VALUES (?, ?, ?, ?, ?)"); + $stmt->execute([$name_en, $name_ar, $desc_en, $desc_ar, $status]); } header('Location: ' . app_url('admin.php', ['page' => 'classes'])); exit; @@ -84,6 +85,7 @@ $items = $stmt->fetchAll(PDO::FETCH_ASSOC); ID + @@ -95,6 +97,13 @@ $items = $stmt->fetchAll(PDO::FETCH_ASSOC);
    + + + + + + + @@ -120,6 +129,13 @@ $items = $stmt->fetchAll(PDO::FETCH_ASSOC);
    +
    + + +
    @@ -179,6 +195,13 @@ $items = $stmt->fetchAll(PDO::FETCH_ASSOC);