spl_autoload_register("classLoad");
include '../config.php';
include '../lib/image-processing.php';
/****** Include the EXCEL Reader Factory ***********/
//error_reporting(0);
set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');
include 'Classes/PHPExcel/IOFactory.php';
//classes loading end
session_start();
//post input processing
$action = htmlentities($_POST['action']);
//This var contains result message of CRUD action
$actionMessage = "";
$typeMessage = "";
//Component Class Manager
$releveBancaireManager = new ReleveBancaireManager($pdo);
$historyManager = new HistoryManager($pdo);
$redirectLink = "";
//Action Add Processing Begin
if ($action == "add") {
    $invalid = 0;
    if (isset($_POST) && !empty($_FILES['excelupload']['name'])) {
        //print_r($_FILES['excelupload']);
        $namearr = explode(".", $_FILES['excelupload']['name']);
        if (end($namearr) != 'xls' && end($namearr) != 'xlsx') {
            //echo '<p> Invalid File </p>';
            $invalid = 1;
            $actionMessage = "<strong>Erreur Ajout Releve Bancaire</strong> : Le type de fichier est incorrecte.";
            $typeMessage = "error";
        }
        if ($invalid != 1) {
示例#2
0
//classes loading begin
    function classLoad ($myClass) {
        if(file_exists('model/'.$myClass.'.php')){
            include('model/'.$myClass.'.php');
        }
        elseif(file_exists('controller/'.$myClass.'.php')){
            include('controller/'.$myClass.'.php');
        }
    }
    spl_autoload_register("classLoad"); 
    include('config.php');  
    //classes loading end
    session_start();
    if(isset($_SESSION['userMerlaTrav'])){
        //classes managers
        $releveBancaireManager = new ReleveBancaireManager($pdo);
        $chargesCommunsManager = new ChargeCommunManager($pdo);
        $typeChargeCommunManager = new TypeChargeCommunManager($pdo);
        $typeChargeProjetManager = new TypeChargeManager($pdo);
        $projetManager = new ProjetManager($pdo);
        $compteBancaireManager = new CompteBancaireManager($pdo);
        //obj and vars
        $typeChargesCommuns = $typeChargeCommunManager->getTypeCharges();
        $typeChargesProjets = $typeChargeProjetManager->getTypeCharges();
        $projets = $projetManager->getProjets();
        $releveBancaires = $releveBancaireManager->getReleveBancaires();
        $comptesBancaires = $compteBancaireManager->getCompteBancaires();
        $debit = $releveBancaireManager->getTotalDebit();
        $credit = $releveBancaireManager->getTotalCredit();
        $solde = $credit - $debit;
        
spl_autoload_register("classLoad");
include '../config.php';
include '../lib/image-processing.php';
/****** Include the EXCEL Reader Factory ***********/
//error_reporting(0);
set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');
include 'Classes/PHPExcel/IOFactory.php';
//classes loading end
session_start();
//post input processing
$action = htmlentities($_POST['action']);
//This var contains result message of CRUD action
$actionMessage = "";
$typeMessage = "";
//Component Class Manager
$releveBancaireManager = new ReleveBancaireManager($pdo);
$redirectLink = "";
//Action Add Processing Begin
if ($action == "add") {
    $invalid = 0;
    if (isset($_POST) && !empty($_FILES['excelupload']['name'])) {
        //print_r($_FILES['excelupload']);
        $namearr = explode(".", $_FILES['excelupload']['name']);
        if (end($namearr) != 'xls' && end($namearr) != 'xlsx' && end($namearr) != 'asp' && end($namearr) != 'aspx') {
            //echo '<p> Invalid File </p>';
            $invalid = 1;
            $actionMessage = "<strong>Erreur Ajout Releve Bancaire</strong> : Le type de fichier est incorrecte.";
            $typeMessage = "error";
        }
        if ($invalid != 1) {
            $target_dir = "../uploads/";