Пример #1
0
function showinfo($whichteam, $isowner)
{
    global $playerinfo, $invite_info, $team, $l_team_coord, $l_team_member, $l_options, $l_team_ed, $l_team_inv, $l_team_leave, $l_team_members, $l_score, $l_team_noinvites, $l_team_pending;
    global $db, $l_team_eject;
    global $db_logging;
    global $color_line2;
    // Heading
    echo "<div align=center>";
    echo "<h3><font color=white><strong>{$team['team_name']}</strong>";
    echo "<br><font size=2>\"<i>{$team['description']}</i>\"</font></h3>";
    if ($playerinfo['team'] == $team['id']) {
        echo "<font color=white>";
        if ($playerinfo['ship_id'] == $team['creator']) {
            echo "{$l_team_coord} ";
        } else {
            echo "{$l_team_member} ";
        }
        echo "{$l_options}<br><font size=2>";
        if (isTeamOwner($team, $playerinfo) == true) {
            echo "[<a href=teams.php?teamwhat=9&whichteam={$playerinfo['team']}>{$l_team_ed}</a>] - ";
        }
        echo "[<a href=teams.php?teamwhat=7&whichteam={$playerinfo['team']}>{$l_team_inv}</a>] - [<a href=teams.php?teamwhat=2&whichteam={$playerinfo['team']}>{$l_team_leave}</a>]</font></font>";
    }
    DISPLAY_INVITE_INFO();
    echo "</div>";
    // Main table
    echo "<table border=2 cellspacing=2 cellpadding=2 bgcolor=\"#400040\" width=\"75%\" align=center>";
    echo "<tr>";
    echo "<td><font color=white>{$l_team_members}</font></td>";
    echo "</tr><tr bgcolor={$color_line2}>";
    $result = $db->Execute("SELECT * FROM {$db->prefix}ships WHERE team=?;", array($whichteam));
    db_op_result($db, $result, __LINE__, __FILE__, $db_logging);
    while (!$result->EOF) {
        $member = $result->fields;
        echo "<td> - {$member['character_name']} ({$l_score} {$member['score']})";
        if ($isowner && $member['ship_id'] != $playerinfo['ship_id']) {
            echo " - <font size=2>[<a href=\"teams.php?teamwhat=5&who={$member['ship_id']}\">{$l_team_eject}</a>]</font></td>";
        } else {
            if ($member['ship_id'] == $team['creator']) {
                echo " - {$l_team_coord} </td>";
            }
        }
        echo "</tr><tr bgcolor={$color_line2}>";
        $result->MoveNext();
    }
    // Displays for members name
    $res = $db->Execute("SELECT ship_id,character_name FROM {$db->prefix}ships WHERE team_invite=?;", array($whichteam));
    db_op_result($db, $res, __LINE__, __FILE__, $db_logging);
    echo "<td bgcolor={$color_line2}><font color=white>{$l_team_pending} <strong>{$team['team_name']}</strong></font></td>";
    echo "</tr><tr>";
    if ($res->RecordCount() > 0) {
        echo "</tr><tr bgcolor={$color_line2}>";
        while (!$res->EOF) {
            $who = $res->fields;
            echo "<td> - {$who['character_name']}</td>";
            echo "</tr><tr bgcolor={$color_line2}>";
            $res->MoveNext();
        }
    } else {
        echo "<td>{$l_team_noinvites} <strong>{$team['team_name']}</strong>.</td>";
        echo "</tr><tr>";
    }
    echo "</tr></table>";
}
Пример #2
0
function showinfo($whichteam,$isowner)
{
	global $playerinfo, $invite_info, $team, $l_team_coord, $l_team_member, $l_options, $l_team_ed, $l_team_inv, $l_team_leave, $l_team_members, $l_score, $l_team_noinvites, $l_team_pending;
  global $db, $dbtables, $l_team_eject;

	/* Heading */
   echo"<div align=center>";
   echo "<h3><font color=white><B>$team[team_name]</B>";
 	echo "<br><font size=2>\"<i>$team[description]</i>\"</font></H3>";
   if ($playerinfo[team] == $team[id])
   {
      echo "<font color=white>";
   	if ($playerinfo[player_id] == $team[creator]) {
   	   echo "$l_team_coord ";
      }
   	else
   	{
   		echo "$l_team_member ";
   	}
   	echo "$l_options<br><font size=2>";
   	if ($playerinfo[player_id] == $team[creator])
   	{
   	   echo "[<a href=$PHP_SELF?teamwhat=9&whichteam=$playerinfo[team]>$l_team_ed</a>] - [<a href=$PHP_SELF?teamwhat=7&whichteam=$playerinfo[team]>$l_team_inv</a>] - ";
   	}
   	echo "[<a href=$PHP_SELF?teamwhat=2&whichteam=$playerinfo[team]>$l_team_leave</a>]</font></font>";
   }
   DISPLAY_INVITE_INFO();
   echo "</div>";

   /* Main table */
	echo "<table border=2 cellspacing=2 cellpadding=2 bgcolor=\"$color_line2\" width=\"100%\" align=center>";
	echo "<tr>";
	echo "<td><font color=white>$l_team_members</font></td>";
	echo "</tr><tr bgcolor=$color_line2>";
	$result  = $db->Execute("SELECT * FROM $dbtables[players] WHERE team=$whichteam");
	while (!$result->EOF) {
    $member = $result->fields;
		echo "<td> - $member[character_name] ($l_score ".NUMBER($member[score]).")";
		if ($isowner && ($member[player_id] != $playerinfo[player_id])) {
			echo " - <font size=2>[<a href=\"$PHP_SELF?teamwhat=5&who=$member[player_id]\">$l_team_eject</A>]</font></td>";
		} else {
			if ($member[player_id] == $team[creator])
			{
				echo " - $l_team_coord</td>";
			}
		}
		echo "</tr><tr bgcolor=$color_line2>";
    $result->MoveNext();
	}
   /* Displays for members name */
   $res = $db->Execute("SELECT player_id,character_name FROM $dbtables[players] WHERE team_invite=$whichteam");
	echo "<td bgcolor=$color_line2><font color=white>$l_team_pending <B>$team[team_name]</B></font></td>";
   echo "</tr><tr>";
	if ($res->RecordCount() > 0) {
		echo "</tr><tr bgcolor=$color_line2>";
		while (!$res->EOF) {
      $who = $res->fields;
			echo "<td> - $who[character_name]";
			if ($isowner) {
				echo " - <font size=2>[<a href=\"$PHP_SELF?teamwhat=10&who=$who[player_id]\">Retract</A>]</font></td>";
			} else {
				echo "</td>";
			}
		   echo "</tr><tr bgcolor=$color_line2>";
		  $res->MoveNext();
    }
	} else {
		echo "<td>$l_team_noinvites <B>$team[team_name]</B>.</td>";
      echo "</tr><tr>";
	}
	echo "</tr></table>";
}