<?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("reportfunctions.php");

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

//Programsetting
require_once('../models/dao/ProgramsettingsDAO.class.php');
require_once('../models/dto/Programsetting.class.php');
require_once('../models/mysql/ProgramsettingsMySqlDAO.class.php');
require_once('../models/mysql/ext/ProgramsettingsMySqlExtDAO.class.php');



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

/* ======================
  Controller Name :- profitreportCTRL تقرير أرباح منتج

  OPERTATION in Controller

  1- search with product name or date
  ======================== */

//here the global templates
//$smarty->display("header.html");

//here goes the instances and general variables
$ProgramsettingDAO = new ProgramsettingsMySqlDAO();

//check and use the condetion that suite this action
if ($do == "payed" || empty($do)) {
    include_once("../public/authentication.php");

    $smarty->display("payedview/payed.html");

}
elseif ($do == "notpayed") {
    include_once("../public/authentication.php");

    //here the smarty templates
    $smarty->display("payedview/notpayed.html");
}
elseif ($do == "error") {

    //here the smarty templates
    $smarty->display("error.html");
}

//here the global templates
$smarty->display("footer.html");


?>