Changeset 9 for trunk/index.php


Ignore:
Timestamp:
Aug 5, 2018, 10:36:27 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Improved RSS export.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r8 r9  
    282282
    283283    $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '.
    284       '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL', '1 ORDER BY `Date` DESC LIMIT 30');
     284      '(SELECT MeetSource.URL FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceURL, UNIX_TIMESTAMP(`Date`) AS `UnixTime`', '1 ORDER BY `Date` DESC LIMIT 30');
    285285    while($MeetItem = $DbResult->fetch_assoc())
    286286    {
     
    288288      if ($MeetItem['Age'] != '') $Title .= ', '.$MeetItem['Age'].' let';
    289289      if ($MeetItem['Weight'] != '') $Title .= ', '.$MeetItem['Height'].' cm';
    290       $Description = $MeetItem['Message'];
     290      if ($MeetItem['Location'] != '') $Title .= ', '.$MeetItem['Location'];
     291      $Description = $MeetItem['Message']."<br/>\n";
    291292      if ($MeetItem['Email'] != '') $Description .= '<br/>Email: '.$MeetItem['Email'];
    292293      if ($MeetItem['Phone'] != '') $Description .= '<br/>Telefon: '.$MeetItem['Phone'];
     294      if ($MeetItem['Age'] != '') $Description .= '<br/>Věk: '.$MeetItem['Age'].' let';
     295      if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm';
     296      if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg';
    293297      $Description .= '<br/>Škola: <a href="'.$this->Link($MeetItem['SourceURL']).'">'.$MeetItem['SourceName'].'</a>';
    294298      $RSS->Items[] = array(
    295299        'Title' => $Title,
    296300        'Description' => $Description,
    297         'Time' => MysqlDateTimeToTime($MeetItem['Date']),
     301        'Time' => $MeetItem['UnixTime'],
    298302        'Link' => $this->Link('/seznamka/'),
    299303      );
    300       $Output .= '<tr>'.
    301         '<td>'.HumanDate(MysqlDateToTime($MeetItem['Date'])).'</td>'.
    302         '<td>'.$MeetItem['Name'].'</td>'.
    303         '<td>'.$MeetItem['Height'].'</td>'.
    304         '<td>'.$MeetItem['Age'].'</td>'.
    305         '<td>'.$MeetItem['Weight'].'</td>'.
    306         //'<td>'.$MeetItem['Email'].'</td>'.
    307         //'<td>'.$MeetItem['Phone'].'</td>'.
    308         '<td>'.$Gender[$MeetItem['Gender']].'</td>'.
    309         '<td>'.$MeetItem['Message'].'</td>'.
    310         '<td></td>';
    311304      $Output .= '</tr>';
    312305    }
Note: See TracChangeset for help on using the changeset viewer.