Ignore:
Timestamp:
Dec 20, 2022, 11:51:30 PM (17 months ago)
Author:
chronos
Message:
  • Added: Show new meet menu for insertion of new advertisement on import source web.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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']);
Note: See TracChangeset for help on using the changeset viewer.