Jump to content

Roster


unidox

Recommended Posts

This is my code:

 

<img src="images/demo_20.gif" width="216" height="25" alt="" />
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image: url(images/demo_27.gif)">
            <tr>
              <td><?php
$mysql_table = "cp_roster";
require_once ("inc/required.inc.php");
$result = MYSQL_QUERY("SELECT * FROM $mysql_table ORDER BY type ASC") or die (mysql_error());
$result2 = MYSQL_QUERY("SELECT * FROM cp_divisions ORDER BY division_id ASC") or die (mysql_error());
$rows = mysql_num_rows($result);
if ($rows == "0") {
echo "<b>No Members in the roster database table.</b>";
} else {
echo '<table border="0" align="center" cellpadding="0" cellspacing="3">';
$i = 0;
    echo "<tr><td colspan='3'><div align='center'>";
    while ($mysql2=mysql_fetch_array($result2)) {
        if ($mysql2[image] !== "0") {
        ?>
         <img src="/games/<?=$mysql2[image]?>.gif" width="15" height="15" />
        <?
        } else {
        echo "2";
        ?>

        <?
        }
        }
        echo "</div></td></tr>";
while ($mysql=mysql_fetch_array($result)) {
	$i++;
	if ($i == 1) echo '<tr>';
	if ($mysql[image] !== "0") {
        ?>
              <td style="border: 1px solid rgb(42,49,52)"><a href="index.php?id=roster&roster_id=<?=$mysql[roster_id]?>"><img src="<?=$imagefilepath . 'rosterpic' . $mysql[roster_id] . '.' . $mysql['imagetype']?>" width="45" height="45" border="0" onmouseover="swapOnRoster('<?=$mysql[first]?>','<?=$mysql[last]?>','<?=$mysql[alias]?>')" onmouseout="swapOffRoster()"></img></a></td>
              <?
              } else {
              ?>
              <td style="border: 1px solid rgb(42,49,52)"><a href="index.php?id=roster&roster_id=<?=$mysql[roster_id]?>"><img src="pics/roster.gif" width="45" height="45" border="0" onmouseover="swapOnRoster('<?=$mysql[first]?>','<?=$mysql[last]?>','<?=$mysql[alias]?>')" onmouseout="swapOffRoster()"></img></a></td>
              <?
              }
	if ($i == 4) {
		echo '</tr>';
		$i = 0;
	}
    }
if ($i != 0) echo '</tr>';
echo '</table><div id="handleDivision">
    <div align="center" id="rosterHandle">Select to view profile</div>
    <div class="clearBoth"></div></div>';
}
?>
              </td>
              </tr>
          </table>

 

What I am trying to do is have everyone on the roster have a team. It will sort the members by the team, so when you click on the team image, it goes to that part of the roster, how would I go about doing this? Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.