示例#1
0
     $page = intval($HTTP_GET_VARS['page']);
 } else {
     $page = 0;
     if (!($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid()))) {
         $article->updateCounter();
     }
 }
 $articletag = array();
 if ($article->uid > 0) {
     $user = new xoopsUser($article->uid);
     if ($wfsConfig['realname'] && $user->getvar('name') != '') {
         $articletag['poster'] = $user->getvar('name');
     } else {
         $articletag['poster'] = $user->getvar('uname');
     }
     $articletag['poster'] = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $user->getVar('uid') . "'>" . $articletag['poster'] . "</a>";
 } else {
     $articletag['poster'] = $xoopsConfig['anonymous'];
 }
 // $datetime
 if (isset($article->published)) {
     $articletag['datetime'] = formatTimestamp($article->published, $wfsConfig['timestamp']);
 }
 // $title
 $articletag['title'] = $article->category->textLink() . ": ";
 $articletag['title'] .= $article->title();
 //Counter
 $counter = $article->counter;
 $pagenum = $article->maintextPages() - 1;
 if ($page > $pagenum) {
     $page = $pagenum;
示例#2
0
 echo "<td align='left' class='bg3' colspan =5><b>" . _AM_FVAL . "</b></td>";
 echo "</tr></table>";
 echo "<br />";
 echo "<div width='100%' colspan =5 ><b>New Submissions</b></div>";
 echo "<br />";
 echo "<table border='0' width='100%' cellspacing='1' cellpadding='2' class = 'outer'>";
 echo "<td width='5%' align='center' valign='middle' class='bg3'><b>ID</b></td>";
 echo "<td width='25%' align='left' valign='middle' class='bg3'><b>Title</b></td>";
 echo "<td width='25%' align='center' valign='middle' class='bg3'><b>Author</b></td>";
 echo "<td width='25%' align='center' valign='middle' class='bg3'><b>Submitted</b></td>";
 echo "<td width='25%' align='center' colspan='2' class='bg3'><b>Action</b></td>";
 echo "</tr>";
 while (list($topicID, $catID, $question, $answer, $summary, $uid, $submit, $datesub) = $xoopsDB->fetchRow($results)) {
     if ($uid) {
         $user = new xoopsUser($uid);
         $poster = $user->getVar("uname");
         $submitter = "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $uid . "'>{$poster}</a>";
         //$thisUser->getVar("uname");
     } else {
         $submitter = "Guest";
     }
     $datesub = formatTimestamp($datesub, "D, d-M-Y, H:i");
     echo "<tr>";
     echo "<td class='head' align = 'center'>{$topicID}</td>";
     echo "<td class='even'><a href='submissions.php?op=view&t={$topicID}&c={$catID}'>{$question}</a></td>";
     echo "<td class='even'><p align='center'>{$submitter}</td>";
     echo "<td class='even'><p align='center'>{$datesub}</td>";
     echo "<td align='center' class='even' > <a href='submissions.php?op=allow&t={$topicID}&c={$catID}'>" . _AM_SUBALLOW . "</a></td>";
     echo "<td align='center' class='even' > <a href='index.php?op=del&subm=1&t={$topicID}'>" . _AM_SUBDELETE . "</a>";
     echo "</td></tr>";
 }