Changeset 52 for trunk/Modules/Event
- Timestamp:
- Jan 4, 2020, 11:59:33 AM (5 years ago)
- Location:
- trunk/Modules/Event
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Event/Event.php
r51 r52 58 58 public $Id; 59 59 public $Database; 60 public $AddedCount; 61 62 function ImportInternal() 63 { 64 } 60 65 61 66 function Import() 62 67 { 63 68 $this->AddedCount = 0; 64 $Output = 'Parsing '.$this->Name.' ('.$this->Id.')...</br>'; 69 $Output = 'Parsing '.$this->Name.' ('.$this->Id.')...'; 70 $this->ImportInternal(); 71 $Output .= 'done.'; 72 if ($this->AddedCount > 0) $Output .= ' '.$this->AddedCount.' new.'; 73 $Output .= '</br>'."\n"; 65 74 return $Output; 66 75 } -
trunk/Modules/Event/EventPage.php
r51 r52 38 38 $Filter = new Filter(); 39 39 $Filter->Items = array( 40 array('Name' => 'past', 'Type' => 'Boolean', 'DbName' => '', 'Title' => 'Proběhlé'), 40 41 array('Name' => 'title', 'Type' => 'String', 'DbName' => 'Title', 'Title' => 'Titulek'), 41 42 array('Name' => 'description', 'Type' => 'String', 'DbName' => 'Description', 'Title' => 'Popis'), 42 array('Name' => 'price', 'Type' => ' String', 'DbName' => 'Price', 'Title' => 'Cena'),43 array('Name' => 'price', 'Type' => 'Integer', 'DbName' => 'Price', 'Title' => 'Cena'), 43 44 array('Name' => 'location', 'Type' => 'String', 'DbName' => 'Location', 'Title' => 'Umístění'), 44 45 array('Name' => 'source', 'Type' => 'String', 'DbName' => 'SourceName', 'Title' => 'Import'), … … 53 54 $Output .= $Filter->GetOutput($this->System->Link('/udalosti/')); 54 55 $Where = $Filter->GetWhere($this->Database); 56 if ($_SESSION['past'] != 1) $Where .= ' AND (TimeFrom > NOW())'; 55 57 56 58 $DbResult = $this->Database->query('SELECT COUNT(*) FROM (SELECT *, '. … … 71 73 array('Name' => '', 'Title' => 'Detail'), 72 74 ); 73 $Order = GetOrderTableHeader($TableColumns, 'TimeFrom', 1);75 $Order = GetOrderTableHeader($TableColumns, 'TimeFrom', 0); 74 76 $Output .= '<table class="WideTable">'; 75 77 $Output .= $Order['Output']; -
trunk/Modules/Event/Import/JoeClub.php
r51 r52 3 3 class EventSourceJoeClub extends EventSource 4 4 { 5 function Import ()5 function ImportInternal() 6 6 { 7 $Output = parent::Import();7 $Output = ''; 8 8 $Content = file_get_contents($this->URL); 9 9 … … 62 62 $Event->Price = trim(str_replace('Kč', '', $Event->Price)); 63 63 if ($Event->Price == 'Zdarma') $Event->Price = 0; 64 if ($Event->Price == '') $Event->Price = 0; 64 65 return $Output; 65 66 }
Note:
See TracChangeset
for help on using the changeset viewer.