Changeset 2
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
nbproject
Config.php
.settings
.project
.buildpath
-
Property svn:ignore
set to
-
trunk/index.php
r1 r2 3 3 include_once('Database.php'); 4 4 include_once('Config.php'); 5 include_once('Meet.php'); 5 6 7 function HumanDate($Time) 8 { 9 return(date('j.n.Y', $Time)); 10 } 11 6 12 class Application 7 13 { … … 30 36 { 31 37 $Output = '<div>'. 32 '<a href="'.$this->Link('/tance/').'">Tance</a> '; 33 $Output .= '<a href="'.$this->Link('/skoly/').'">Školy</a> '. 38 '<a href="'.$this->Link('/tance/').'">Tance</a> '. 39 '<a href="'.$this->Link('/skoly/').'">Školy</a> '. 40 '<a href="'.$this->Link('/seznamka/').'">Seznamka</a> '. 34 41 '</div>'; 35 42 return($Output); … … 100 107 } 101 108 109 function ShowMeetList() 110 { 111 $Meet = new Meet(); 112 $Meet->Id = 1; 113 $Meet->URL = 'https://www.tanecniskola.cz/seznamka/'; 114 $Meet->Database = $this->Database; 115 $Meet->Parse(); 116 117 $Gender = array('Muž', 'Žena'); 118 119 $Output = '<h4 style="text-align: center;">Inzeráty:</h4>'; 120 $Output .= '<table class="WideTable">'; 121 $Output .= '<tr><th>Datum</th><th>Jméno</th><th>Výška</th><th>Věk</th><th>Email</th><th>Telefon</th><th>Pohlaví</th><th>Zpráva</th><th>Zdroj</th>'; 122 $Output .= '</tr>'; 123 $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. 124 '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '1 ORDER BY `Date` DESC'); 125 while($MeetItem = $DbResult->fetch_assoc()) 126 { 127 $Output .= '<tr>'. 128 '<td>'.HumanDate(MysqlDateToTime($MeetItem['Date'])).'</td>'. 129 '<td>'.$MeetItem['Name'].'</td>'. 130 '<td>'.$MeetItem['Height'].'</td>'. 131 '<td>'.$MeetItem['Age'].'</td>'. 132 '<td>'.$MeetItem['Email'].'</td>'. 133 '<td>'.$MeetItem['Phone'].'</td>'. 134 '<td>'.$Gender[$MeetItem['Gender']].'</td>'. 135 '<td>'.$MeetItem['Message'].'</td>'. 136 '<td><a href="'.$this->Link($MeetItem['SourceURL']).'">'.$MeetItem['SourceName'].'</a></td>'; 137 $Output .= '</tr>'; 138 } 139 $Output .= '</table>'; 140 141 return($Output); 142 } 143 102 144 function ShowPage($Content) 103 145 { … … 131 173 if(count($this->PathItems) > 0) { 132 174 if($this->PathItems[0] == 'skoly') $Output .= $this->ShowSchoolList(); 133 else if($this->PathItems[0] == 'skoly') $Output .= $this->ShowDanceList(); 175 else if($this->PathItems[0] == 'tance') $Output .= $this->ShowDanceList(); 176 else if($this->PathItems[0] == 'seznamka') $Output .= $this->ShowMeetList(); 134 177 else $Output .= $this->ShowDanceList(); 135 178 } else $Output .= $this->ShowDanceList();
Note:
See TracChangeset
for help on using the changeset viewer.