Beispiel #1
0
<div id="update_form" title="Update whiteboard entry" style='display:none'>
	<form id="wb-update-entry" name="wb-update-entry" method="POST">
    <p class="validateUpdateTips">*All fields required, except Notes field</p>
	<p><label for="date">Date:</label><input class="datepicker" type="text" name="appt_date" maxlength="10" />&nbsp;&nbsp;
   <label >Preferred time:</label>&nbsp;&nbsp;<label for="am">AM<input type="radio" id="am" name="ampm" value="AM" /></label><label for="pm">PM<input type="radio" value="PM" name="ampm"  /></label></p>
   <p><label for="provider">Provider:</label><select id="provider" name="provider">
   	<option value="" selected="selected">[Select a Provider]</option>
   <?php 
echo get_providers();
?>
   </select>&nbsp;&nbsp;
   <label for="location">Location:</label><select id="location" name="location">
   <option value="" selected="selected">[Select a location]</option>
   <option value="Sacramento">Sacramento, Morse</option>
   <option value="Roseville">Roseville, Eureka</option></select></p>
   <p><label for="appt_type">Appointment Type:</label><select id="appt_type" name="appt_type">
   <option value="">[Select one]</option>
   <?php 
echo get_appt_types();
?>
   </select></p>
   <label for="notes">Notes (optional):</label><br />
   <div class="Clear" style="margin-bottom:10px;"></div>
   <textarea name="notes" id="notes" cols="65" rows="5"></textarea>
   </form>
</div>
<div id="generic-dialog" title="Basic dialog" style="display:none">
  <p>This is the default dialog which is useful for displaying information.</p>
</div>
<?php 
include_once "inc/footer.php";
{
    global $mySQLi, $appt_types;
    $sql = "SELECT * FROM `{$appt_types}` ORDER BY 'name';";
    $appts = $mySQLi->get_results($sql);
    if ($appts !== false && $mySQLi->error == '') {
        $out = '';
        foreach ($appts as $row) {
            $out[$row['id']] = $row['name'];
        }
        // loop foreach appt
        return $out;
    }
    // end if appt found without error
    return NULL;
}
$appt_types = get_appt_types();
//**  General utility functions to support one or more of the active ajax functions  **/
function getMySQL_Today()
{
    $phptime = strtotime('today');
    return date("Y-m-d H:i:s", $phptime);
}
function getMySQL_Now()
{
    $phptime = strtotime('now');
    return date("Y-m-d H:i:s", $phptime);
}
function getMySQL_Midnight()
{
    $phptime = strtotime('tomorrow');
    return date("Y-m-d H:i:s", $phptime);