<?php
session_start();
define('Admin_USER', true);

$result = array();

switch ($_POST['Option']) {

    case "Delete-Navigation-Category":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/navUtility.php";
        $nav = new navigationUtility;
        $result = $nav->deleteAdminCategory();

        break;
    case "Delete-Navigation-Option":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/navUtility.php";
        $nav = new navigationUtility;
        $result = $nav->deleteAdminCategoryOption();

        break;
    case "Delete-Admin":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/adminUtility.php";
        $admin = new adminUtility;
        $result = $admin->deleteAdmin();

        break;
    case "Delete-CMP":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/cmsClass.php";
        $cms = new cmsClass;
        $result = $cms->deleteCMP();

    break;
    case "Delete-Service":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/serviceClass.php";
        $s = new serviceClass;
        $result = $s->deleteService();

    break;
    case "Delete-Service-Category":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/serviceClass.php";
        $s = new serviceClass;
        $result = $s->deleteServiceCategory();

    break;     
    case "Delete-FAQ":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/faqsClass.php";
        $f = new faqClass;
        $result = $f->deleteFAQ();

    break;
    case "Delete-FAQ-Category":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/faqsClass.php";
        $f = new faqClass;
        $result = $f->deleteCategory();

    break; 
    case "Delete-Staff":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/staffClass.php";
        $s = new staffClass;
        $result = $s->deleteStaffMember();

    break;  
    case "Delete-Testimonial":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/testimonialClass.php";
        $t = new testimonialClass;
        $result = $t->deleteTestimonial();

    break; 
    case "Delete-Resource-Category":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/resourceClass.php";
        $r = new resourcesClass;
        $result = $r->deleteCategory();

    break;
    case "Delete-Resource":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/resourceClass.php";
        $r = new resourcesClass;
        $result = $r->deleteRes();

    break;  
    case "Delete-Doc":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/documentClass.php";
        $d = new docClass;
        $result = $d->deleteDoc();

    break;
    case "Delete-Document-Category":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/documentClass.php";
        $d = new docClass;
        $result = $d->deleteDocumentCategory();

    break;   
    case "Delete-Banner":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/bannersClass.php";
        $b = new bannerClass;
        $result = $b->deleteBanner();

    break;
    case "Delete-Event":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/eventClass.php";
        $e = new eventClass;
        $result = $e->deleteEvent();

    break; 
    case "Delete-Link":

        require_once "../../php/defines.php";
        require_once "../../php/classes/mainClass.php";
        require_once "../../php/classes/linksClass.php";
        $l = new linksClass;
        $result = $l->deleteLink();

    break;
     

    
}

$response = array();
$response['Status'] = $result['Status'];
$response['Msg'] = $result['Msg'];
$response['Class'] = $result['Class'];

echo json_encode($response);

exit;
