" size="2" maxlength="2" /> </p> </td> <td> <p class="edit_default" id="d_days_<?php echo $slot['slot_id']; ?> "><?php echo days_hash_to_text_short($slot['days_hash']); ?> </p> <div style="display: none" id="h_days_<?php echo $slot['slot_id']; ?> "><?php echo days_hash_to_form($slot['days_hash'], $days_letters, $days_short); ?> </div> </td> <td> <p class="edit_default" id="d_update_<?php echo $slot['slot_id']; ?> "><a href="javascript:toggle_edit('<?php echo $slot['slot_id']; ?> ')"><img src="style/images/icons/update.png" alt="Update" title="Update" /></a></p> <p style="display: none" id="h_update_<?php echo $slot['slot_id']; ?> "><input type="button" value="Update" name="update" onclick="javascript:save_edit('<?php
<?php /* * $Id: slot_retrieve.php 16 2010-03-09 10:24:59Z maidenfan $ * Copyright (c) 2010 Craig Watson [ craig@cwatson.org ] * Distributed Under the Mozilla Public License 1.1 [ http://www.mozilla.org/MPL/MPL-1.1.html ] */ if (!defined('IN_OB')) { exit; } $sql = "SELECT * FROM " . SLOTS_TABLE; $template['days_hash_form'] = days_hash_to_form("0000000", $days_letters, $days_short); $template['files'][] = 'slot_create.html'; $template['files'][] = 'slot_retrieve.html'; $template['slots'] = ""; // If we're getting a single row, add the SQL clause if ($row = isset($_GET['row'])) { $sql .= " WHERE slot_id = " . clean_string($_GET['row']); } // Complete the SQL and execute the query $sql .= " ORDER BY time_start ASC, days_hash DESC"; $all_slots = $db->Execute($sql); // Loop through the slots foreach ($all_slots as $slot) { // If this is an Ajax call, just echo the slot. If not, add it to the template if ($ajax) { echo display_slot($slot); } else { $template['slots'] .= display_slot($slot); } }