Changeset 146
- Timestamp:
- Feb 15, 2009, 7:05:22 PM (16 years ago)
- Location:
- www
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
www/otevreno.php
r76 r146 1 1 <?php 2 2 include('style.php'); 3 ShowHeader('Důležité otvírací doby','Otvírací doby'); 3 4 ShowHeader('Otvírací doby místních subjektů', 'Otvírací doby'); 5 $DaysOfWeek = array('Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota', 'Neděle'); 6 7 function Show() 8 { 9 global $Database, $DaysOfWeek; 10 11 $Output = '<div align="center">'; 12 $DbResult = $Database->query('SELECT SubjectOpenTime.*, DATE_FORMAT(SubjectOpenTime.UpdateTime, "%e.%c.%Y") as UpdateTime, Subject.Name as Name FROM SubjectOpenTime JOIN Subject ON Subject.Id = SubjectOpenTime.Subject'); 13 while($Subject = $DbResult->fetch_array()) 14 { 15 $Output .= '<strong>'.$Subject['Name'].':</strong><br />'; 16 $DbResult2 = $Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(CloseTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") > OpenTime AND DATE_FORMAT(NOW(), "0000-01-%w %T") < CloseTime AND Subject='.$Subject['Subject']); 17 if($DbResult2->num_rows > 0) 18 { 19 $DbRow = $DbResult2->fetch_array(); 20 $Output .= 'Zavírá za '.$DbRow['RemainTime']; 21 } else 22 { 23 $DbResult2 = $Database->query('SELECT Subject, OpenTime, CloseTime, TIMEDIFF(OpenTime, DATE_FORMAT(NOW(), "0000-01-%w %T")) as RemainTime FROM `SubjectOpenTimeInterval` WHERE DATE_FORMAT(NOW(), "0000-01-%w %T") < OpenTime AND Subject='.$Subject['Subject'].' ORDER BY OpenTime LIMIT 1'); 24 $DbRow = $DbResult2->fetch_array(); 25 $Output .= 'Otevírá za '.$DbRow['RemainTime']; 26 } 27 $Output .= '<table class="WideTable"> 28 <tr><th>Den</th><th>Čas</th></tr>'; 29 foreach($DaysOfWeek as $DayIndex => $DayOfWeek) 30 { 31 $DbResult2 = $Database->query('SELECT *, DATE_FORMAT(OpenTime, "%k:%i") as OpenTime, DATE_FORMAT(CloseTime, "%k:%i") as CloseTime FROM SubjectOpenTimeInterval WHERE SubjectOpenTimeInterval.Subject = '.$Subject['Subject'].' AND ((DAYOFWEEK(OpenTime) + 0) MOD 7)='.$DayIndex); 32 $Output .= '<tr><td>'.$DayOfWeek.'</td><td align="center">'; 33 if($DbResult2->num_rows) 34 { 35 while($TimeInterval = $DbResult2->fetch_array()) 36 { 37 $Output .= $TimeInterval['OpenTime'].' - '.$TimeInterval['CloseTime'].' '; 38 } 39 } else 40 $Output .= ' '; 41 $Output .= '</td></tr>'; 42 } 43 $Output .= '</table>Aktualizováno: '.$Subject['UpdateTime'].'<br />'; 44 if($Subject['Notice'] != '') $Output .= '</table>Poznámka: '.$Subject['Notice'].'<br />'; 45 $Output .= '<br />'; 46 } 47 return($Output); 48 } 49 50 echo(Show()); 51 52 ShowFooter(); 53 4 54 ?> 5 <table width="100%" border="0" cellspacing="10"><tr><td valign="top">6 7 <strong>Jednota:</strong>8 <table cellspacing="0" border="1">9 <tr><th>Den</th><th>Dopoledne</th><th>Odpoledne</th></tr>10 <tr><td>Pondělí</td><td>7:00 - 12:00</td><td>14:00 - 16:30</td></tr>11 <tr><td>Úterý</td><td>7:00 - 12:00</td><td> </td></tr>12 <tr><td>Středa</td><td>7:00 - 12:00</td><td>14:00 - 16:30</td></tr>13 <tr><td>Čtvrtek</td><td>7:00 - 12:00</td><td>14:00 - 16:30</td></tr>14 <tr><td>Pátek</td><td>7:00 - 12:00</td><td>13:30 - 16:30</td></tr>15 <tr><td>Sobota</td><td>6:00 - 10:30</td><td> </td></tr>16 <tr><td>Neděle</td><td> </td><td> </td></tr></table>17 Aktualizováno: 15.7.2004<br><br>18 19 </td><td valign="top">20 21 <strong>Pošta:</strong>22 <table cellspacing="0" border="1">23 <tr><th>Den</th><th>Dopoledne</th><th>Odpoledne</th></tr>24 <tr><td>Pondělí</td><td>8:00 - 10:00</td><td>14:30 - 15:30</td></tr>25 <tr><td>Úterý</td><td>8:00 - 10:00</td><td>14:30 - 15:30</td></tr>26 <tr><td>Středa</td><td>8:00 - 10:00</td><td>14:30 - 15:30</td></tr>27 <tr><td>Čtvrtek</td><td>8:00 - 10:00</td><td>14:30 - 15:30</td></tr>28 <tr><td>Pátek</td><td>8:00 - 10:00</td><td>14:30 - 15:30</td></tr>29 <tr><td>Sobota</td><td> </td><td> </td></tr>30 <tr><td>Neděle</td><td> </td><td> </td></tr></table>31 Schránka se vybírá v pracovní dny v 7:45 a 9:30<br>32 Aktualizováno: 20.7.2007<br><br>33 34 </td><td valign="top">35 36 <strong>Kavárna Centrum:</strong>37 <table cellspacing="0" border="1">38 <tr><th>Den</th><th>Čas</th></tr>39 <tr><td>Pondělí</td><td> </td></tr>40 <tr><td>Úterý</td><td>15:00 - 21:00</td></tr>41 <tr><td>Středa</td><td>15:00 - 21:00</td></tr>42 <tr><td>Čtvrtek</td><td>15:00 - 21:00</td></tr>43 <tr><td>Pátek</td><td>15:00 - 21:00</td></tr>44 <tr><td>Sobota</td><td>15:00 - 22:00</td></tr>45 <tr><td>Neděle</td><td> </td></tr></table>46 Aktualizováno: 13.9.2006<br><br>47 48 </td><td valign="top">49 50 <strong>Knihovna:</strong>51 <table cellspacing="0" border="1">52 <tr><th>Den</th><th>Čas</th></tr>53 <tr><td>Pondělí</td><td> </td></tr>54 <tr><td>Úterý</td><td> </td></tr>55 <tr><td>Středa</td><td> </td></tr>56 <tr><td>Čtvrtek</td><td> </td></tr>57 <tr><td>Pátek</td><td>14:30 - 17:00</td></tr>58 <tr><td>Sobota</td><td> </td></tr>59 <tr><td>Neděle</td><td> </td></tr></table>60 Aktualizováno: 20.8.2004<br><br>61 62 <strong>Koliba:</strong>63 <table cellspacing="0" border="1">64 <tr><th>Den</th><th>Čas</th></tr>65 <tr><td>Pondělí</td><td> </td></tr>66 <tr><td>Úterý</td><td> </td></tr>67 <tr><td>Středa</td><td>14:00 - 22:00</td></tr>68 <tr><td>Čtvrtek</td><td>14:00 - 22:00</td></tr>69 <tr><td>Pátek</td><td>14:00 - 3:00</td></tr>70 <tr><td>Sobota</td><td>14:00 - 3:00</td></tr>71 <tr><td>Neděle</td><td>14:00 - 21:00</td></tr></table>72 Aktualizováno: 29.4.2008<br><br>73 74 </td></tr></table>75 <?php76 ShowFooter();77 ?> -
www/style.css
r78 r146 117 117 padding: 8px; 118 118 } 119 120 .WideTable 121 { 122 border-color: black; 123 border-style: solid; 124 border-width: 1px 1px 0px 0px; 125 border-spacing: 0px; 126 } 127 128 .WideTable th 129 { 130 border-color: black; 131 border-style: solid; 132 border-width: 0px 0px 1px 1px; 133 padding: 1px 10px 1px 10px; 134 } 135 136 .WideTable td 137 { 138 border-color: black; 139 border-style: solid; 140 border-width: 0px 0px 1px 1px; 141 padding: 1px 10px 1px 10px; 142 }
Note:
See TracChangeset
for help on using the changeset viewer.