Beispiel #1
0
function output_row($row)
{
    global $ajax, $json_data;
    // print_r($row);
    $values = array();
    // booking name
    $html_name = htmlspecialchars($row['name']);
    $values[] = "<a title=\"{$html_name}\" href=\"view_entry.php?id=" . $row['entry_id'] . "\">{$html_name}</a>";
    // created by
    $values[] = htmlspecialchars($row['create_by']);
    // print [$row["room_id"]];
    $values[] = htmlspecialchars(getRoomName([$row["room_id"]][0]));
    // start time and link to day view
    $date = getdate($row['start_time']);
    $link = "<a href=\"day.php?day={$date['mday']}&amp;month={$date['mon']}&amp;year={$date['year']}&amp;area=" . $row['area_id'] . "\">";
    if (empty($row['enable_periods'])) {
        $link_str = time_date_string($row['start_time']);
    } else {
        list(, $link_str) = period_date_string($row['start_time']);
    }
    $link .= "{$link_str}</a>";
    //    add a span with the numeric start time in the title for sorting
    $values[] = "<span title=\"" . $row['start_time'] . "\"></span>" . $link;
    // description
    $values[] = htmlspecialchars($row['description']);
    if ($ajax) {
        $json_data['aaData'][] = $values;
    } else {
        echo "<tr>\n<td>\n";
        echo implode("</td>\n<td>", $values);
        echo "</td>\n</tr>\n";
    }
}
Beispiel #2
0
function ScheduleEventGet($EventID)
{
    $schedList = array();
    global $EventSchedulesTable;
    $result = $db->query("select   RoomID,\n                                       StartTime\n                              from     {$EventSchedulesTable}\n                              where    EventID = {$EventID}\n                              order by RoomID, StartTime\n                              ") or die("Unable to get schedule information for event: " . sqlError());
    while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
        $schedList[TimeToStr($row['StartTime'])] = getRoomName(isset($row['RoomID']) ? $row['RoomID'] : "No Room");
    }
    return $schedList;
}
Beispiel #3
0
/**
 *  获得价格,房型信息的基本信息
 *
 * @access    private
 * @return    arr
 */
function getprice($id)
{
    global $dsql, $sys_webid;
    $arr = array();
    $sql = "select * from #@__hotel_room where id={$id} and webid=0";
    $row = $dsql->GetOne($sql);
    if (is_array($row)) {
        $arr[0] = $row['price'];
        $arr[1] = getRoomName($row);
    }
    return $arr;
}
Beispiel #4
0
function GetHotelroomByHotelId($hotelid, $ticketid, $lineid, $webid)
{
    global $dsql;
    $sql = "select * from #@__hotel_room where hotelid='{$hotelid}' and webid='{$webid}'";
    $res = $dsql->getAll($sql);
    $str = '';
    $idx = 0;
    foreach ($res as $row) {
        $idx++;
        $str .= '<tr class="bor_b">
                          <td height="99" align="center" class="border-r font-ys">套餐' . $idx . '   </td>
                          <td height="99" align="center" class="border-r cor_bg">' . GetTicketByTicketId($ticketid, $webid) . '</td>
                          <td height="99" align="left" class="border-r pad_left">' . getRoomName($row) . '</td>
                          <td height="99" align="center" class="border-r"><span style=" font-weight:bold; margin-bottom:10px">套餐总计价格:' . getTotalCount($row['id'], $ticketid) . '</span><br /><br /><input type="button" name="button" id="button" value="" onclick="showDiv(this, ' . $row['id'] . ', ' . $ticketid . ', ' . $lineid . ')" /></td>
                        </tr>';
    }
    return $str;
}
Beispiel #5
0
<?php

//----------------------------------------------------------------------------
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<?php 
include 'include/RegFunctions.php';
$RoomID = $_REQUEST['RoomID'];
$RoomName = getRoomName($RoomID);
if (isset($_POST['Confirm'])) {
    $db->query("delete from {$RoomsTable} where RoomID='{$RoomID}'") or die("Unable to delete Room record: " . sqlError());
    $db->query("delete from {$EventScheduleTable} where RoomID='{$RoomID}'") or die("Unable to delete Room record from schedule table: " . sqlError());
    ?>
      <head>
         <title>
            Room Deleted
         </title>
      </head>
      <body style="background-color: rgb(217, 217, 255);">
         <h1 align="center">
            Room <?php 
    print $RoomName;
    ?>
 Deleted!
         </h1>
Beispiel #6
0
function add2Room($clientID, $user_id, $room)
{
    global $Server;
    $mes = 'Приглашен в комнату пользователем ' . $Server->wsClients[$clientID][13];
    // sendMess($id, $data);
    addHistory($user_id, $mes, '000', $room);
    if (getRoom($room, $user_id)) {
        updateRoom($room, false, $user_id);
    } else {
        updateRoom($room);
    }
    foreach ($Server->wsClients as $id => $data) {
        if ($data[15] != $room) {
            if ($data[12] == $user_id) {
                sendMess($id, array('System', $Server->wsClients[$clientID][13] . ' пригласил Вас в чат <a href="index.php?module=kChat&room=' . $room . '">"' . getRoomName($room, $data[12]) . '"</a>', '000;font-weight:bolder'));
                getRooms($id);
            }
        } else {
            getUsers($id, $room);
        }
    }
}