Ejemplo n.º 1
0
    $sq = "select * from Requests where reqNo =" . $id . ";";
    //echo $sq;
    $res = execute($sq);
    $col1 = array("RequestID", "hash", "Request made by:", "Requester Email", "Requester Phone ", "Concerned Person Phone ", "concerned Person Email", " Concerned Person Phone", "Request Status", " Group of Requester", "Request Date", "Event Start Date", "Event End Date", "Event Start Time", "Event End Time ", "Event Title", "Description of Event", "Days of Event", "Id of concerned Admin", "Room", "Request Type", "Reason for accept/reject", "Request Last modified on:");
    $num_row = mysql_num_fields($res);
    $col = mysql_fetch_row($res);
    ?>
 

<?php 
    $gID = getCurGroup();
    $cAdmin = getConcernedAdmin($id);
    if (getRequestStatus($id) != "Pending") {
        //If request is not pending, do not display the form. All other options valid only for pending requests
        if ($gID != 0) {
            echo "<h2 class=\"title\">Already processed!</h2>This request has already been processed. Request status: " . getRequestStatus($id);
        }
    } else {
        if ($gID == 2 && $cAdmin != 2) {
            //If Acad Office is currently logged in, but is not the concerned admin, display a warning
            echo "This request has been delegated to admin group - {$groups[$cAdmin]}. If you stil want to take an action, select an option below.";
        }
        if ($gID == $cAdmin || $gID == 2) {
            //Acad office always gets to see the form, other groups only when request is meant for them
            ?>
<div class = "post">
	<h2 class="title">Take an action</h2>
	<div class="entry">
		<form name="action" method="post" action="acceptReject.php">
		<table class="action-table">
		<tr>
Ejemplo n.º 2
0
//execute($sq2);
//$id=19;
$sq = "select * from Requests where reqNo =" . $id . ";";
//echo $sq;
$res = execute($sq);
$col1 = array("RequestNO", "hash", "Creator", "creatorEmail", "creatorPhone ", "creatorPhone ", "concernedPersonEmail", " concernedPPhone", "appStatus", " reqGId", "reqDate", "eventStartDate", "eventEndDate", "eventStartTime", "eventEndTime ", "eventTitle", "eventDesc", "eventDays", "concernedAdmin", "room", "reqType");
$num_row = mysql_num_fields($res);
$col = mysql_fetch_row($res);
$cAdmin = getConcernedAdmin($id);
$gID = mysql_real_escape_string($_GET['gID']);
?>
 

<?php 
include "header_noCAS.php";
$reqStatus = getRequestStatus($id);
if ($reqStatus != "Pending") {
    if ($gID != 0) {
        echo "<h2 class=\"title\">Already processed</h2>This request has already been processed. Request status: {$reqStatus}";
    }
} else {
    if ($gID != $cAdmin && $gID == 2) {
        echo "This request has been delegated to admin group - {$groups[$cAdmin]}. If you still want to take an action, select an option below.";
    }
    if ($gID == $cAdmin || $gID == 2) {
        ?>
<div class = "post">
	<h2 class="title">Take an action</h2>
	<div class="entry">
		<form name="action" method="post" action="acceptRejectHash.php">
		<table>