XOOPS  2.6.0
pda.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
22 include __DIR__ . DIRECTORY_SEPARATOR . 'mainfile.php';
24 
25 header("Content-Type: text/html");
26 echo "<html><head><title>" . htmlspecialchars($xoops->getConfig('sitename')) . "</title>
27  <meta name='HandheldFriendly' content='True' />
28  <meta name='PalmComputingPlatform' content='True' />
29  </head>
30  <body>";
31 
32 $sql = "SELECT storyid, title FROM " . $xoopsDB->prefix("stories") . " WHERE published>0 AND published<" . time() . " ORDER BY published DESC";
33 $result = $xoopsDB->query($sql, 10, 0);
34 //TODO Remove this hardcoded string
35 if (!$result) {
36  echo "An error occured";
37 } else {
38  echo "<img src='images/logo.gif' alt='" . htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES) . "' border='0' /><br />";
39  echo "<h2>" . htmlspecialchars($xoops->getConfig('slogan')) . "</h2>";
40  echo "<div>";
41  while (list ($storyid, $title) = $xoopsDB->fetchRow($result)) {
42  echo "<a href='" . $xoops_url . "/modules/news/print.php?storyid={$storyid}'>" . htmlspecialchars($title) . "</a><br />";
43  }
44  echo "</div>";
45 }
46 echo "</body></html>";
$result
Definition: pda.php:33
$xoops_url
Definition: pda.php:23
defined('DS') or define('DS' DIRECTORY_SEPARATOR
Definition: common.php:41
$xoops
Definition: admin.php:25
static get($name)
global $xoopsDB
Definition: common.php:36
$sql
Definition: pda.php:32