Exemplo n.º 1
0
header('refresh: 3; url = ../index.php');
//header('Location: ../index.php');
session_start();
require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsSchoolYear.php";
require_once "../libraries/classes/clsCandidate.php";
require_once "../libraries/classes/clsPosition.php";
require_once "../libraries/classes/clsVoter.php";
$studentID = $_SESSION["studentID"];
$programID = $_SESSION["programID"];
$voter = new Voter();
$schoolYear = new SchoolYear();
$currentSY = $schoolYear->getCurrentSchoolYear();
$candidate = new Candidate();
$ssgCandidate = $candidate->getSSGCandidates();
$programCandidate = $candidate->getProgramCandidates($programID);
$position = new Position();
$ssgPosition = $position->getPosition(1);
$programPosition = $position->getPosition(2);
$ctr = 0;
/*This line displays list of voted candidates from the SSG executive positions*/
//echo "-----------------------------------------------SSG Executive-----------------------------------------------<br>";
for ($pos_y = 0; $pos_y < count($position->getPosition(1)); $pos_y++) {
    if (isset($_POST[$ssgPosition[$pos_y]["posID"]])) {
        for ($cand_x = 0; $cand_x < count($candidate->getSSGCandidates()); $cand_x++) {
            if ($_POST[$ssgPosition[$pos_y]["posID"]] == $ssgCandidate[$cand_x]["candID"]) {
                /*
                echo $ssgPosition[$pos_y]["posName"].": ";
                echo $ssgCandidate[$cand_x]["lname"].", ".$ssgCandidate[$cand_x]["fname"];
                echo " Candidate ID: ".$ssgCandidate[$cand_x]["candID"];
                echo " Position ID: ".$ssgPosition[$pos_y]["posID"];