echo "<div id=\"wiki-container\">\r\n <div id=\"wiki-row\">"; while ($wiki = mysql_fetch_array($res)) { echo "\r\n\t\t\t\t<div id=\"wiki-content-left\" align=\"right\">\r\n\t\t\t\t\t<form method=\"post\" action=\"wiki.php\">\r\n\t\t\t\t\t<div id=\"name\"><input type=\"hidden\" name=\"article-id\" value=\"{$wiki['id']}\">\r\n\t\t\t\t\t<input type=\"text\" name=\"article-name\" id=\"name\" value=\"{$wiki['name']}\"></div>\r\n\t\t\t\t\t<div id=\"content-add\"><table width=100% height=100% id=\"wikiedit\" border=0 cellpadding=0 cellspacing=0><tr><td><textarea name=\"article-body\" id=\"body\">{$wiki['body']}</textarea>\r\n\t\t\t\t\t<div align=\"center\"><input type=\"submit\" name=\"article-edit\" value=\"Edit\"> <input type=\"button\" value=\"Preview\" onclick=\"editPreview()\" /></div></td></tr></table>"; echo "</div></form></div>"; } echo wikimenu(); echo "</div>"; echo "</div>"; } else { newerr("Error", "Access Denied"); } } if ($action == "sort") { $sortres = sql_query("SELECT * FROM wiki WHERE name LIKE '{$letter}%' ORDER BY name"); if (mysql_num_rows($sortres) > 0) { echo navmenu(); echo "Articles starting with the letter <b>{$letter}</b>"; while ($wiki = mysql_fetch_array($sortres)) { if ($wiki["userid"] !== 0) { $wikiname = mysql_fetch_assoc(sql_query("SELECT username FROM users WHERE id = {$wiki['userid']}")); } echo "\r\n\t\t\t\t<div class=\"wiki-search\">\r\n\t\t\t\t\t<b><a href=\"wiki.php?action=article&name=" . articlereplace($wiki["name"]) . "\">{$wiki['name']}</a></b> Added by: <a href=\"userdetails.php?id={$wiki['userid']}\">{$wikiname['username']}</a></div>"; } } else { echo navmenu(); newerr("Error", "No articles starting with letter <b>{$letter}</b> found."); } } end_main_frame(); stdfoot(); ob_end_flush();
$HTMLOUT .= "<div id=\"wiki-container\">\n <div id=\"wiki-row\">"; while ($wiki = mysqli_fetch_array($res)) { $HTMLOUT .= "\n\t\t\t\t<div id=\"wiki-content-left\" align=\"right\">\n\t\t\t\t\t<form method=\"post\" action=\"wiki.php\">\n\t\t\t\t\t<div><input type=\"hidden\" name=\"article-id\" value=\"" . (int) $wiki['id'] . "\" />\n\t\t\t\t\t<input type=\"text\" name=\"article-name\" id=\"name\" value=\"" . htmlsafechars($wiki['name']) . "\" /></div>\n\t\t\t\t\t<div id=\"content-add\"><table class=\"table table bordered\"><tr><td><textarea name=\"article-body\" rows=\"70\" cols=\"10\" id=\"body\">" . htmlsafechars($wiki['body']) . "</textarea>\n\t\t\t\t\t<div align=\"center\"><input type=\"submit\" name=\"article-edit\" value=\"{$lang['wiki_edit']}\" /></div></td></tr></table>"; $HTMLOUT .= "</div></form></div>"; } $HTMLOUT .= wikimenu(); $HTMLOUT .= "</div>"; $HTMLOUT .= "</div><br>"; } else { $HTMLOUT .= newerr($lang['wiki_error'], $lang['wiki_access_denied']); } } if ($action == "sort") { $sortres = sql_query("SELECT * FROM wiki WHERE name LIKE '{$letter}%' ORDER BY name"); if (mysqli_num_rows($sortres) > 0) { $HTMLOUT .= navmenu(); $HTMLOUT .= "{$lang['wiki_art_found_starting']}<b>" . htmlsafechars($letter) . "</b>"; while ($wiki = mysqli_fetch_array($sortres)) { if ($wiki["userid"] !== 0) { $wikiname = mysqli_fetch_assoc(sql_query("SELECT username FROM users WHERE id = " . sqlesc($wiki['userid']))); } $HTMLOUT .= "\n\t\t\t\t<div class=\"wiki-search\">\n\t\t\t\t\t<b><a href=\"wiki.php?action=article&name=" . articlereplace(htmlsafechars($wiki["name"])) . "\">" . htmlsafechars($wiki['name']) . "</a></b>{$lang['wiki_added_by1']}<a href=\"userdetails.php?id=" . (int) $wiki['userid'] . "\">" . htmlsafechars($wikiname['username']) . "</a></div>"; } } else { $HTMLOUT .= navmenu(); $HTMLOUT .= newerr($lang['wiki_error'], "{$lang['wiki_no_art_found_starting']}<b>{$letter}</b> found."); } } $HTMLOUT .= "</div>"; $HTMLOUT .= "</div></div></div></div><br>"; echo stdhead($lang['wiki_title'], true, $stdhead) . $HTMLOUT . stdfoot();