Ignore:
Timestamp:
Apr 12, 2009, 5:40:08 PM (16 years ago)
Author:
george
Message:
  • Upraveno: Údaje uživatele jméno a příjmení bylo sloušeno do údaje Zobrazované jméno. Upraveny patřičné sloupce a odkazy ze skriptů.
  • Opraveno: Registrace nových uživatelů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/aktuality/index.php

    r183 r189  
    3131        {
    3232          if(array_key_exists('id', $_GET)) $Id = $_GET['id'] * 1;
    33           $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Nick` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE  `news`.`id`='.$Id);
     33          $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE  `news`.`id`='.$Id);
    3434          if($DbResult->num_rows > 0)
    3535          {
    3636            $Row = $DbResult->fetch_array();
    37             if($Row['Nick'] == '') $Author = $Row['author'];
    38               else $Author = $Row['Nick'];
     37            if($Row['Name'] == '') $Author = $Row['author'];
     38              else $Author = $Row['Name'];
    3939            $Output .= '<div style="border: thin dotted #97ADFF;        background: #F6F7FF; margin-top: 5px; padding: 0px 5px 5px 5px;"><div style="padding-bottom: 1px; border-bottom-width: 1; border-bottom-style: solid; border-bottom-color: silver;"><strong>'.$Row['title'].' ('.HumanDate($Row['date']).', '.$Author.')</strong>';
    4040            if($this->System->Modules['User']->User['Id'] == $Row['User'])
     
    105105
    106106          $_POST['content'] = str_replace("\n",'<br />',$_POST['content']);
    107           $this->Database->insert('news',array('category' => $Category, 'title' => $_POST['title'], 'content' => $_POST['content'], 'date' => 'NOW()', 'ip' => $RemoteAddr, 'enclosure' => $Enclosures, 'author' => $this->System->Modules['User']->User['Nick'], 'User' => $this->System->Modules['User']->User['Id']));
     107          $this->Database->insert('news',array('category' => $Category, 'title' => $_POST['title'], 'content' => $_POST['content'], 'date' => 'NOW()', 'ip' => $RemoteAddr, 'enclosure' => $Enclosures, 'author' => $this->System->Modules['User']->User['Name'], 'User' => $this->System->Modules['User']->User['Id']));
    108108          $Output .= 'Aktualita přidána!<br />Pokud budete chtít vaši aktualitu smazat, klikněte na odkaz Smazat v seznamu všech aktualit v kategorii.<br /><br />';
    109109          $Output .= '<a href="index.php?category='.$_POST['category'].'">Zpět na seznam aktualit</a>';
     
    173173
    174174          //echo(GetRemoteAddress().','.$_SERVER['HTTP_X_FORWARDED_FOR'].'<br />');
    175           $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Nick` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `category`='.$Category.' ORDER BY `news`.`id` DESC LIMIT '.($Page * $PerPage).','.$PerPage);
     175          $DbResult = $this->Database->query('SELECT `news`.*, `User`.`Name` FROM `news` LEFT JOIN `User` ON `User`.`Id`=`news`.`User` WHERE `category`='.$Category.' ORDER BY `news`.`id` DESC LIMIT '.($Page * $PerPage).','.$PerPage);
    176176          while($Row = $DbResult->fetch_array())
    177177          {
    178             if($Row['Nick'] == '') $Author = $Row['author'];
    179               else $Author = $Row['Nick'];
     178            if($Row['Name'] == '') $Author = $Row['author'];
     179              else $Author = $Row['Name'];
    180180            $Output .= '<div style="border: thin dotted #97ADFF; background: #F6F7FF; margin-top: 5px; padding: 0px 5px 5px 5px;"><div style="padding-bottom: 1px; border-bottom-width: 1; border-bottom-style: solid; border-bottom-color: silver;"><strong><a href="?action=view&id='.$Row['id'].'">'.$Row['title'].'</a> ('.HumanDate($Row['date']).', '.$Author.')</strong>';
    181181            if($this->System->Modules['User']->User['Id'] == $Row['User'])
Note: See TracChangeset for help on using the changeset viewer.