Jump to the post that solved this thread.
Solved: 6 Years, 1 Week ago [Error Message] page showteam.php
Solved: 6 Years, 1 Week ago
This user has been denied support. This user has been denied support.
I had an error on the forum page showteam.php

Warning [2] Cannot modify header information - headers already sent by (output started at /home/localhost/public_html/showteam.php:2) - Line: 1861 - File: inc/functions.php
File 	Line 	Function
[PHP] 	  	errorHandler->error
/inc/functions.php 	1861 	header
/inc/class_session.php 	362 	my_setcookie
/inc/class_session.php 	94 	session->load_guest
/global.php 	54 	session->init

I would like to edit pages showteam.php like this:

[Image: lWAuj.png]

The source showteam.php


define("IN_MYBB", 1);
require_once "global.php"; 

global $headerinclude, $header, $theme, $footer, $lang, $userbar;



$groups = '4';
//$userquery = $db->simple_select("users", "uid, usertitle, username, usergroup, avatar, displaygroup", "usergroup IN(4,6)" , array("order_by" => 'uid', "order_dir" => 'ASC'));
$userquery = $db->query("
        SELECT u.uid, u.username, u.avatar, u.avatardimensions, u.usergroup, u.displaygroup, u.usertitle as customtitle, ug.*
        FROM ".TABLE_PREFIX."users u
        LEFT JOIN ".TABLE_PREFIX."usergroups ug ON (u.usergroup=ug.gid)
        WHERE u.usergroup IN ($groups)
        ORDER BY u.uid ASC

if ($db->num_rows($userquery) > 0)
    $usertablerows = "";
    while ($users = $db->fetch_array($userquery))
                            $staffuser = array(get_user($users['uid']));
                            $users['username'] = format_name($users['username'], $users['usergroup'], $users['displaygroup']);
                            $users['profilelink'] = get_profile_link($users['uid']);
                            $regdate = my_date($mybb->settings['dateformat'], $users['regdate']);
                            $userbar = ['image'];
                            $usertablerows .= '    
			 <div class="forum-team-col1">
			 	<div class="forum-team-back">
			 		 <div class="forum-team">
                         		 <img class="forum-team-avatar" src='.$users['avatar'].'></img>
					 <div class="forum-team-title"><span><strong>'. build_profile_link($users['username'], $users['uid']). '</strong></span></a></strong></span></div>
					 <div class="forum-team-last">Staff<a href="private.php?action=send&uid='.$users['uid'].'"><div style="border-radius: 2px; margin-top: -13px; margin-left: 20px; float: right; background: #151515; padding: 5px 10px; font-size: 12px; color: #fff; font-weight: 400;">PM</div></a></div>
			 		 <div class="forum-team-offline">Offline</div>
    $usertablerows = '<tr><td class="trow1" colspan="2" align="center">'. "Oh noes! no staff seem to have appeared. Try to refresh the page or something, idk." .'</td></tr>';

<title>Show Team</title>
<table border="0" cellspacing="1" cellpadding="2" class="tborder-staff">



$template=str_replace("\'", "'", addslashes($template));




Solved: 6 Years, 1 Week ago
ensure that you have no characters & white spaces before <?php and you can remove php end tag (?>)
file should be saved with utf8 encoding without BoM
Solved: 6 Years, 1 Week ago
This user has been denied support. This user has been denied support.
ok thank you sir solved, but do not shut out this thread .. I want to ask again later.

how to add the last visit and offline / online staff above sir?
Jump to the post that solved this thread.

Forum Jump:

Users browsing this thread: 1 Guest(s)