View Single Post
  #39  
Old 03-13-2015, 06:58 PM
KGodel's Avatar
KGodel KGodel is offline
 
Join Date: May 2011
Location: Indiana
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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); 

// Start Division/Area List 
$areas = ["Administration""Clan Staff"]; 
$alist "'Administration', 'Clan Staff'"

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&nbsp;<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)) { 
    
    
// Let's set our data. 
    
$userid $u[0]; 
    
$username $u[1]; 
    
$rname $u[2]; 
    
$rank $u[3]; 
    
$area $u[4]; 
    
$facebook $u[5]; 
    
$twitter $u[6]; 
    
$bio $u[7]; 
    
$img "images/staff/" strtolower($username) . ".png"
    
$email strtolower($username) . "@zealotgaming.com"
    
    
// Check for Social Media code. 
    
if (!empty($facebook)) { $facebook "&nbsp;&nbsp;<a href='$facebook'><img alt=\"$username's Facebook\" src='images/staff/social/facebook.png' /></a>"; } 
    if (!empty(
$twitter)) { $twitter "&nbsp;&nbsp;<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 == && !empty($prev)) { 
            
//Add a cell and close 
            
echo "  <td valign='top'>&nbsp;</td> 
                  </tr> 
                </table>"

        } elseif (
$i == && !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%;'>"
        
        
// First column, new row. 
        
echo "<tr> 
                <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='
$username' height='110' src='$img' width='110' /></div> 
                <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                <strong>Name</strong>: 
$rname<br /> 
                <strong>Position</strong>: 
$rank<br /> 
                <strong>Bio</strong>: 
$bio</td>"
    } else { 
        
        
//No 
        
        // Is this a new row? 
        
if ($i == 0) { 
            
            
//No 
            // Enter the information then close the row 
            
echo "  <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='$username' height='110' src='$img' width='110' /></div> 
                    <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                    <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                    <strong>Name</strong>: 
$rname<br /> 
                    <strong>Position</strong>: 
$rank<br /> 
                    <strong>Bio</strong>: 
$bio</td> 
                </tr>"

            
            
//Set our cell counter 
            
$i++;
            
$prev $area;
            
        } else { 
            
            
//No 
            // Start a new row. 
            
echo "<tr> 
                    <td valign='top' width='50%'><div style='float: left; margin-right: 10px;'> <img alt='
$username' height='110' src='$img' width='110' /></div> 
                    <div style='float: right;'> <a href='mailto:
$email'><img alt='Email $username' src='images/staff/social/email.png' /></a>".$facebook.$twitter."</div> 
                    <strong>User</strong>: <a href='member.php?u=
$userid'>$username</a><br /> 
                    <strong>Name</strong>: 
$rname<br /> 
                    <strong>Position</strong>: 
$rank<br /> 
                    <strong>Bio</strong>: 
$bio</td>"
            
            
//Set our cell counter 
            
$i++;
            
$prev $area;
        } 
        
    } 


// Do we need to close the previous table and add a cell? 
if ($i == ) { 
    
//Add a cell and close 
    
echo "  <td valign='top'>&nbsp;</td> 
          </tr> 
        </table>"

} else { 
    
//Just close the table 
    
echo "</table>"

Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01222 seconds
  • Memory Usage 1,860KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete