Example #1
0
<?php

//echo "sessb". $_SESSION['BUREAU_ID']. "lessS".$_SESSION['SCHOOL_ID']; //FOR LOGIN ANG ACCOUNT CHECKING
?>
 

<?php 
if ($_SESSION['BUREAU_ID'] != NULL) {
    //For Number of Projects
    $project = new Project();
    $projectnum = $project->ProjectsNumberBureau($_SESSION['BUREAU_ID']);
    //For Consultants -- NEEDS IMPROVEMENTS
    $projectList = $project->listOfprojectsBureau($_SESSION['BUREAU_ID']);
    $TotalconlNumberPerProj = 0;
    $consultant = new Consultant();
    foreach ($projectList as $list) {
        $proj_id = $list->project_id;
        $conlNumberPerProj = $consultant->number_consultant_project($proj_id);
        $TotalconlNumberPerProj = $TotalconlNumberPerProj + $conlNumberPerProj;
    }
    $totalCons = $TotalconlNumberPerProj;
    //For Installments
    $TotalInstNumberPerProj = 0;
    $payment = new Payment();
    foreach ($projectList as $list) {
        $proj_id = $list->project_id;
        $InstNumberPerProj = $payment->number_installment_project($proj_id);
        $TotalInstNumberPerProj = $TotalInstNumberPerProj + $InstNumberPerProj;
    }
    $totalInst = $TotalInstNumberPerProj;
} else {