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"]; echo "<br>"; */
<?php require_once "../libraries/classes/config.php"; require_once "../libraries/classes/clsPosition.php"; require_once "../libraries/classes/clsVoter.php"; $position = new Position(); $positionDtl = $position->getPosition(2); $voter = new Voter(); $name = $voter->searchVoter($_GET["id"]); ?> <form action="../inc/addCandidate.php" method="post"> <?php echo $name[0]['vot_lname'] . ', ' . $name[0]['vot_fname']; ?> <select name="position"> <option value="">Select position</option> <?php for ($ctr = 0; $ctr < count($positionDtl); $ctr++) { echo '<option value="' . $positionDtl[$ctr]["posID"] . '">' . $positionDtl[$ctr]["posName"] . "</option>"; } ?> </select> <input type="submit" value="Add Program Candidate"> </form>
<?php require_once '../classes/config.php'; require_once '../inc/fpdf17/fpdf.php'; require_once '../classes/clsPosition.php'; require_once '../classes/clsCandidate.php'; require_once '../classes/clsVoter.php'; require_once '../classes/clsCourse.php'; //require_once('../classes/clsProgram.php'); $votID1 = $_POST['vot_id']; $pdf = new FPDF('P', 'mm', array(114.3, 330.2)); $position = new Position(); $position_rec = $position->getPosition(1); $candidate = new Candidate(); $candidate_rec = $candidate->getRecordVoted(1, $votID1); $pdf->AddPage(); $pdf->SetFont('Times', '', 11); $pdf->MultiCell(0, 2, 'University of Immaculate Conception', 0, 'C'); $pdf->Ln(); $pdf->MultiCell(0, 2, 'Davao City, Philippines 8000', 0, 'C'); $pdf->Ln(); $pdf->MultiCell(0, 2, 'Student Supreme Government Elections', 0, 'C'); $pdf->Ln(); $pdf->MultiCell(0, 3, 'A.Y. 2012 - 2013', 0, 'C'); $pdf->Ln(); $pdf->MultiCell(0, 3, 'OFFICIAL BALLOT', 0, 'C'); $pdf->Ln(); $pdf->Rect(10, 35, 95, 99, 'D'); $pdf->SetFont('Times', '', 12); $pdf->Cell(10, 8, "SSG Executive"); $pdf->Ln();