Changeset 51 for trunk/index.php


Ignore:
Timestamp:
Jan 2, 2020, 12:34:24 AM (5 years ago)
Author:
chronos
Message:
  • Added: New section Events to import dance events from various dance clubs and dance schools.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r48 r51  
    1313require_once('Modules/School/School.php');
    1414require_once('Modules/Club/Club.php');
     15require_once('Modules/Event/Event.php');
     16require_once('Modules/Event/EventPage.php');
    1517
    1618if(isset($_SERVER['REMOTE_ADDR'])) session_start();
     
    220222      '/tance/',
    221223      '/filmy/',
     224      '/udalosti/',
    222225    );
    223226    $Result = '<?xml version="1.0" encoding="UTF-8"?>'."\n".
     
    230233        '</url>'."\n";
    231234    }
    232     // MeetItems
     235
     236    // Meets
    233237    $DbResult = $this->Database->query('SELECT `Id`,`Time` FROM `MeetItem` WHERE (`Hidden`=0)');
    234238    while ($DbRow = $DbResult->fetch_array())
     
    236240      $Url = '/seznamka/inzerat/'.$DbRow['Id'];
    237241      $Time = MysqlDateTimeToTime($DbRow['Time']);
     242      $Result .= '<url>'."\n".
     243        '  <loc>'.$this->System->AbsoluteLink($Url).'</loc>'."\n".
     244        '  <lastmod>'.date('c', $Time).'</lastmod>'."\n".
     245        '</url>'."\n";
     246    }
     247
     248    // Events
     249    $DbResult = $this->Database->query('SELECT `Id`,`TimeFrom` FROM `Event` WHERE (`Hidden`=0)');
     250    while ($DbRow = $DbResult->fetch_array())
     251    {
     252      $Url = '/udalosti/udalost/'.$DbRow['Id'];
     253      $Time = MysqlDateTimeToTime($DbRow['TimeFrom']);
    238254      $Result .= '<url>'."\n".
    239255        '  <loc>'.$this->System->AbsoluteLink($Url).'</loc>'."\n".
     
    293309}
    294310
    295 $Revision = 48; // Subversion revision
    296 $DatabaseRevision = 48; // SQL structure revision
    297 $ReleaseTime = strtotime('2019-12-22');
     311$Revision = 51; // Subversion revision
     312$DatabaseRevision = 51; // SQL structure revision
     313$ReleaseTime = strtotime('2020-01-01');
    298314
    299315$Application = new ApplicationTanec();
Note: See TracChangeset for help on using the changeset viewer.