Hey guys. So the BBCode issue is still one I need help solving. I have it displaying but not being executed. Second, the PHP I am attempting to put in a direct evaluation page through CMS is below, except I have changed everything from "echo" to $var = or$var.=, then set $output = $var; at the end. This code IS working on the site on a non-VMS page.
PHP Code:
//Get List of Divisions $sql = "SELECT * FROM " . TABLE_PREFIX . "gamelist ORDER BY gamename ASC"; $result = $db->query_read_slave($sql);
while ($g = mysql_fetch_array($result)) { $areas[] = $gn = $g[1]; $alist .= ", '$gn'"; } $areas = ["Games in Progress"]; $alist .= ", 'Games in Progress'";
// Get the Staff Members $sql = "SELECT * FROM " . TABLE_PREFIX . "staff ORDER BY FIELD(divdept, $alist), position DESC, username DESC"; $result = $db->query_read_slave($sql);
//Begin Output (Hopefully) echo "<p> Zealot Gaming hosts a variety of leaders in order to help ensure that all aspects of the clan are taken care of and any issues members have may be resolved at any time. For a list of positions, please visit the <a href='index.php/info/clan-structure' target='_self'>structure page</a>.</p>";
// Set basic cell counter $i = 1;
// Set previous area to nothing damnit. $prev = "";
//Go through each staff member while ($u = mysql_fetch_array($result)) {
// Check for Social Media code. if (!empty($facebook)) { $facebook = " <a href='$facebook'><img alt=\"$username's Facebook\" src='images/staff/social/facebook.png' /></a>"; } if (!empty($twitter)) { $twitter = " <a href='$twitter'><img alt=\"$username's Twitter\" src='images/staff/social/twitter.png' /></a>"; }
//Is this a new area? if ($area != $prev) {
// Yes // Do we need to close the previous table and add a cell? if ($i % 2 == 0 && !empty($prev)) { //Add a cell and close echo " <td valign='top'> </td> </tr> </table>"; } elseif ($i % 2 == 1 && !empty($prev)) { //Just close the table echo "</table>"; }
// Reset the column we're in. $i = 2; $prev = $area;
//New Area Heading echo "<h2 class='whiteglow' style='margin-bottom: 10px;'>$area</h2>";
//Start of Table echo "<table border='0' cellpadding='1' class='zebra' style='width: 100%;'>";
// Do we need to close the previous table and add a cell? if ($i % 2 == 0 ) { //Add a cell and close echo " <td valign='top'> </td> </tr> </table>"; } else { //Just close the table echo "</table>"; }