当前位置: 首页>>代码示例>>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;未经允许,请勿转载。