function listcategory($listtype = 0) { global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $wfsConfig; echo "<table border='0' cellspacing='1' cellpadding ='3' align = center width = 100%>"; echo "<tr><td align = center><h4>" . indexmainheader() . "</h4></td></tr>"; echo "<tr><td align = center><h3>" . sprintf($wfsConfig['indexheading']) . "</h3></td></tr>"; echo "<tr><td align = center><h4>" . _WFS_MAININDEX . "</h4></td></tr>"; if ($wfsConfig['indexheader']) { echo "<tr><td align= 'left'>" . $myts->makeTareaData4Show($wfsConfig['indexheader']) . "</td></tr>"; } echo "</table><br>"; echo "<table border='0' cellspacing='1' cellpadding ='3' class='outer' width = 100%>"; echo "<tr><td align='left' width ='15%' class='itemHead'><b>" . _WFS_CATEGORY . "</b></td>"; echo "<td align='left' class='itemHead'><b>" . _WFS_CATEGORYDESC . "</b></td>"; if ($wfsConfig['showMarticles']) { echo "<td align='center' class='itemHead' width ='20%'><b>" . _WFS_ARTICLES . "</b></td>"; } if ($wfsConfig['showMupdated']) { echo "<td align='center' class='itemHead'><b>" . _WFS_LASTUPDATE . "</b></td>"; } $xt = new WfsCategory(); $maintopics = $xt->getFirstChild(); $deps = 0; $listtype = intval($listtype); showcategory($maintopics, 0, $listtype); echo "</table>"; echo "<table border='0' cellspacing='1' ><tr>"; if ($wfsConfig['indexheader']) { echo "<tr><br><td align='left'>" . $myts->makeTareaData4Show($wfsConfig['indexfooter'], 1, 1, 1) . "</td>"; } echo "</tr></table>"; }
function Offlinemessage() { indexmainheader(); }
redirect_header("index.php", 4, _WFS_VOTEONCE); exit; } } //All is well. Add to Line Item Rate to DB. $newid = $xoopsDB->genId($xoopsDB->prefix("wfs_votedata") . "_ratingid_seq"); $datetime = time(); $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("wfs_votedata") . " (ratingid, lid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES ({$newid}, {$lid}, {$ratinguser}, {$rating}, '{$ip}', {$datetime})"); //All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB. updaterating($lid); $ratemessage = _WFS_VOTEAPPRE . "<br>" . sprintf(_WFS_THANKYOU, $xoopsConfig['sitename']); redirect_header("index.php", 4, $ratemessage); exit; } else { include XOOPS_ROOT_PATH . "/header.php"; echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">"; indexmainheader(); $result = $xoopsDB->query("SELECT title FROM " . $xoopsDB->prefix("wfs_article") . " WHERE articleid={$lid}"); list($title) = $xoopsDB->fetchRow($result); $title = $myts->makeTboxData4Show($title); echo "\r\n \t<hr />\r\n\t\t<table border=0 cellpadding=1 cellspacing=0 width=\"80%\"><tr><td>\r\n \t<h4>{$title}</h4>\r\n \t<UL>\r\n \t<LI>" . _WFS_VOTEONCE . "\r\n \t<LI>" . _WFS_RATINGSCALE . "\r\n \t<LI>" . _WFS_BEOBJECTIVE . "\r\n \t<LI>" . _WFS_DONOTVOTE . ""; echo "\r\n \t</UL>\r\n \t</td></tr>\r\n \t<tr><td align=\"center\">\r\n \t<form method=\"POST\" action=\"ratefile.php\">\r\n \t<input type=\"hidden\" name=\"lid\" value=\"{$lid}\">\r\n \t<select name=\"rating\">\r\n\t\t<option>--</option>"; for ($i = 10; $i > 0; $i--) { echo "<option value=\"" . $i . "\">" . $i . "</option>\n"; } echo "</select><br><br><input type=\"submit\" name=\"submit\" value=\"" . _WFS_RATEIT . "\"\n>"; echo " <input type=\"button\" value=\"" . _WFS_CANCEL . "\" onclick=\"javascript:history.go(-1)\">\n"; echo "</form></td></tr></table>"; echo "</td></tr></table>"; } include 'footer.php';