LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Source for file news_view.php

Documentation is available at news_view.php

  1. <?php
  2. // CREATING ENVIRONMENT
  3. require_once 'conf.php';
  4.  
  5. $tpl->loadTemplatefile('news_view.tpl.php');
  6.  
  7. $res $db->query('SELECT
  8.                        DATE_FORMAT(news.created_at,"%d.%m.%Y - %H:%i") AS date,
  9.                        news.news,
  10.                        liveuser_peoples.handle
  11.                    FROM
  12.                        news
  13.                    INNER JOIN
  14.                        liveuser_perm_peoples
  15.                    ON
  16.                        news.owner_user_id = liveuser_perm_peoples.perm_user_id
  17.                    LEFT JOIN
  18.                        liveuser_peoples
  19.                    ON
  20.                        liveuser_perm_peoples.auth_user_id = liveuser_peoples.authUserId
  21.                    ORDER BY
  22.                      news.created_at DESC');
  23.  
  24. while ($row $res->fetchRow()) {
  25.     $tpl->setCurrentBlock('row');
  26.  
  27.     $tpl->setVariable(array('time'     => $row['date'],
  28.                             'news'     => stripslashes($row['news']),
  29.                             'email'    => $row['handle''@your-company.com',
  30.                             'author'   => $row['handle']));
  31.  
  32.     $tpl->parseCurrentBlock();
  33. }
  34.  
  35.     include_once 'finish.inc.php';
  36. ?>

Documentation generated on Mon, 11 Mar 2019 15:40:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.