Changeset 67 for trunk


Ignore:
Timestamp:
Dec 20, 2022, 11:51:30 PM (2 years ago)
Author:
chronos
Message:
  • Added: Show new meet menu for insertion of new advertisement on import source web.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Event/EventPage.php

    r63 r67  
    163163        '<tr><th>Cena</th><td>'.$Event['Price'].'</td></tr>'.
    164164        '<tr><th>Umístění</th><td>'.$Event['Location'].'</td></tr>'.
    165         '<tr><th>Původní web</th><td>'.$Link.'</td></tr>'.
    166         '<tr><th>Zdroj importu</th><td><a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a></td></tr>';
     165        '<tr><th>Původní stránka</th><td>'.$Link.'</td></tr>'.
     166        '<tr><th>Zdroj</th><td><a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a></td></tr>';
    167167      $Output .= '</table>';
    168168      if (Core::Cast($this->System)->IsAdmin()) {
     
    201201      $Title = $Event['Title'];
    202202      $Description = $Event['Description']."<br/>\n";
    203       $Description .= '<br/>Zdroj importu: <a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a>';
     203      $Description .= '<br/>Zdroj: <a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a>';
    204204      $Time = MysqlDateTimeToTime($Event['TimeFrom']);
    205205      $TimeImport = MysqlDateTimeToTime($Event['TimeImport']);
  • trunk/Modules/Meet/Meet.php

    r65 r67  
    1717abstract class Gender
    1818{
    19     const Undefined = 0;
    20     const Male = 1;
    21     const Female = 2;
     19  const Undefined = 0;
     20  const Male = 1;
     21  const Female = 2;
    2222}
    2323
  • trunk/Modules/Meet/MeetPage.php

    r63 r67  
    4848      array('Name' => 'message', 'Type' => 'String', 'DbName' => 'Message', 'Title' => 'Zpráva'),
    4949      array('Name' => 'location', 'Type' => 'String', 'DbName' => 'Location', 'Title' => 'Umístění'),
    50       array('Name' => 'source', 'Type' => 'String', 'DbName' => 'SourceName', 'Title' => 'Import'),
     50      array('Name' => 'source', 'Type' => 'String', 'DbName' => 'SourceName', 'Title' => 'Zdroj'),
    5151    );
    5252
    5353    $Output = '';
    5454    if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam'))
     55    {
    5556      $this->RawPage = true;
    56       else $Output .= '<div class="title">Inzeráty</div>';
     57    } else {
     58      $Output .= '<div class="title">Inzeráty</div>';     
     59    }
    5760
    5861    $Output .= $Filter->GetOutput($this->System->Link('/seznamka/'));
     
    7780      array('Name' => 'Gender', 'Title' => 'Pohlaví'),
    7881      array('Name' => 'Message', 'Title' => 'Zpráva'),
    79       array('Name' => 'Source', 'Title' => 'Import'),
     82      array('Name' => 'Source', 'Title' => 'Zdroj'),
    8083      array('Name' => '', 'Title' => 'Detail'),
    8184    );
     
    110113    {
    111114      $Output .= '<div><a href="'.$this->System->Link('/seznamka/rss/').'"><img src="'.$this->System->Link('/images/rss20.png').'" alt="rss20"/></a></div>';
     115
     116      $Output .= '<div style="text-align: center;">Vložit nový inzerát: ';
     117      $Output .= '<form style="display:inline;"><select name="insert" id="insert" onchange="">';
     118      $DbResult = $this->Database->select('MeetSource', 'InsertURL, Name, Id', 'InsertURL != ""');
     119      while ($DbRow = $DbResult->fetch_assoc())
     120      {   
     121        $Output .= '<option value="'.$DbRow['Id'].'" onclick="window.open(\''.
     122          $DbRow['InsertURL'].'\',\'_blank\',\'\')">'.$DbRow['Name'].'</option>';
     123      }
     124      $Output .= '</select></form></div>';
    112125    }
    113126    return $Output;
     
    178191        '<tr><th>Telefón</th><td>'.$MeetItem['Phone'].'</td></tr>'.
    179192        '<tr><th>Zpráva</th><td>'.$MeetItem['Message'].'</td></tr>'.
    180         '<tr><th>Původní web</th><td>'.$Link.'</td></tr>'.
    181         '<tr><th>Zdroj importu</th><td><a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a></td></tr>';
     193        '<tr><th>Původní stránka</th><td>'.$Link.'</td></tr>'.
     194        '<tr><th>Zdroj</th><td><a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a></td></tr>';
    182195      $Output .= '</table>';
    183       if (Core::Cast($this->System)->IsAdmin()) {
     196
     197      $Output .= '<div style="margin-top: 10pt; text-align: center;">Vložit nový inzerát: ';
     198      $Output .= '<form style="display:inline;"><select name="insert" id="insert" onchange="">';
     199      $DbResult = $this->Database->select('MeetSource', 'InsertURL, Name, Id', 'InsertURL != ""');
     200      while ($DbRow = $DbResult->fetch_assoc())
     201      {   
     202        $Output .= '<option value="'.$DbRow['Id'].'" onclick="window.open(\''.
     203          $DbRow['InsertURL'].'\',\'_blank\',\'\')">'.$DbRow['Name'].'</option>';
     204      }
     205      $Output .= '</select></form></div>';
     206
     207      if (Core::Cast($this->System)->IsAdmin())
     208      {
    184209        if ($MeetItem['Hidden'] == '1')
    185210          $Output .= '<div>Skrytá položka <a href="?unhide">Zviditelnit</a></div>';
     
    225250      if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm';
    226251      if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg';
    227       $Description .= '<br/>Zdroj importu: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>';
     252      $Description .= '<br/>Zdroj: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>';
    228253      $Time = MysqlDateTimeToTime($MeetItem['Time']);
    229254      $TimeImport = MysqlDateTimeToTime($MeetItem['TimeImport']);
  • trunk/SQL/Structure.sql

    r57 r67  
    11-- phpMyAdmin SQL Dump
    2 -- version 4.9.5deb2
     2-- version 5.1.1deb5ubuntu1
    33-- https://www.phpmyadmin.net/
    44--
    55-- Počítač: localhost:3306
    6 -- Vytvořeno: Stř 27. kvě 2020, 19:39
    7 -- Verze serveru: 10.3.22-MariaDB-1ubuntu1
    8 -- Verze PHP: 7.4.3
     6-- Vytvořeno: Úte 20. pro 2022, 23:38
     7-- Verze serveru: 10.6.11-MariaDB-0ubuntu0.22.04.1
     8-- Verze PHP: 8.1.2-1ubuntu2.9
    99
    1010SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
    11 SET AUTOCOMMIT = 0;
    1211START TRANSACTION;
    1312SET time_zone = "+00:00";
     
    2726  `Name` varchar(255) NOT NULL,
    2827  `Group` int(11) DEFAULT NULL
    29 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     28) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     29
     30--
     31-- VZTAHY TABULKY `Dance`:
     32--   `Group`
     33--       `DanceGroup` -> `Id`
     34--
    3035
    3136-- --------------------------------------------------------
     
    4045  `NameEn` varchar(255) NOT NULL,
    4146  `Dance` int(11) NOT NULL
    42 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
     47) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     48
     49--
     50-- VZTAHY TABULKY `DanceFigure`:
     51--   `Dance`
     52--       `Dance` -> `Id`
     53--
    4354
    4455-- --------------------------------------------------------
     
    5162  `Id` int(11) NOT NULL,
    5263  `Name` varchar(255) NOT NULL
    53 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     64) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     65
     66--
     67-- VZTAHY TABULKY `DanceGroup`:
     68--
    5469
    5570-- --------------------------------------------------------
     
    7287  `TimeImport` datetime DEFAULT NULL,
    7388  `RemoteId` varchar(255) DEFAULT NULL
    74 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
     89) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     90
     91--
     92-- VZTAHY TABULKY `Event`:
     93--
    7594
    7695-- --------------------------------------------------------
     
    85104  `Method` varchar(255) DEFAULT NULL,
    86105  `URL` varchar(255) DEFAULT NULL
    87 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
     106) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     107
     108--
     109-- VZTAHY TABULKY `EventSource`:
     110--
    88111
    89112-- --------------------------------------------------------
     
    95118CREATE TABLE `MeetItem` (
    96119  `Id` int(11) NOT NULL,
    97   `Message` text NOT NULL,
     120  `Message` mediumtext NOT NULL,
    98121  `Name` varchar(255) NOT NULL,
    99122  `Age` int(11) DEFAULT NULL,
     
    110133  `RemoteId` varchar(255) DEFAULT NULL,
    111134  `Hidden` int(11) DEFAULT 0
    112 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     135) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     136
     137--
     138-- VZTAHY TABULKY `MeetItem`:
     139--   `Source`
     140--       `MeetSource` -> `Id`
     141--
    113142
    114143-- --------------------------------------------------------
     
    123152  `URL` varchar(255) NOT NULL,
    124153  `Method` varchar(255) NOT NULL,
    125   `Enabled` int(11) NOT NULL DEFAULT 1
    126 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     154  `Enabled` int(11) NOT NULL DEFAULT 1,
     155  `InsertURL` varchar(255) NOT NULL
     156) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     157
     158--
     159-- VZTAHY TABULKY `MeetSource`:
     160--
    127161
    128162-- --------------------------------------------------------
     
    139173  `Imdb` varchar(255) NOT NULL,
    140174  `Csfd` varchar(255) NOT NULL
    141 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     175) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     176
     177--
     178-- VZTAHY TABULKY `Movie`:
     179--
    142180
    143181-- --------------------------------------------------------
     
    152190  `URL` varchar(255) NOT NULL,
    153191  `Dance` int(11) NOT NULL
    154 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     192) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     193
     194--
     195-- VZTAHY TABULKY `Music`:
     196--   `Dance`
     197--       `Dance` -> `Id`
     198--
    155199
    156200-- --------------------------------------------------------
     
    166210  `URL` varchar(255) NOT NULL,
    167211  `Group` int(11) DEFAULT NULL
    168 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     212) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     213
     214--
     215-- VZTAHY TABULKY `Resource`:
     216--   `Dance`
     217--       `Dance` -> `Id`
     218--   `Group`
     219--       `ResourceGroup` -> `Id`
     220--
    169221
    170222-- --------------------------------------------------------
     
    178230  `Name` varchar(255) NOT NULL,
    179231  `URL` varchar(255) NOT NULL
    180 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     232) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     233
     234--
     235-- VZTAHY TABULKY `ResourceGroup`:
     236--
    181237
    182238-- --------------------------------------------------------
     
    191247  `Address` varchar(255) NOT NULL,
    192248  `URL` varchar(255) NOT NULL
    193 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    194 
    195 --
    196 -- Klíče pro exportované tabulky
    197 --
    198 
    199 --
    200 -- Klíče pro tabulku `Dance`
     249) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
     250
     251--
     252-- VZTAHY TABULKY `School`:
     253--
     254
     255--
     256-- Indexy pro exportované tabulky
     257--
     258
     259--
     260-- Indexy pro tabulku `Dance`
    201261--
    202262ALTER TABLE `Dance`
     
    205265
    206266--
    207 -- Klíče pro tabulku `DanceFigure`
     267-- Indexy pro tabulku `DanceFigure`
    208268--
    209269ALTER TABLE `DanceFigure`
     
    213273
    214274--
    215 -- Klíče pro tabulku `DanceGroup`
     275-- Indexy pro tabulku `DanceGroup`
    216276--
    217277ALTER TABLE `DanceGroup`
     
    219279
    220280--
    221 -- Klíče pro tabulku `Event`
     281-- Indexy pro tabulku `Event`
    222282--
    223283ALTER TABLE `Event`
     
    226286
    227287--
    228 -- Klíče pro tabulku `EventSource`
     288-- Indexy pro tabulku `EventSource`
    229289--
    230290ALTER TABLE `EventSource`
     
    232292
    233293--
    234 -- Klíče pro tabulku `MeetItem`
     294-- Indexy pro tabulku `MeetItem`
    235295--
    236296ALTER TABLE `MeetItem`
     
    240300
    241301--
    242 -- Klíče pro tabulku `MeetSource`
     302-- Indexy pro tabulku `MeetSource`
    243303--
    244304ALTER TABLE `MeetSource`
     
    246306
    247307--
    248 -- Klíče pro tabulku `Movie`
     308-- Indexy pro tabulku `Movie`
    249309--
    250310ALTER TABLE `Movie`
     
    253313
    254314--
    255 -- Klíče pro tabulku `Music`
     315-- Indexy pro tabulku `Music`
    256316--
    257317ALTER TABLE `Music`
     
    260320
    261321--
    262 -- Klíče pro tabulku `Resource`
     322-- Indexy pro tabulku `Resource`
    263323--
    264324ALTER TABLE `Resource`
     
    268328
    269329--
    270 -- Klíče pro tabulku `ResourceGroup`
     330-- Indexy pro tabulku `ResourceGroup`
    271331--
    272332ALTER TABLE `ResourceGroup`
     
    274334
    275335--
    276 -- Klíče pro tabulku `School`
     336-- Indexy pro tabulku `School`
    277337--
    278338ALTER TABLE `School`
  • trunk/SQL/Update.php

    r66 r67  
    9898ALTER TABLE `ResourceGroup` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
    9999ALTER TABLE `School` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
     100
     101-- rev 66
     102ALTER TABLE `MeetSource` ADD `InsertURL` VARCHAR(255) NOT NULL AFTER `Enabled`;
Note: See TracChangeset for help on using the changeset viewer.