HEX
Server: Apache
System: Linux server1.royalgt4.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: mostafedeg (1125)
PHP: 5.6.40
Disabled: mail,passthru,parse_ini_file,show_source,eval,assert,pcntl_exec,dl,putenv,proc_open,popen
Upload Files
File: /home/mostafedeg/public_html/erp/controllers/knownwaysreportAjaxController.php
<?php

session_start();
ob_start();

//global varable
global $showoutside;

//to check if the page from .htacess
//$showoutside = $_GET['sn'];
// get the config file
include_once("../public/config.php");



//here the db files that include in the file
// GOES HERE ....................
include("../public/include_dao.php");

//Sellbill
require_once('../models/dao/SellbillDAO.class.php');
require_once('../models/dto/Sellbill.class.php');
require_once('../models/mysql/SellbillMySqlDAO.class.php');
require_once('../models/mysql/ext/SellbillMySqlExtDAO.class.php');

//Client
require_once('../models/dao/ClientDAO.class.php');
require_once('../models/dto/Client.class.php');
require_once('../models/mysql/ClientMySqlDAO.class.php');
require_once('../models/mysql/ext/ClientMySqlExtDAO.class.php');




//get the do the action
$do = $_GET['do'];


/* ======================

  Controller Name :- userAjaxCTRL

  OPERTATION in Controller

  1-display add form
  2- add in Save tbl
  3-display sucess or error
  4-display show form
  5-delete from Save tbl
  6-edit in Save data

  ======================== */




//here goes the instances and general variables
//Sellbill
$Sellbill = new Sellbill();
$SellbillDAO = new SellbillMySqlDAO();
$SellbillEX = new SellbillMySqlExtDAO();

//Client
$client = new Client();
$clientDAO = new ClientMySqlDAO();
$clientEX = new ClientMySqlExtDAO();

//KnownWays
$knownWays = new Knownway();
$knownWaysDAO = new KnownwaysMySqlDAO();
$knownWaysExt = new KnownwaysMySqlExtDAO();





if ($do == "showClientsData") {
  $wayid = $_GET['id'];
  $sellBillData = $SellbillEX->queryClientByKnownWay($wayid);
  $clientArr = [];
  foreach ($sellBillData as $bill) {
    $clientArr[] = $clientDAO->load($bill->sellbillclientid);
  }
  $smarty->assign('allClients', $clientArr);
  return $smarty->display('knownwaysreportview/modaldata.html');
}


/* ===============================
  function in this CONTROLLER
  ================================ */