當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Position::getPosition方法代碼示例

本文整理匯總了PHP中Position::getPosition方法的典型用法代碼示例。如果您正苦於以下問題:PHP Position::getPosition方法的具體用法?PHP Position::getPosition怎麽用?PHP Position::getPosition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Position的用法示例。


在下文中一共展示了Position::getPosition方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Voter

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>";
                */
開發者ID:pathprabu,項目名稱:web_voting,代碼行數:31,代碼來源:submitVote.php

示例2: Position

<?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>
開發者ID:pathprabu,項目名稱:web_voting,代碼行數:26,代碼來源:selectPosition.php

示例3: FPDF

<?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();
開發者ID:pathprabu,項目名稱:web_voting,代碼行數:31,代碼來源:print_ballot_form.php


注:本文中的Position::getPosition方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。