예제 #1
0
function selectRoom($SchedID)
{
    //-----------------------------------------------------------------------------
    // Retrieve a list of all avaliable rooms
    //-----------------------------------------------------------------------------
    $roomList = getRoomList();
    global $ScheduleTable;
    global $EventID;
    //-----------------------------------------------------------------------------
    // Check to see if scheduled event has room assigned
    //-----------------------------------------------------------------------------
    $roomKey = substr($SchedID, 0, 3) . '%';
    $result = $db->query("select RoomID\n                             from   {$ScheduleTable}\n                             where  SchedID like '{$roomKey}'\n                             and    EventID = {$EventID}\n                            ") or die("Unable to get room ID: " . sqlError());
    $row = $result->fetch(PDO::FETCH_ASSOC);
    if (!empty($row)) {
        $roomIDList = explode(',', $row['RoomID']);
    } else {
        $roomIDList = array(0);
    }
    //-----------------------------------------------------------------------------
    // Set Row background Color
    //-----------------------------------------------------------------------------
    $hour = substr($SchedID, 1, 2);
    if ($hour % 2 == 0) {
        $bgcolor = "#6699FF";
    } else {
        $bgcolor = "#D9D9FF";
    }
    //-----------------------------------------------------------------------------
    // Print the selection Drop-Down
    //-----------------------------------------------------------------------------
    $fieldName = 'Room_' . substr($SchedID, 0, 3) . '[]';
    print "<td bgcolor=\"{$bgcolor}\" align=\"center\">";
    print "<select multiple size=\"4\" name=\"{$fieldName}\">";
    foreach ($roomList as $roomNum => $roomName) {
        if (in_array($roomNum, $roomIDList)) {
            print "<option selected value=\"{$roomNum}\">{$roomName}</option>";
        }
    }
    foreach ($roomList as $roomNum => $roomName) {
        if (!in_array($roomNum, $roomIDList)) {
            print "<option value=\"{$roomNum}\">{$roomName}</option>";
        }
    }
    print "</select>";
    print "</td>";
}
예제 #2
0
function selectRoom($RoomID = '')
{
    //-----------------------------------------------------------------------------
    // Retrieve a list of all avaliable rooms
    //-----------------------------------------------------------------------------
    $roomList = getRoomList('fullnames');
    //-----------------------------------------------------------------------------
    // Print the selection Drop-Down
    //-----------------------------------------------------------------------------
    print "\n<select size=\"1\" name=\"RoomID\">\n";
    print "   <option value=\"\">-Select-</option>\n";
    foreach ($roomList as $roomNum => $roomName) {
        if (intval($RoomID) == intval($roomNum)) {
            print "   <option value=\"{$roomNum}\" selected>{$roomName}</option>\n";
        } else {
            print "   <option value=\"{$roomNum}\">{$roomName}</option>\n";
        }
    }
    print "</select>\n";
}
예제 #3
0
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
include 'include/RegFunctions.php';
if (isset($_REQUEST['Admin']) and $Admin == 'Y') {
    $AdminReport = 1;
} else {
    $AdminReport = 0;
}
$byTime = isset($_REQUEST['byTime']);
//-----------------------------------------------------------------------------
// Retrieve a list of all avaliable rooms
//-----------------------------------------------------------------------------
$roomList = getRoomList();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">

    <head>
       <meta http-equiv="Content-Language" content="en-us">
       <title>
          Scheduled Events Roster
       </title>
    </head>

    <body bgcolor="White">
    <h1 align="center">Schedule Roster</h1>
    <hr>
    <?php 
예제 #4
0
파일: index.php 프로젝트: Wayfur/OpenSMO
					</div>
					<div class="sidebar_right">
						<div class="block">
							<div class="blocktitle">Menu</div>
							<div class="blockcontent">
								<a href="index.php">Home</a><br />
							</div>
						</div>
						<?php 
    if ($_SETTINGS['RTS_Enabled']) {
        ?>
						<div class="block">
							<div class="blocktitle">Rooms</div>
							<div class="blockcontent">
								<?php 
        $rooms = getRoomList();
        if ($rooms === false) {
            echo "<h3 style=\"margin:0px;color:#a00;\">Server Offline!</h3>";
        } else {
            echo "<h3 style=\"margin:0px;color:#0a0;\">Server Online!</h3>";
            foreach ($rooms as $room) {
                echo "<p><b><a href=\"index.php?page=room&rid=" . $room['ID'] . "\">" . $room['Name'] . "</a></b> (" . $room['Players'] . ")<br />" . $room['Description'] . "</p>";
            }
        }
        ?>
							</div>
						</div>
						<?php 
    }
    ?>
						<div class="block">