<?php
include __DIR__ . "/_models/functions/products_ajax_functions.php";
function productAjaxCallEndOfThisPage()
{

  if (isset($_GET['page'])) {
    $page = $_GET['page'];
    $ajax = new product_ajax();
    switch ($page) {
      case 'addNewUser':
        $ajax->addNewUser();
        break;
      case 'editUser':
        $ajax->editUser();
        break;
      case 'getUserReport':
        $ajax->getUserReport();
        break;
      case 'addNewStaff':
        $ajax->addNewStaff();
        break;
      case 'editStaff':
        $ajax->editStaff();
        break;
      case 'deleteStaff':
        $ajax->deleteStaff();
        break;
      case 'getStaffSalary':
        $ajax->getStaffSalary();
        break;
      case 'getStaffReport':
        $ajax->getStaffReport();
        break;
      case 'checkInCheckOut':
        $ajax->checkInCheckOut();
        break;
      case 'fetchChatUsers':
        $ajax->fetchChatUsers();
        break;
      case 'fetchMessages':
        $ajax->fetchMessages();
        break;
      case 'fetchChatUserDetail':
        $ajax->fetchChatUserDetail();
        break;
      case 'sendMessage':
        $ajax->sendMessage();
        break;
      case 'sendFileMessage':
        $ajax->sendFileMessage();
        break;
      case 'fetchGroupMessages':
        $ajax->fetchGroupMessages();
        break;
      case 'sendGroupMessage':
        $ajax->sendGroupMessage();
        break;
      case 'createChatGroup':
        $ajax->createChatGroup();
        break;
      case 'addNewProject':
        $ajax->addNewProject();
        break;
      case 'updateProjectSort':
        $ajax->updateProjectSort();
        break;
      case 'getClientCompanies':
        $ajax->getClientCompanies();
        break;
      case 'getClientProjects':
        $ajax->getClientProjects();
        break;
      case 'createInvoice':
        $ajax->createInvoice();
        break;
      case 'editInvoice':
        $ajax->editInvoice();
        break;
      case 'addNewInquiry':
        $ajax->addNewInquiry();
        break;
      case 'addNewTicket':
        $ajax->addNewTicket();
        break;
      case 'editTicket':
        $ajax->editTicket();
        break;
      case 'addNewEvent':
        $ajax->addNewEvent();
        break;
      case 'editEvent':
        $ajax->editEvent();
        break;
      case 'deleteEvent':
        $ajax->deleteEvent();
        break;
      case 'addNewDailyExpense':
        $ajax->addNewDailyExpense();
        break;
      case 'editExpense':
        $ajax->editExpense();
        break;
      case 'deleteDailyExpense':
        $ajax->deleteDailyExpense();
        break;
      case 'addNewDesignation':
        $ajax->addNewDesignation();
        break;
      case 'editDesignation':
        $ajax->editDesignation();
        break;
      case 'deleteDesignation':
        $ajax->deleteDesignation();
        break;
      case 'addNewProjectType':
        $ajax->addNewProjectType();
        break;
      case 'editProjectType':
        $ajax->editProjectType();
        break;
      case 'deleteProjectType':
        $ajax->deleteProjectType();
        break;
      case 'addNewInvoiceStatus':
        $ajax->addNewInvoiceStatus();
        break;
      case 'editInvoiceStatus':
        $ajax->editInvoiceStatus();
        break;
      case 'deleteInvoiceStatus':
        $ajax->deleteInvoiceStatus();
        break;
      case 'addNewProjectStatus':
        $ajax->addNewProjectStatus();
        break;
      case 'editProjectStatus':
        $ajax->editProjectStatus();
        break;
      case 'deleteProjectStatus':
        $ajax->deleteProjectStatus();
        break;
      case 'addNewProjectCategory':
        $ajax->addNewProjectCategory();
        break;
      case 'editProjectCategory':
        $ajax->editProjectCategory();
        break;
      case 'deleteProjectCategory':
        $ajax->deleteProjectCategory();
        break;
      case 'addNewService':
        $ajax->addNewService();
        break;
      case 'editService':
        $ajax->editService();
        break;
      case 'deleteService':
        $ajax->deleteService();
        break;
      case 'addNewExpenseCategory':
        $ajax->addNewExpenseCategory();
        break;
      case 'editExpenseCategory':
        $ajax->editExpenseCategory();
        break;
      case 'deleteExpenseCategory':
        $ajax->deleteExpenseCategory();
        break;
      case 'addNewTicketCategory':
        $ajax->addNewTicketCategory();
        break;
      case 'editTicketCategory':
        $ajax->editTicketCategory();
        break;
      case 'deleteTicketCategory':
        $ajax->deleteTicketCategory();
        break;
      case 'saturdaysOffAdd':
        $ajax->saturdaysOffAdd();
        break;
      case 'addNote':
        $ajax->addNote();
        break;
      case 'getNotes':
        $ajax->getNotes();
        break;
      case 'forgotPassword':
        $ajax->forgotPassword();
        break;
      case 'verifyCode':
        $ajax->verifyCode();
        break;
      case 'changePassword':
        $ajax->changePassword();
        break;
      case 'updatePassword':
        $ajax->updatePassword();
        break;
      case 'getNotifications':
        $ajax->getNotifications();
        break;
      case 'markNotificationRead':
        $ajax->markNotificationRead();
        break;
      case 'searchAll':
        $ajax->searchAll();
        break;
      case 'getChartsData':
        $ajax->getChartsData();
        break;
      case 'sendWhatsAppMessage':
        $ajax->sendWhatsAppMessage();
        break;
      case 'saveWaTemplate':
        $ajax->saveWaTemplate();
        break;
      case 'deleteWaTemplate':
        $ajax->deleteWaTemplate();
        break;
      case 'saveWaRule':
        $ajax->saveWaRule();
        break;
      case 'deleteWaRule':
        $ajax->deleteWaRule();
        break;
      case 'waList':
        $ajax->waList();
        break;
      case 'waLoadThread':
        $ajax->waLoadThread();
        break;
      case 'waSendFromThread':
        $ajax->waSendFromThread();
        break;
      case 'waBulkEnqueue':
        $ajax->waBulkEnqueue();
        break;
      case 'fetchMetaLeadDetails':
        $ajax->fetchMetaLeadDetails();
        break;
      case 'deleteMetaLead':
        $ajax->deleteMetaLead();
        break;
      case 'detectionDetailsAjax':
        $ajax->detectionDetailsAjax();
        break;
      case 'saveReviewNoteAjax':
        $ajax->saveReviewNoteAjax();
        break;
      case 'updateDetectionStatusAjax':
        $ajax->updateDetectionStatusAjax();
        break;
      case 'search':
        $ajax->search();
        break;
      case 'searchByName':
        $ajax->searchByName();
        break;
      case 'searchByFullName':
        $ajax->searchByFullName();
        break;
      case 'searchByNationality':
        $ajax->searchByNationality();
        break;
      case 'searchAll2':
        $ajax->searchAll2();
        break;
      case 'sqlLikeSafe':
        $ajax->sqlLikeSafe();
        break;
      case 'parseNameParts':
        $ajax->parseNameParts();
        break;
      case 'scoreCandidates':
        $ajax->scoreCandidates();
        break;
      case 'normalizeText':
        $ajax->normalizeText();
        break;
      case 'pfa_search_html':
        $ajax->pfa_search_html();
        break;
      case 'similarityScore':
        $ajax->similarityScore();
        break;
      case 'escapeSql':
        $ajax->escapeSql();
        break;
    }
  }
}
productAjaxCallEndOfThisPage();
