function sendReservationNoticeToUser($email, $resid, $status, $adminMessage) { $message = "Your reservation's status has been updated to: " . getStatusString($status) . ". To view your reservation please visit this address: " . getConfigVar("location") . "index.php?pageid=viewreservation&&resid=" . $resid . ""; if ($adminMessage != "") { $message = "Your reservation's status has been updated to: " . getStatusString($status) . " and the admin commented:\n\n" . $adminMessage . "\n\nTo view your reservation please visit this address: " . getConfigVar("location") . "index.php?pageid=viewreservation&&resid=" . $resid . ""; } $subject = "Reservation Status Update"; $headers = 'From: ' . getConfigVar('smtp_email') . "\r\n" . 'Reply-To: ' . getConfigVar('smtp_email') . "\r\n" . 'X-Mailer: PHP/' . phpversion(); //sendMail(getConfigVar('smtp_email'),$email, $subject, $message); mail($email, $subject, $message); }
/** * @author: coster * @date: 30.9.06 * listet alle zimmer auf und erzeugt die tabellenzeilen * */ function showAllRooms($month, $year, $unterkunft_id, $link, $saAktiviert, $sprache) { $zimmerart = getUebersetzungUnterkunft(getZimmerart_EZ($unterkunft_id, $link), $sprache, $unterkunft_id, $link); $attResult = false; if (getPropertyValue(SHOW_ZIMMER_ATTRIBUTE_GESAMTUEBERSICHT, $unterkunft_id, $link) == "true") { $attResult = getAttributes(); } ?> <table border="0" cellspacing="0" cellpadding="0" class="tableColor"> <tr> <td></td> <?php //ausgeben von leeren spalten wenn zusaetzlich attribute da sind: if ($attResult != false) { for ($i = 0; $i < mysqli_num_rows($attResult); $i++) { ?> <td></td><?php } } //ausgeben der tage in namen: $anzahlTageMo = getNumberOfDays($month, $year); for ($i = 1; $i <= $anzahlTageMo; $i++) { $tagName = getDayName($i, $month, $year); ?> <td align="center"><?php echo getUebersetzung($tagName, $sprache, $link); ?> </td> <?php } ?> </tr> <tr> <td><?php echo $zimmerart; ?> </td> <?php //ausgeben der spaltenüberschriften wenn zusaetzlich attribute da sind: if ($attResult != false) { while ($d = mysqli_fetch_array($attResult)) { $bezeichnung = $d["Bezeichnung"]; ?> <td align="center"><?php echo $bezeichnung; ?> </td><?php } } //ausgeben der tage in ziffern: $anzahlTageMo = getNumberOfDays($month, $year); for ($i = 1; $i <= $anzahlTageMo; $i++) { ?> <td align="center"><?php echo $i; ?> </td> <?php } ?> </tr> <?php $res = getZimmer($unterkunft_id, $link); while ($d = mysqli_fetch_array($res)) { $zimmer_id = $d["PK_ID"]; $zimmer_value = $d["Zimmernr"]; ?> <tr> <td align="center"> <?php echo getUebersetzungUnterkunft($zimmer_value, $sprache, $unterkunft_id, $link); ?> </td> <?php //ausgeben der spaltenwerte wenn zusaetzlich attribute da sind: if ($attResult != false) { $attResult = getAttributes(); while ($d = mysqli_fetch_array($attResult)) { $attribut_id = $d["PK_ID"]; $wert = getAttributValue($attribut_id, $zimmer_id); ?> <td align="center"><?php echo $wert; ?> </td><?php } } for ($i = 1; $i <= $anzahlTageMo; $i++) { ?> <td width="20" <?php $statusString = getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "> <?php printResAdmin($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <?php } ?> </table> <?php }
$spend = $stat['spent']; } echo '<tr><td>'; if ($adgroup['adgroup_status'] == AdGroupStatus::ACTIVE) { echo '<input type=button onclick="pauseAdGroup(' . $adgroup_id . ')" value="Pause">'; } else { if ($adgroup['adgroup_status'] == AdGroupStatus::ADGROUP_PAUSED) { echo '<input type=button onclick="resumeAdGroup(' . $adgroup_id . ')" value="Resume">'; } else { if ($adgroup['adgroup_status'] == AdGroupStatus::CAMPAIGN_PAUSED) { echo '<input type=button onclick="pauseAdGroup(' . $adgroup_id . ')" value="Pause*">'; } } } echo '<input type=button onclick="deleteAdGroup(' . $adgroup_id . ')" value="Delete"></td>'; echo '<td>' . $adgroup_id . '</td>' . '<td>' . $adgroup['name'] . '</td>' . '<td style="max-width: 100px;">' . getStatusString($adgroup['adgroup_status']) . '</td>' . '<td>' . getMoneyString($adgroup['max_bid']) . '</td>' . '<td>' . $bid_type . '</td>' . '<td><pre>'; $targeting = $adgroup['targeting']; if ($targeting) { foreach ($targeting as $k => $v) { echo $k . ' ' . var_export($v, true) . "\n"; } } echo '</pre></td>' . '<td width=100px>'; $creative_ids = implode(',', array_map(function ($id) { return trim(sprintf("%20.0f", $id)); }, $adgroup['creative_ids'])); try { $creatives = $facebook->api('', 'get', array('ids' => $creative_ids)); } catch (Exception $e) { } foreach ($creatives as $creative) {
function showYear($month, $year, $unterkunft_id, $zimmer_id, $link, $saAktiviert, $sprache) { ?> <table border="0" cellspacing="0" cellpadding="0" class="tableColor"> <tr> <td class="tableColor"><?php echo getUebersetzung("Januar", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 1, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> " width="30"><?php printResAdmin($zimmer_id, $i, 1, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Februar", $sprache, $link); ?> </td> <?php $schaltjahr = false; for ($i = 1; $i <= getNumberOfDays(2, $year); $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 2, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 2, $year, $saAktiviert, $link); ?> </td> <?php if ($i == 29) { $schaltjahr = true; } } if (!$schaltjahr) { ?> <td class="tableColor"> </td> <?php } ?> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("März", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 3, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 3, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("April", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 30; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 4, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 4, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Mai", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 5, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 5, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Juni", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 30; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 6, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 6, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Juli", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 7, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 7, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("August", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 8, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 8, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("September", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 30; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 9, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 9, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Oktober", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 10, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 10, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("November", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 30; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 11, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 11, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"><?php echo getUebersetzung("Dezember", $sprache, $link); ?> </td> <?php for ($i = 1; $i <= 31; $i++) { ?> <td <?php $statusString = getStatusString($zimmer_id, $i, 12, $year, $saAktiviert, $link); ?> class="<?php echo $statusString; ?> "><?php printResAdmin($zimmer_id, $i, 12, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> </table> <?php }
?> "> <td><p><?php echo $row['author']; ?> </p></td> <td><p><?php echo $row['email']; ?> </p></td> <td><p><?php echo wordwrap($row['auth'], 15, "<br>", true); ?> </p></td> <td><p><?php echo getStatusString($row['status']); ?> </p></td> <? if($row['filename'] != '') { ?> <td><a href="../submit/<?php echo $row['filename']; ?> .pdf">link</a></td> <? } else { ?> <td><p>N/A</p></td> <? } ?> <td><form method="POST" action="rm_peer.php?user_id=<?php echo $user_id; ?>
function reorder_relay($arr, $numlegs) { $out = array(); $rel_tstat = array(); $rel_stat = array(); $rel_radio0 = array(); $rel_radio1 = array(); $rel_radio2 = array(); $sta = array(); $rel_cumul = array(); for ($i = 1; $i <= $numlegs; $i++) { $rel_tstat[$i] = array(); $rel_stat[$i] = array(); $rel_radio0[$i] = array(); $rel_radio1[$i] = array(); $rel_radio2[$i] = array(); $rel_cumul[$i] = array(); } foreach ($arr as $key => $val) { for ($i = 1; $i <= $numlegs; $i++) { $rel_tstat[$i][$key] = $val['relay' . $i]['tstat']; $rel_stat[$i][$key] = $val['relay' . $i]['stat']; } $sta[$key] = $val['team_stat']; if ($sta[$key] <= 1) { for ($i = 1; $i <= $numlegs; $i++) { if ($i == 1) { if ($val['relay' . $i]['radio0'] > 0) { $rel_radio0[$i][$key] = $val['relay' . $i]['radio0']; } if ($val['relay' . $i]['radio1'] > 0) { $rel_radio1[$i][$key] = $val['relay' . $i]['radio1']; } if ($val['relay' . $i]['radio2'] > 0) { $rel_radio2[$i][$key] = $val['relay' . $i]['radio2']; } if ($val['relay' . $i]['tstat'] <= 1 && $val['relay' . $i]['stat'] <= 1 && $val['relay' . $i]['cumul'] > 0) { $rel_cumul[$i][$key] = $val['relay' . $i]['cumul']; } } else { if ($val['relay' . $i]['radio0'] > 0) { if ($val['relay' . ($i - 1)]['cumul'] > 0) { $rel_radio0[$i][$key] = $val['relay' . ($i - 1)]['cumul'] + $val['relay' . $i]['radio0']; } else { } } if ($val['relay' . $i]['radio1'] > 0) { if ($val['relay' . ($i - 1)]['cumul'] > 0) { $rel_radio1[$i][$key] = $val['relay' . ($i - 1)]['cumul'] + $val['relay' . $i]['radio1']; } else { } } if ($val['relay' . $i]['radio2'] > 0) { if ($val['relay' . ($i - 1)]['cumul'] > 0) { $rel_radio2[$i][$key] = $val['relay' . ($i - 1)]['cumul'] + $val['relay' . $i]['radio2']; } else { } } if ($val['relay' . $i]['tstat'] <= 1 && $val['relay' . $i]['stat'] <= 1 && $val['relay' . $i]['cumul'] > 0) { if ($val['relay' . ($i - 1)]['cumul'] > 0) { $rel_cumul[$i][$key] = $val['relay' . $i]['cumul']; } else { $arr[$key]['relay' . $i]['cumul'] = 0; } } } } } } // Ajoute $arr en tant que dernier parametre //array_multisort($rel3_cumul, SORT_ASC, $rel3_radio2, SORT_ASC, $rel3_radio1, SORT_ASC, $rel3_radio0, SORT_ASC, $rel2_cumul, SORT_ASC, $rel2_radio2, SORT_ASC, $rel2_radio1, SORT_ASC, $rel2_radio0, SORT_ASC, $rel1_cumul, SORT_ASC, $rel1_radio2, SORT_ASC, $rel1_radio1, SORT_ASC, $rel1_radio0, SORT_ASC, $sta, SORT_ASC, $arr); for ($i = 1; $i <= $numlegs; $i++) { if ($rel_cumul[$i] != null) { natcasesort($rel_cumul[$i]); } if ($rel_radio0[$i] != null) { natcasesort($rel_radio0[$i]); } if ($rel_radio1[$i] != null) { natcasesort($rel_radio1[$i]); } if ($rel_radio2[$i] != null) { natcasesort($rel_radio2[$i]); } } /* print_r($rel_cumul); echo '<hr />'; print_r($rel_radio0); echo '<hr />'; print_r($rel_tstat); echo '<hr />'; print_r($rel_stat); echo '<hr />'; print_r($sta); echo '<hr />';*/ $place_affichee = 0; $place_stockee = 0; $last_time = -1; for ($i = $numlegs; $i >= 1; $i--) { if ($rel_cumul[$i] != null) { $last_time = -1; foreach ($rel_cumul[$i] as $k => $v) { if (!isset($out[$k])) { $place_stockee++; if ($arr[$k]['relay' . $i]['cumul'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . $i]['cumul']; } for ($j = 1; $j <= $numlegs; $j++) { $displayed_relay[$j] = ''; } for ($j = 1; $j <= $i; $j++) { if (array_key_exists($k, $rel_cumul[$j])) { $displayed_relay[$j] = array_search($k, array_keys($rel_cumul[$j])) + 1; } else { $displayed_relay[$j] = ''; } } $out[$k] = array($arr[$k]['team_stat'], $arr[$k]['timestamp']); for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['tstat']; } $out[$k] = array_merge($out[$k], array($numlegs, $place_affichee, $arr[$k]['team_name'])); for ($j = 1; $j <= $numlegs; $j++) { $temp_arr = array($arr[$k]['relay' . $j]['radio0'], $arr[$k]['relay' . $j]['radio1'], $arr[$k]['relay' . $j]['radio2'], $arr[$k]['relay' . $j]['finish'], $displayed_relay[$j], $arr[$k]['relay' . $j]['cumul']); $out[$k] = array_merge($out[$k], $temp_arr); } for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['name']; } } } } if ($rel_radio2[$i] != null) { $last_time = -1; foreach ($rel_radio2[$i] as $k => $v) { if (!isset($out[$k])) { $place_stockee++; if ($i > 1) { if ($arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio2'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio2']; } } else { if ($arr[$k]['relay' . $i]['radio2'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . $i]['radio2']; } } for ($j = 1; $j <= $numlegs; $j++) { $displayed_relay[$j] = ''; } for ($j = 1; $j < $i; $j++) { if (array_key_exists($k, $rel_cumul[$j])) { $displayed_relay[$j] = array_search($k, array_keys($rel_cumul[$j])) + 1; } else { $displayed_relay[$j] = ''; } } $out[$k] = array($arr[$k]['team_stat'], $arr[$k]['timestamp']); for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['tstat']; } $out[$k] = array_merge($out[$k], array($numlegs, $place_affichee, $arr[$k]['team_name'])); for ($j = 1; $j <= $numlegs; $j++) { $temp_arr = array($arr[$k]['relay' . $j]['radio0'], $arr[$k]['relay' . $j]['radio1'], $arr[$k]['relay' . $j]['radio2'], $arr[$k]['relay' . $j]['finish'], $displayed_relay[$j], $arr[$k]['relay' . $j]['cumul']); $out[$k] = array_merge($out[$k], $temp_arr); } for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['name']; } } } } if ($rel_radio1[$i] != null) { $last_time = -1; foreach ($rel_radio1[$i] as $k => $v) { if (!isset($out[$k])) { $place_stockee++; if ($i > 1) { if ($arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio1'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio1']; } } else { if ($arr[$k]['relay' . $i]['radio1'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . $i]['radio1']; } } for ($j = 1; $j <= $numlegs; $j++) { $displayed_relay[$j] = ''; } for ($j = 1; $j < $i; $j++) { if (array_key_exists($k, $rel_cumul[$j])) { $displayed_relay[$j] = array_search($k, array_keys($rel_cumul[$j])) + 1; } else { $displayed_relay[$j] = ''; } } $out[$k] = array($arr[$k]['team_stat'], $arr[$k]['timestamp']); for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['tstat']; } $out[$k] = array_merge($out[$k], array($numlegs, $place_affichee, $arr[$k]['team_name'])); for ($j = 1; $j <= $numlegs; $j++) { $temp_arr = array($arr[$k]['relay' . $j]['radio0'], $arr[$k]['relay' . $j]['radio1'], $arr[$k]['relay' . $j]['radio2'], $arr[$k]['relay' . $j]['finish'], $displayed_relay[$j], $arr[$k]['relay' . $j]['cumul']); $out[$k] = array_merge($out[$k], $temp_arr); } for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['name']; } } } } if ($rel_radio0[$i] != null) { $last_time = -1; foreach ($rel_radio0[$i] as $k => $v) { if (!isset($out[$k])) { $place_stockee++; if ($i > 1) { if ($arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio0'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . ($i - 1)]['cumul'] + $arr[$k]['relay' . $i]['radio0']; } } else { if ($arr[$k]['relay' . $i]['radio0'] != $last_time) { $place_affichee = $place_stockee; $last_time = $arr[$k]['relay' . $i]['radio0']; } } for ($j = 1; $j <= $numlegs; $j++) { $displayed_relay[$j] = ''; } for ($j = 1; $j < $i; $j++) { if (array_key_exists($k, $rel_cumul[$j])) { $displayed_relay[$j] = array_search($k, array_keys($rel_cumul[$j])) + 1; } else { $displayed_relay[$j] = ''; } } $out[$k] = array($arr[$k]['team_stat'], $arr[$k]['timestamp']); for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['tstat']; } $out[$k] = array_merge($out[$k], array($numlegs, $place_affichee, $arr[$k]['team_name'])); for ($j = 1; $j <= $numlegs; $j++) { $temp_arr = array($arr[$k]['relay' . $j]['radio0'], $arr[$k]['relay' . $j]['radio1'], $arr[$k]['relay' . $j]['radio2'], $arr[$k]['relay' . $j]['finish'], $displayed_relay[$j], $arr[$k]['relay' . $j]['cumul']); $out[$k] = array_merge($out[$k], $temp_arr); } for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['name']; } } } } } if ($sta != null) { foreach ($sta as $k => $v) { if ($v > 1) { if (!isset($out[$k])) { $place_affichee = ''; for ($j = 1; $j <= $numlegs; $j++) { $displayed_relay[$j] = ''; } $out[$k] = array($arr[$k]['team_stat'], $arr[$k]['timestamp']); for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['tstat']; } $out[$k] = array_merge($out[$k], array($numlegs, $place_affichee, $arr[$k]['team_name'])); for ($j = 1; $j <= $numlegs; $j++) { $temp_arr = array($arr[$k]['relay' . $j]['radio0'], $arr[$k]['relay' . $j]['radio1'], $arr[$k]['relay' . $j]['radio2'], $arr[$k]['relay' . $j]['finish'], $displayed_relay[$j], $arr[$k]['relay' . $j]['cumul']); $out[$k] = array_merge($out[$k], $temp_arr); } for ($j = 1; $j <= $numlegs; $j++) { $out[$k][] = $arr[$k]['relay' . $j]['name']; } } } } } for ($j = 1; $j <= $numlegs; $j++) { foreach ($out as $k => $v) { $min = 5 + $numlegs + 6 * ($j - 1); $max = $min + 5; for ($i = $min; $i <= $max; $i++) { //echo '-'.$j.'/'.$i.'-'; if ($i == $max && $rel_tstat[$j][$k] > 1) { $out[$k][$i] = getStatusString($rel_tstat[$j][$k]); } else { if ($i == $max && $rel_stat[$j][$k] > 1) { $out[$k][$i] = getStatusString($rel_stat[$j][$k]); } else { if ($i == $max - 2 && $rel_stat[$j][$k] > 1) { $out[$k][$i] = getStatusString($rel_stat[$j][$k]); } else { if ($i != $max - 1) { $t = $v[$i] / 10; if ($t >= 3600) { $out[$k][$i] = sprintf("%d:%02d:%02d", $t / 3600, $t / 60 % 60, $t % 60); } else { if ($t > 0) { $out[$k][$i] = sprintf("%02d:%02d", $t / 60, $t % 60); } else { $out[$k][$i] = ''; } } } } } } } } } return $out; }
function getStatusString($zimmer_id, $tag, $monat, $jahr, $saAktiviert, $link) { global $root; global $link; global $unterkunft_id; include_once $root . "/include/propertiesFunctions.php"; include_once $root . "/include/zimmerFunctions.php"; //should the reservation state be shown? $showReservation = getPropertyValue(SHOW_RESERVATION_STATE, $unterkunft_id, $link); if ($showReservation != "true") { $showReservation = false; } if ($saAktiviert != "true") { $saAktiviert = false; } //status = 0: frei //status = 1: reserviert //status = 2: belegt if ($monat < 10 && strlen($monat) <= 1) { $monat = "0" . $monat; } if ($tag < 10 && strlen($tag) <= 1) { $tag = "0" . $tag; } $datum = $jahr . "-" . $monat . "-" . $tag; //daten aus datenbank abrufen... $query = "select \n\t\t\t\tStatus\n\t\t\t\tfrom \n\t\t\t\tRezervi_Reservierung\n\t\t\t\twhere \t\t\n\t\t\t\tFK_Zimmer_ID = '{$zimmer_id}' and\n\t\t\t\t('{$datum}' >= Datum_von and '{$datum}' <= Datum_bis)\t\t\t\t\n\t\t\t\t"; $res = mysqli_query($link, $query); if (!$res) { echo "Anfrage {$query} scheitert."; } else { $d = mysqli_fetch_array($res); } $day = getDayName($tag, $monat, $jahr); if ($d["Status"] == "0") { if ($day == "SA" && $saAktiviert) { $statString = "samstagFrei"; } else { $statString = "frei"; } } elseif ($d["Status"] == "1") { if ($day == "SA" && $saAktiviert) { if ($showReservation) { $statString = "samstagReserviert"; } else { $statString = "samstagFrei"; } } else { if ($showReservation) { $statString = "reserviert"; } else { $statString = "frei"; } } } elseif ($d["Status"] == "2") { if ($day == "SA" && $saAktiviert) { $statString = "samstagBelegt"; } else { $statString = "belegt"; } } else { //gewöhnliche farbe der tabelle ausgeben: //$statString = "tableColor"; //oder doch besser, dass diese frei sind? if ($day == "SA" && $saAktiviert) { $statString = "samstagFrei"; } else { $statString = "frei"; } } if (($statString == "samstagFrei" || $statString == "frei") && getPropertyValue(RES_HOUSE, $unterkunft_id, $link) == "true" && hasChildRooms($zimmer_id)) { //if room is a parent, check if the child has another status: $childs = getChildRooms($zimmer_id); while ($c = mysqli_fetch_array($childs)) { $child_zi_id = $c['PK_ID']; $statStringc = getStatusString($child_zi_id, $tag, $monat, $jahr, $saAktiviert, $link); if (!($statStringc == "samstagBelegt" || $statStringc == "belegt")) { break; $statString = $statStringc; } } } else { if (getPropertyValue(RES_HOUSE, $unterkunft_id, $link) != "true" && hasChildRooms($zimmer_id)) { //get all childs of the parent: $childs = getChildRooms($zimmer_id); $occ = "true"; $rse = "true"; $fre = "true"; while ($c = mysqli_fetch_array($childs)) { $child_zi_id = $c['PK_ID']; //check if the child is occupied: $statStringc = getStatusString($child_zi_id, $tag, $monat, $jahr, $saAktiviert, $link); if ($statStringc == "samstagFrei" || $statStringc == "frei") { $occ = "false"; $rse = "false"; break; } elseif ($statStringc == "reserviert" || $statStringc == "samstagReserviert") { $fre = "false"; $occ = "false"; } } if ($occ == "true") { if ($day == "SA" && $saAktiviert) { $statString = "samstagBelegt"; } else { $statString = "belegt"; } } elseif ($rse == "true" && $showReservation) { if ($day == "SA" && $saAktiviert) { $statString = "samstagReserviert"; } else { $statString = "reserviert"; } } else { if ($day == "SA" && $saAktiviert) { $statString = "samstagFrei"; } else { $statString = "frei"; } } } } return $statString; }
function showMonth($month, $year, $unterkunft_id, $zimmer_id, $link, $saAktiviert, $sprache) { //anzahl der tage des monats: $anzahlTage = getNumberOfDays($month, $year); $firstDay = getFirstDayOfMonth($month, $year); $MO = getUebersetzung("MO", $sprache, $link); $DI = getUebersetzung("DI", $sprache, $link); $MI = getUebersetzung("MI", $sprache, $link); $DO = getUebersetzung("DO", $sprache, $link); $FR = getUebersetzung("FR", $sprache, $link); $SA = getUebersetzung("SA", $sprache, $link); $SO = getUebersetzung("SO", $sprache, $link); //erste tag im monat ist ein montag: if ($firstDay == "Mon") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <?php for ($i = 1; $i <= 7; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 8; $i <= 14; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 15; $i <= 21; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 22; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Tue") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <?php for ($i = 1; $i <= 6; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 7; $i <= 13; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 14; $i <= 20; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 21; $i <= 27; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Wed") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <?php for ($i = 1; $i <= 5; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 6; $i <= 12; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 13; $i <= 19; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 20; $i <= 26; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 27; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Thu") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <?php for ($i = 1; $i <= 4; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 5; $i <= 11; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 12; $i <= 18; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 19; $i <= 25; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 26; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Fri") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <?php for ($i = 1; $i <= 3; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 4; $i <= 10; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 11; $i <= 17; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 18; $i <= 24; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 25; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Sat") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <?php for ($i = 1; $i <= 2; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 3; $i <= 9; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 10; $i <= 16; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 17; $i <= 23; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 24; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> </tr> <tr> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } elseif ($firstDay == "Sun") { ?> <table width="100%" border="0" class="tableColor"> <tr> <td colspan="7" class="standardSchriftBold"><?php echo getUebersetzung(parseMonthName($month), $sprache, $link) . " " . $year; ?> </td> </tr> <tr> <td class="tableColor"><?php echo $MO; ?> </td> <td class="tableColor"><?php echo $DI; ?> </td> <td class="tableColor"><?php echo $MI; ?> </td> <td class="tableColor"><?php echo $DO; ?> </td> <td class="tableColor"><?php echo $FR; ?> </td> <td class="tableColor"><?php echo $SA; ?> </td> <td class="tableColor"><?php echo $SO; ?> </td> </tr> <tr> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="<?php echo getStatusString($zimmer_id, 1, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, 1, $month, $year, $saAktiviert, $link); ?> </td> </tr> <tr> <?php for ($i = 2; $i <= 8; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 9; $i <= 15; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 16; $i <= 22; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> </tr> <tr> <?php for ($i = 23; $i <= 28; $i++) { ?> <td class="<?php echo getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> "><?php printRes($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </td> <?php } ?> <td class="<?php if ($anzahlTage >= 29) { echo getStatusString($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 29) { printRes($zimmer_id, 29, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> </tr> <tr> <td class="<?php if ($anzahlTage >= 30) { echo getStatusString($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 30) { printRes($zimmer_id, 30, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="<?php if ($anzahlTage >= 31) { echo getStatusString($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo "tableColor"; } ?> "><?php if ($anzahlTage >= 31) { printRes($zimmer_id, 31, $month, $year, $saAktiviert, $link); } else { echo " "; } ?> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> <td class="tableColor"> </td> </tr> </table><?php } //ende if sonntag }
<?php $oid = trim($_POST['orderID']); if ($oid != null && $oid != "") { require_once 'funcs/functions.php'; //$con = connectDB(); $res = mysql_query("select Status from orders where OrderID='{$oid}'"); $row = mysql_fetch_array($res); $status = $row['Status']; //closeDB($con); echo getStatusString($status); } else { echo "<div style='color: red;'>Please enter an Order ID</div>"; }
if (!$newUser->load()) { continue; } $userPaypalId = paypal_transaction::getPaypalEmail($uid); $newUserPaypalId = paypal_transaction::getPaypalEmail($newUid); $listInfo['rid'] = $rid; $listInfo['rb_uid'] = $uid; $listInfo['rb_username'] = $user->get_variable("users_username"); $listInfo['rb_useremail'] = $user->get_variable("users_email"); $listInfo['rb_userpaypal'] = $userPaypalId; $listInfo['rb_userstatus'] = getStatusString($expireInfo['type']); $listInfo['r_uid'] = $newUid; $listInfo['r_username'] = $newUser->get_variable("users_username"); $listInfo['r_useremail'] = $newUser->get_variable("users_email"); $listInfo['r_userpaypal'] = $newUserPaypalId; $listInfo['r_userstatus'] = getStatusString($newExpireInfo['type']); if ($isPaid) { array_push($isPaidList, $listInfo); } else { array_push($isNotPaidList, $listInfo); } } ?> <!DOCTYPE html> <html> <head> <title>BioBounce.com</title> <meta name = "keywords" content = "biotech, stock, market, swing trading, stock trading" />
function showMonth($month, $year, $unterkunft_id, $zimmer_id, $sprache, $saAktiviert, $link) { //anzahl der tage des monats: $anzahlTage = getNumberOfDays($month, $year); ?> <?php for ($i = 1; $i <= $anzahlTage; $i++) { $res_id = getReservierungID($zimmer_id, $i, $month, $year, $link); $statusString = getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); $gast_id = -1; ?> <div class="row"> <!-- wochentag anzeigen --> <div class="col-sm-1"> <label class="control-label"> <?php echo getUebersetzung(getDayName($i, $month, $year), $sprache, $link); ?> </label> </div> <!-- datum anzeigen --> <div class="col-sm-1 <?php echo $statusString; ?> "> <label class="control-label"> <?php printResAdmin($zimmer_id, $i, $month, $year, $saAktiviert, $link); ?> </label> </div> <!-- gast anzeigen --> <div class="col-sm-3"> <?php if ($statusString != "frei") { ?> <?php //gast-id auslesen: //$gast_id = getReservierungGastID($zimmer_id,$i,$month,$year,$link); $gast_ids = getReservierungGastIDs($zimmer_id, $i, $month, $year, $link); while ($h = mysqli_fetch_array($gast_ids)) { $gast_id = $h["FK_Gast_ID"]; //if child rooms available, check also childs: if (($gast_id == 1 || empty($gast_id)) && getPropertyValue(RES_HOUSE, $unterkunft_id, $link) == "true" && hasChildRooms($zimmer_id)) { //if room is a parent, check if the child has another status: $childs = getChildRooms($zimmer_id); while ($c = mysqli_fetch_array($childs)) { $child_zi_id = $c['PK_ID']; $gast_id = getReservierungGastID($child_zi_id, $i, $month, $year, $link); if ($gast_id != 1 && $gast_id != "") { break; } } } //gast-namen ausgeben: if ($gast_id != 1 && $gast_id != "") { ?> <a href="./gastInfo/index.php?gast_id=<?php echo $gast_id; ?> &zimmer_id=<?php echo $zimmer_id; ?> &jahr=<?php echo $year; ?> &monat=<?php echo $month; ?> "> <?php echo getGuestNachname($gast_id, $link); ?> </a> <?php echo ", "; echo getGuestOrt($gast_id, $link); echo ", EW " . getErwachsene($res_id, $link) . ", K " . getKinder($res_id, $link) . ", " . getPension($res_id, $link); } else { if ($gast_id == "") { } else { echo getUebersetzung("anonymer Gast", $sprache, $link); } } } //ende while gast ids } else { echo " "; } ?> </div> </div> <?php } //ende for ?> <?php }
} else { $year = getTodayYear(); } //ich brauche für jahr einen integer: $year += 1; $year -= 1; //und fürs monat einen integer $month -= 1; $month += 1; $saAktiviert = getPropertyValue(SHOW_OTHER_COLOR_FOR_SA, $unterkunft_id, $link); //anzahl der tage des monats: $anzahlTage = getNumberOfDays($month, $year); $response = ""; for ($i = 1; $i <= $anzahlTage; $i++) { $res_id = getReservierungID($zimmer_id, $i, $month, $year, $link); $statusString = getStatusString($zimmer_id, $i, $month, $year, $saAktiviert, $link); $gast_id = -1; $response .= "<div class=\"row\">"; $response .= "<div class=\"col-sm-1\">"; $response .= "<label class=\"control-label\">"; $response .= getUebersetzung(getDayName($i, $month, $year), $sprache, $link); $response .= "</label>"; $response .= "</div>"; $response .= "<div class=\"col-sm-1 "; $response .= $statusString; $response .= "\">"; $response .= "<label class=\"control-label\">"; $response .= printResAdminAJAX($zimmer_id, $i, $month, $year, $saAktiviert, $link, $unterkunft_id); $response .= "</label>"; $response .= "</div>"; $response .= "<div class=\"col-sm-3\">";