예제 #1
0
 public function run()
 {
     DB::table('voters')->delete();
     // generate some random users
     $users = array('Max Bendickson', 'Hermina Boyce', 'Donella Stith', 'Deborah Steinbach', 'Elbert Harp', 'Jerlene Horan', 'Dinorah Matranga', 'Pat Gaal', 'Barton Weidler', 'Dona Waggener', 'Jesus Jacquez', 'Elza Schiller', 'Fredric Eller', 'Mireille Klemm', 'Arcelia Hammes', 'Arlyne Yingling', 'Deadra Behr', 'Corinna Standard', 'Marleen Trujillo', 'Alina Grout', 'Clint Kirchoff', 'Everette Sickles', 'Vincenzo Rohn', 'Cathi Bohn', 'Antonina Lew', 'Felica Sweeney', 'Davina Cruce', 'Domenica Cappel', 'Hassie Guillaume', 'Kelvin Roane', 'Hiroko Viola', 'Desiree Estevez', 'Edwardo Fey', 'Cristen Quirion', 'Angeles Tamura', 'Marquitta Collette', 'Rosalia Ealey', 'Coralie Boswell', 'Norah Breuer', 'Keitha Lillibridge', 'Kattie Nelsen', 'Chasity Dietrick', 'Franchesca Purtee', 'Hester Gilman', 'Olin Bonn', 'Eldridge Kratochvil', 'Bruna Petti', 'Librada Tellis', 'Gwendolyn Frasure', 'Toshiko Wachter', 'Kiesha Heras', 'Cordia Oiler', 'Demarcus Gervasi', 'Alvera Worden', 'Golden Ference', 'Nakita Mader', 'Portia Bing', 'Deloise Saraiva', 'Oneida Oshields', 'Milton Emrick', 'Mina Stanwood', 'Dorcas Infantino', 'Ardelia Goodson', 'Ja Feagins', 'Karyl Kearns', 'Darline Roles', 'Sharron Daulton', 'Kali Arrigo', 'Shara Traub', 'Jonie Condon', 'Cassie Laura', 'Ignacio Woolum', 'Benny Anton', 'Clifton Lachapelle', 'Guillermina Hoos', 'Margaret Tavera', 'Pauline Moodie', 'Juliette Marcinko', 'Saran Toal', 'Tomas Kleinschmidt', 'Elma Bogner', 'Leigh Washinton', 'Natasha Matlock', 'Barry Leonetti', 'Zack Ponder', 'Shoshana Paavola', 'Silvia Weese', 'Todd Schwenk', 'Dorothea Kinchen', 'Lincoln Merrigan', 'Lora Depaz', 'Lavern Kluge', 'Suzette Champagne', 'Brandi Hebron', 'Katherina Hovis', 'Maile Charlie', 'Trent Brett', 'Lashaun Slavens', 'Kandice Le', 'Genaro Baver');
     // weed out possible duplicates
     array_filter($users);
     // get seeding!
     foreach ($users as $name) {
         Voter::create(array('name' => $name, 'party_id' => rand(1, 17), 'constituency_id' => rand(1, 650), 'voting' => true));
     }
 }
예제 #2
0
<?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>
예제 #3
0
<?php

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"];
예제 #4
0
<?php

require_once '../libraries/classes/config.php';
require_once '../libraries/classes/clsVoter.php';
$votID1 = $_GET['vid'];
$voter = new Voter();
$count_votes = $voter->countVote($votID1);
if ($count_votes == 1) {
    echo "Votes Counted";
    header('refresh: 1; url = ../accounts');
}
예제 #5
0
<?php

session_start();
require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsVoter.php";
$student = new Voter();
$studentDtl = $student->checkStudentLogin($_POST["student_Id"]);
if ($studentDtl != null) {
    $_SESSION["studentID"] = $studentDtl["vot_id"];
    $_SESSION["programID"] = $studentDtl["prog_id"];
}
header("Location: ../index.php");
예제 #6
0
            if ($y < $ctr) {
                $posId1 = $position_rec[$x]['posID'];
                $posId2 = $candidate_rec[$y]['id'];
                if ($posId1 == $posId2) {
                    $pdf->SetFont('Times', 'I', 9);
                    $pdf->Ln();
                    $pdf->Cell(40, 5, ' ' . $candidate_rec[$y]['lname'] . ', ' . $candidate_rec[$y]['fname']);
                }
            }
        }
    } else {
        $pdf->Ln();
    }
    $pdf->Ln();
}
$voterDtl = new Voter();
$name = $voterDtl->searchVoter($votID1);
$courseDtl = new Course();
$course = $courseDtl->getVotersCourse($votID1);
$program = new Program();
$progName = $program->getStudentProgram($votID1);
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Times', '', 10);
$pdf->MultiCell(0, 5, '---------------------------Voters Information---------------------------', 0, 'C');
$pdf->Cell(10, 5, 'ID No.  ' . $votID1);
$pdf->Ln();
$pdf->Cell(10, 5, 'Name  ' . $name[0]['vot_lname'] . ', ' . $name[0]['vot_fname']);
$pdf->Ln();
예제 #7
0
    $pdf->Cell(40, 5, $position_rec[$x]['posName']);
    $ctr = count($candidate_rec);
    for ($y = 0; $y < count($candidate_rec); $y++) {
        if ($y < $ctr) {
            $posId1 = $position_rec[$x]['posID'];
            $posId2 = $candidate_rec[$y]['id'];
            if ($posId1 == $posId2) {
                $pdf->SetFont('Times', 'B', 9);
                $pdf->Ln();
                $pdf->Cell(40, 5, ' ' . $candidate_rec[$y]['lname'] . ', ' . $candidate_rec[$y]['fname']);
            }
        }
    }
    $pdf->Ln();
}
$voterDtl = new Voter();
$voterDtl->updateBallotTimePrinted($votID1);
$name = $voterDtl->searchVoter($votID1);
$courseDtl = new Course();
$course = $courseDtl->getVotersCourse($votID1);
$program = new Program();
$progCode = $program->getStudentProgram($votID1);
$pdf->Ln();
$pdf->SetFont('Times', 'B', 10);
$pdf->MultiCell(0, 5, 'Voters Information', 1, 'C');
$pdf->SetFont('Times', '', 10);
$pdf->Ln();
$pdf->Cell(10, 4, 'ID No.  ' . $votID1);
$pdf->Ln();
$pdf->Cell(10, 4, 'Name  ' . $name[0]['votLname'] . ', ' . $name[0]['votFname']);
$pdf->Ln();
예제 #8
0
<?php

session_start();
require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsVoter.php";
$user = new Voter();
$userDtl = $user->checkUserId($_POST["user_id"], $_POST["password"]);
//print_r($userDtl);
if ($userDtl == null) {
    echo "LOGIN FAILED";
    header("Refresh:1; url =  ../accounts/index_bei.php");
} else {
    $_SESSION["uLev_id"] = $userDtl["uLev_id"];
    header("Location: ../accounts/index.php");
}
예제 #9
0
<?php

header("Location: ../accounts/index.php");
session_start();
require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsVoter.php";
if (isset($_POST['vot_id'])) {
    $voter = new Voter();
    $_SESSION["voter"] = $voter->searchVoter($_POST['vot_id']);
}