File: /home/mostafedeg/public_html/erp/controllers/depositcheckAjaxController.php
<?php
//the global file operation
//include("../public/impOpreation.php");
//global varable
global $showoutside;
//to check if the page from .htacess
//$showoutside = $_GET['sn'];
// get the config file
include_once("../public/config.php");
include_once("../library/num_to_ar.php");
//here the db files that include in the file
// GOES HERE ....................
include("../public/include_dao.php");
include_once("dailyentryfun.php");
require_once('../models/dao/BankaccountDAO.class.php');
require_once('../models/dto/Bankaccount.class.php');
require_once('../models/mysql/BankaccountMySqlDAO.class.php');
require_once('../models/mysql/ext/BankaccountMySqlExtDAO.class.php');
require_once('../models/dao/AccountmovementDAO.class.php');
require_once('../models/dto/Accountmovement.class.php');
require_once('../models/mysql/AccountmovementMySqlDAO.class.php');
require_once('../models/mysql/ext/AccountmovementMySqlExtDAO.class.php');
require_once('../models/dao/BankDAO.class.php');
require_once('../models/dto/Bank.class.php');
require_once('../models/mysql/BankMySqlDAO.class.php');
require_once('../models/mysql/ext/BankMySqlExtDAO.class.php');
//Checkdeposit
require_once('../models/dao/CheckdepositDAO.class.php');
require_once('../models/dto/Checkdeposit.class.php');
require_once('../models/mysql/CheckdepositMySqlDAO.class.php');
require_once('../models/mysql/ext/CheckdepositMySqlExtDAO.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');
//Clientdebtchange
require_once('../models/dao/ClientdebtchangeDAO.class.php');
require_once('../models/dto/Clientdebtchange.class.php');
require_once('../models/mysql/ClientdebtchangeMySqlDAO.class.php');
require_once('../models/mysql/ext/ClientdebtchangeMySqlExtDAO.class.php');
//Breadcrumb
require_once("../library/breadcrumb.php");
//get the do the action
$do = $_GET['do'];
/* ======================
Controller Name :- depositcheckAjaxController
OPERTATION in Controller
1-display add form
2- add in Assets tble
3-display sucess or error
4-display show form
5-delete from Assets tbl
6-edit in Assets data
======================== */
//here goes the instances and general variables
//Clientdebtchange
$Clientdebtchange = new Clientdebtchange();
$ClientdebtchangeDAO = new ClientdebtchangeMySqlDAO();
$ClientdebtchangeEX = new ClientdebtchangeMySqlExtDAO();
//Client
$Client = new Client();
$ClientDAO = new ClientMySqlDAO();
$ClientEX = new ClientMySqlExtDAO();
//Checkdeposit
$Checkdeposit = new Checkdeposit();
$CheckdepositDAO = new CheckdepositMySqlDAO();
$CheckdepositEX = new CheckdepositMySqlExtDAO();
$account = new Bankaccount();
$accountDAO = new BankaccountMySqlDAO;
$accountExtDAO = new BankaccountMySqlExtDAO;
$accountMoveDAO = new AccountmovementMySqlDAO;
$accountMove = new Accountmovement;
$bankDAO = new BankMySqlDAO;
$bank = new Bank;
$bankExtDAO = new BankMySqlExtDAO;
//Accountstree
$accountsTree = new Accountstree();
$accountsTreeDAO = new AccountstreeMySqlDAO();
$accountsTreeEX = new AccountstreeMySqlExtDAO();
//Dailyentry
$dailyEntry = new Dailyentry();
$dailyEntryDAO = new DailyentryMySqlDAO();
$dailyEntryEX = new DailyentryMySqlExtDAO();
//Dailyentrycreditor دائن
$dailyEntryCreditor = new Dailyentrycreditor();
$dailyEntryCreditorDAO = new DailyentrycreditorMySqlDAO();
$dailyEntryCreditorEX = new DailyentrycreditorMySqlExtDAO();
//Dailyentrydebtor مدين
$dailyEntryDebtor = new Dailyentrydebtor();
$dailyEntryDebtorDAO = new DailyentrydebtorMySqlDAO();
$dailyEntryDebtorEX = new DailyentrydebtorMySqlExtDAO();
//Breadcrumb
$breadcrumbObject = new Breadcrumb();
//check and use the condetion that suite this action
if ($do == "getDebt") {
$clientId = filter_input(INPUT_POST, 'clientid');
$clientData = $ClientDAO->load($clientId);
echo $clientData->clientdebt;
}
?>