Example #1
0
            if ($value !== "NotSelected") {
                $fullName = ldapGleaner($value);
                echo "<tr><td>" . $value . " -- " . $fullName[0] . " " . $fullName[1] . "</td><td><input type='text' name='sentDate3' class='dp' value=" . $row['refLetter_sentDate3'] . "></td></tr>";
            } else {
                echo "<input type='hidden' name='sentDate3' value= 0000-00-00 >";
            }
        } elseif ($key === "refLetter_FKwriterID4") {
            if ($value !== "NotSelected") {
                $fullName = ldapGleaner($value);
                echo "<tr><td>" . $value . " -- " . $fullName[0] . " " . $fullName[1] . "</td><td><input type='text' name='sentDate4' class='dp' value=" . $row['refLetter_sentDate4'] . "></td></tr>";
            } else {
                echo "<input type='hidden' name='sentDate4' value= 0000-00-00 >";
            }
        } elseif ($key === "refLetter_FKwriterID5") {
            if ($value !== "NotSelected") {
                $fullName = ldapGleaner($value);
                echo "<tr><td>" . $value . " -- " . $fullName[0] . " " . $fullName[1] . "</td><td><input type='text' name='sentDate5' class='dp' value=" . $row['refLetter_sentDate5'] . "></td></tr>";
            } else {
                echo "<input type='hidden' name='sentDate5' value= 0000-00-00 >";
            }
        }
    }
    ?>
			        	</table>

			    </fieldset>
			    <fieldset>
			
			    	<legend>Recipient Details</legend>  
			        
			        	<!-- <label for="recipTitle">Title:</label> -->
Example #2
0
    echo "{$deptLngName}";
    ?>
 Reference Letter Requests Application</p> 
		</div><!-- #instructions -->

		<div id="adminList">
			<span id="currAdmins">
	
		<?php 
    $queryRecord = 'SELECT * FROM SRL_tbl_Admin ORDER BY AdminUniqname ASC';
    if (!($result = $db->query($queryRecord))) {
        db_fatal_error('data select issue', $db->error, $queryRecord);
        exit($user_err_message);
    }
    while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
        $fullname = ldapGleaner($row['AdminUniqname']);
        echo '<div class="record" id="record-', $row['id'], '">
				<a href="?delete=', $row['id'], '" class="delete"><span style=color:red;font-weight:bold;>X</span></a>
				<strong>', $row['AdminUniqname'], '</strong>	-- ', $fullname[0], "&nbsp;", $fullname[1], '</div>';
    }
    ?>
			</span>
		</div><!-- testing delete -->
		<br />
		<div id="myAdminForm"><!-- add Admin -->
			If you would like to register another Administrator please enter their <b>uniqname</b> here
			<input type="text" name="name" />
			<button id="adminSub">Add Administrator</button><br /><i>--look up uniqnames using the <a href="https://mcommunity.umich.edu/" target="_blank">Mcommunity directory</a>.</i>	   	

		</div><!-- add Admin -->
<!--
Example #3
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . '/../Support/configEnglishContest.php';
require_once $_SERVER["DOCUMENT_ROOT"] . '/../Support/basicLib.php';
$queryAdmin = "SELECT * FROM tbl_contestadmin ORDER BY uniqname ASC";
$resAdmin = $db->query($queryAdmin);
$resultAdmin = array();
if ($db->error) {
    try {
        throw new Exception("MySQL error {$db->error} <br> Query:<br> {$queryAdmin}", $db->errno);
    } catch (Exception $e) {
        echo "Error No: " . $e->getCode() . " - " . $e->getMessage() . "<br >";
        echo nl2br($e->getTraceAsString());
    }
}
while ($admins = $resAdmin->fetch_assoc()) {
    $fullName = ldapGleaner($admins["uniqname"]);
    array_push($resultAdmin, array('admin' => $admins["uniqname"], 'adminID' => $admins["id"], 'adminFname' => $fullName[0], 'adminLname' => $fullName[1]));
}
echo json_encode(array("result" => $resultAdmin));
$resAdmin->free();
$db->close();
Example #4
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . '/../Support/configSocRefLetV2.php';
$fullName = ldapGleaner($login_name);
// prepare and bind
$stmt = $db->prepare('INSERT IGNORE INTO SRL_tbl_student (student_uniqname, student_Fname, student_Lname) VALUES( ?,?,?)');
$stmt->bind_param('sss', $login_name, $fullName[0], $fullName[1]);
// set parameters and execute
if (!$stmt->execute()) {
    die('Error:  ' . mysqli_error($db));
}
// prepare and bind
$sql = $db->prepare('INSERT INTO SRL_tbl_refLetter (refLetter_FKstudent_uniqname, refLetter_requestDate, refLetter_dueDate, refLetter_positionTitle,
									refLetter_type,refLetter_title,refLetter_Fname,refLetter_Mname,refLetter_Lname,refLetter_suffix,
									refLetter_Email,refLetter_URL,refLetter_institute_name,refLetter_institute_dept,refLetter_institute_room,refLetter_institute_street,
									refLetter_institute_city,refLetter_institute_state,refLetter_institute_country,refLetter_institute_zipcode,refLetter_institute_phone,
									refLetter_specialInstx,refLetter_FKwriterID,refLetter_FKwriterID2,refLetter_FKwriterID3,refLetter_FKwriterID4,refLetter_FKwriterID5)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)');
$sql->bind_param('sssssssssssssssssssssssssss', $_POST['rqstrUniq'], $_POST['rqstrRqstDate'], $_POST['dueDate'], $_POST['posTitle'], $_POST['letterType'], $_POST['recipTitle'], $_POST['recipFname'], $_POST['recipMname'], $_POST['recipLname'], $_POST['recipSuffix'], $_POST['recipEmail'], $_POST['recipURL'], $_POST['recipInst'], $_POST['recipDept'], $_POST['recipRoom'], $_POST['recipStreet'], $_POST['recipCity'], $_POST['recipState'], $_POST['recipCountry'], $_POST['recipZip'], $_POST['recipPhone'], $_POST['recipSpInstx'], $_POST['writerID'], $_POST['writerID2'], $_POST['writerID3'], $_POST['writerID4'], $_POST['writerID5']);
// set parameters and execute
if (!$sql->execute()) {
    die('Error:  ' . mysqli_error($db));
}
?>

<html>
<body>
<div style="width:320px;margin:50px;padding:10px;border-style:ridge;border-width:5px">
		You have submitted your request successfully <br />
  <a style="color:sienna;margin-left:60px" href="../index.php">Return to main page</a>
</div><!-- infoBanner -->
Example #5
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/../Support/configSocRefLetV2.php';
// prepare and bind
$query = $db->prepare('SELECT FK_writer_uniqname FROM SRL_tbl_StudentToWriter WHERE FK_student_uniqname = ? ');
$query->bind_param('s', $login_name);
// set parameters and execute
$query->execute();
$result = array();
$query->bind_result($name);
while ($query->fetch()) {
    $writerName = ldapGleaner($name);
    array_push($result, array('writer' => $name, 'fName' => $writerName[0], 'lName' => $writerName[1]));
}
echo json_encode(array('result' => $result));
Example #6
0
 Application</p>
            </div><!-- #instructions -->
            <div id="adminList">
              <span id="currAdmins">
                <?php 
    $sqlAdmSel = <<<SQL
                SELECT *
                FROM tbl_contestadmin
                ORDER BY uniqname
SQL;
    if (!($resADM = $db->query($sqlAdmSel))) {
        db_fatal_error("data read issue", $db->error, $sqlAdmSel, $login_name);
        exit;
    }
    while ($row = $resADM->fetch_assoc()) {
        $fullname = ldapGleaner($row['uniqname']);
        echo '<div class="record">
                  <button type="button" class="btn btn-xs btn-danger btnDelADM" data-delid="' . $row['id'] . '"><span class="glyphicon glyphicon-remove"></span></button>
                <strong>' . $row['uniqname'] . '</strong>  -- ' . $fullname[0] . " " . $fullname[1] . '</div>';
    }
    ?>
              </span>
            </div>
            <br />
            <div id="myAdminForm"><!-- add Admin -->
            To add an Administrator please enter their <b>uniqname</b> below:<br>
            <input class="form_control" type="text" name="name" /><br>
            <button class="btn btn-info btn-xs" id="adminSub">Add Administrator</button><br /><i>--look up uniqnames using the <a href="https://mcommunity.umich.edu/" target="_blank">Mcommunity directory</a>--</i>
            </div><!-- add Admin -->
          </div>
        </div>
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/../Support/configStudentVisit.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Support/basicLib.php";
$queryFacAppt = <<<SQL
\t\tSELECT * 
\t\tFROM tbl_facAppts
\t\tORDER BY uniqname, appDate, startTime ASC
SQL;
$resultFacAppt = array();
if (!($resFacAppt = $db->query($queryFacAppt))) {
    die("Database query failed.");
}
while ($items = mysqli_fetch_assoc($resFacAppt)) {
    $facFullname = ldapGleaner($items["uniqname"]);
    $start = new DateTime($items["startTime"]);
    $day = new DateTime($items["appDate"]);
    array_push($resultFacAppt, array('id' => $items["id"], 'facFname' => $facFullname[0], 'facLname' => $facFullname[1], 'uniqname' => $items["uniqname"], 'startTime' => $start->format('g:i A'), 'appDate' => $day->format('F jS'), 'roomLoc' => $items["roomLoc"], 'studentName' => $items["studentName"]));
}
echo json_encode($resultFacAppt);
$db->close();