コード例 #1
0
<?php

require_once "./result_crud.php";
//require_once("./execStep1_crud.php");
require_once "./ipStep1_crud.php";
$committee = $_POST['committee'];
$username = $_POST['username'];
$status = $_POST['status'];
$vares = new result_crud();
//$stats = "InProgress";
if ($committee == "InternationalPress") {
    $com = new ipStep1_crud();
    $find = $com->read($username);
    foreach ($find as $doc) {
        $pos = $doc['positionAvailable'];
    }
    $stats = $vares->ipInsert($username, $committee, $pos, $status);
} else {
    if ($committee == "ExecutiveBoard") {
        $stats = $vares->execInsert($username, $committee, $status);
    } else {
        if ($committee == "Delegates") {
        }
    }
}
echo $stats;
コード例 #2
0
        <p class='lead'>Please Select the Position You would Like To Apply For In International Press<br></p>
	</div>        
	<div class='row'>
		  			<div class="col-lg-6">
			<form class='form-horizontal' role='form' method='post' action='<?php 
echo htmlspecialchars($_SERVER['PHP_SELF']);
?>
' >
	
	<?php 
$info = new info_crud();
$valid = $info->readStatus($username);
if ($valid) {
    echo "<div class='form-group'><label class='control-label col-sm-4' for='pa'>Positions Available:</label><div class='col-sm-8'>";
    $test = new ipStep1_crud();
    $cursor = $test->read($username);
    if ($cursor->count() != 0) {
        foreach ($cursor as $doc) {
            echo "<input class='form-control' type='text' value=" . $doc['positionAvailable'] . " readonly>";
        }
    } else {
        echo "<select class='form-control' id='pa' name='pa' placeholder='' required>";
        echo "<option selected='selected' value='Select' disabled='disable'>Select</option>";
        foreach ($list as $doc) {
            echo "<option class=" . $doc . " name=" . $doc . " value=" . $doc . ">" . $doc . " </option>";
        }
        echo "</select>";
        echo "</div>";
        echo "</div>";
        echo "<div class='form-group'> <div class='col-sm-offset-4 col-sm-8'><button type='submit' class='btn btn-lg btn-primary' name='submit' value='Submit'>Submit</button></div></div>";
    }