File: /home/mostafedeg/public_html/erp/controllers/getSupplierDept.php
<?php
//the global file operation
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");
//Supplier
require_once('../models/dao/SupplierDAO.class.php');
require_once('../models/dto/Supplier.class.php');
require_once('../models/mysql/SupplierMySqlDAO.class.php');
require_once('../models/mysql/ext/SupplierMySqlExtDAO.class.php');
//get the do the action
$do = $_GET['do'];
/* ======================
Controller Name :- Setting Operation Controll
OPERTATION in Controller
1-display Worker no
======================== */
//here goes the instances and general variables
//supplier
$supplier = new Supplier();
$supplierDAO = new SupplierMySqlDAO();
$supplierEX = new SupplierMySqlExtDAO();
//Checkcontroller
//check and use the condetion that suite this action
/* ===============================
function in this CONTROLLER
================================ */
if ($do == "getsuppliercurrentDebt") {
$supID = $_GET["supplierid"];
$getsuppliercurrentDebt = $supplierEX->querysuppliercurrentDebt($supID);
//echo $getsuppliercurrentDebt;
$dept = $getsuppliercurrentDebt[0]->suppliercurrentDebt;
echo $dept;
//print_r($dept) ;
}
?>