コード例 #1
0
ファイル: customer.php プロジェクト: hnJaermuseet/JM-booking
$Q_next_entries = mysql_query($SQL);
if (mysql_num_rows($Q_next_entries)) {
    echo '<h2>Slettede bookinger knyttet til ' . $customer['customer_name'] . '</h2>' . chr(10);
    filterLink($filters);
    echo '<br><br>' . chr(10) . chr(10);
    echo '<table style="border-collapse: collapse;">' . chr(10);
    echo ' <tr>' . chr(10);
    echo '  <td class="border"><b>' . __('Starts') . '</b></td>' . chr(10);
    echo '  <td class="border"><b>' . __('Name') . '</b></td>' . chr(10);
    echo '  <td class="border"><b>' . __('Where') . '</b></td>' . chr(10);
    echo '  <td class="border"><b>' . __('Contact person') . '</b></td>' . chr(10);
    echo '  <td class="border"><b>' . __('Phone') . '</b></td>' . chr(10);
    echo '  <td class="border"><b>' . __('E-mail') . '</b></td>' . chr(10);
    echo ' </tr>' . chr(10);
    while ($R = mysql_fetch_assoc($Q_next_entries)) {
        $entry = getEntryParseDatabaseArray($R);
        if (count($entry)) {
            echo ' <tr>' . chr(10);
            echo '  <td class="border"><b>' . date('d-m-Y H:i', $entry['time_start']) . '</b></td>' . chr(10);
            echo '  <td class="border"><a href="entry.php?entry_id=' . $entry['entry_id'] . '">' . $entry['entry_name'] . '</a></td>' . chr(10);
            echo '  <td class="border">';
            $area = getArea($entry['area_id']);
            if (count($area)) {
                echo $area['area_name'] . ' - ';
            }
            $rooms = array();
            foreach ($entry['room_id'] as $rid) {
                if ($rid == '0') {
                    $rooms[] = __('Whole area');
                } else {
                    $room = getRoom($rid);
コード例 #2
0
function getEntry($id)
{
    if (!is_numeric($id) || $id == '0') {
        return array();
    } else {
        $id = (int) $id;
        $Q = mysql_query("select * from `entry` where entry_id = '" . $id . "' limit 1");
        if (!mysql_num_rows($Q)) {
            return array();
        } else {
            return getEntryParseDatabaseArray(mysql_fetch_assoc($Q));
        }
    }
}