Undefined
By: Guest | Date: Dec 6 2009 19:24 | Format: PHP | Expires: never | Size: 1.53 KB | Hits: 1305
- <?php
- /*
- * This is generating the date's (horizontal)
- */
- echo '<body>';
- echo '<table class="rooster">';
- echo ' <tr>';
- echo ' <td width="20" class="roosterDate"></td>';
- $firstday = 1;
- while ($firstday <= $lastday) {
- echo '<td width="35" class="roosterDate">';
- echo '<br />';
- echo '</td>';
- $firstday++;
- }
- echo '</tr>';
- /*
- * This is getting the data from the database and storing in an array
- */
- $roosterQuery = mysql_query("SELECT `month`, `day`, `hour`, `availability` FROM `rooster` WHERE `month` = '12' AND `availability` = '1'");
- $month = $data["month"];
- $day = $data["day"];
- $hour = $data["hour"];
- $avail = $data["availability"];
- }
- /*
- * This is generating the hours (vertical)
- */
- $hour = 0;
- while ($hour <= 23) {
- echo '<tr>';
- echo '<td width="20" class="roosterTD">';
- echo $hour;
- echo '</td>';
- $firstday = 1;
- while ($firstday <= $lastday) {
- echo '<td width="35" class="roosterTD">';
- //echo $firstday .'-'. $hour;
- echo 'x';
- echo '</td>';
- $firstday++;
- }
- echo '</tr>';
- $hour++;
- }
- echo '</table>'
- ?>
Latest pastes
1 days ago
2 days ago
5 days ago
6 days ago
6 days ago