Jump to content

Recommended Posts

Posted

i have added a custom profile so pilots can add the vatsim or ivao id how do i get it to show on the pilot roster this its what iy looks like now

http://luxairways.org/index.php/pilots

and here is the current code

<style>
	.roster_table {
font-size:12px;
overflow:hidden;
border:1px solid #000000;
background:#fefefe;


margin-bottom:10px;
-moz-border-radius:5px; /* FF1+ */
-webkit-border-radius:5px; /* Saf3-4 */
border-radius:5px;
-webkit-box-shadow: 0 1px 5px #000000;
-moz-box-shadow: 0 1px 5px #fff;
margin-top: 10px;
width: 100%;
}

.roster_table td {padding:5px 10px 5px; text-align:center; }

.roster_table th {padding-top:15px; text-shadow: 1px 1px 1px #fff; background:white;}

/*.tsc_tables1_0 td {border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;}*/

.roster_table tr:nth-child(even) {background:#f6f6f6;}

.roster_table td.first, th.first {text-align:left}

.roster_table td.last {border-right:none;}
.roster_table tr.odd-row td {
background: white;
}

.roster_table td {
background: silver;
	padding: 5px;
	text-align: left;
	line-height: normal;
	-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}

.roster_table th {
background: #DADADA;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E6E6E6', endColorstr='#DADADA');
background: -webkit-gradient(linear, left top, left bottom, from(#E6E6E6), to(#789DAD));
background: -moz-linear-gradient(top, #E6E6E6, #789DAD);
	width: 200%;
}


.roster_table tr:first-child th.first {
-moz-border-radius-topleft:5px;
-webkit-border-top-left-radius:5px; /* Saf3-4 */
}

.roster_table tr:first-child th.last {
-moz-border-radius-topright:5px;
-webkit-border-top-right-radius:5px; /* Saf3-4 */
}

.roster_table tr:last-child td.first {
-moz-border-radius-bottomleft:5px;
-webkit-border-bottom-left-radius:5px; /* Saf3-4 */
}

.roster_table tr:last-child td.last {
-moz-border-radius-bottomright:5px;
-webkit-border-bottom-right-radius:5px; /* Saf3-4 */
}
</style>
<table border="0" style="vertical-align: top;" cellpadding="4" width="200%" class="roster_table" id="table" cellspacing="0">
<tbody><tr>
<th><h1><?php echo $title?></h1></th>
</tr>
<tr>
<td colspan="3">
<div id="content">
<?php $roster = PilotData::getAllPilots();  ?>
<?php
  if(!$roster)
  {
	  echo 'There are no pilots!';
	  return;
  }
?>
<table>
 <table id="tabledlist" class="other">

<thead>
<tr>
  <th width="50px">Pilot ID</th>
  <th width="300px">Name</th>
  <th width="120px">Rank</th>
  <th width="50px">Flights</th>
  <th width="100px">Hours</th>
  <th width="100px">HUB</th>
  <th width="300px">Vatsim ID</th>
  <th width="50px">Status</th>
</tr>
</thead>
<tbody>
<?php foreach($roster as $pilot) {
 if($pilot->retired == 1) { continue; }
?>
<tr>
  <TD ALIGN="center">
	   <img src="<?php echo Countries::getCountryImage($pilot->location);?>"
			 alt="<?php echo Countries::getCountryName($pilot->location);?>" align="absmiddle" />
 <a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>">
			 <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
  </td>
  <TD ALIGN="left">


	  <?php echo $pilot->firstname.' '.$pilot->lastname?>
  </td>
  <TD ALIGN="center"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td>
  <TD ALIGN="center"><?php echo $pilot->totalflights?></td>
  <TD ALIGN="center"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>
  <TD ALIGN="center"><?php echo $pilot->hub?></td>
  <td><div align="center">
	  <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Vatsim ID' );
if( $fieldvalue != '' )
{
echo '<a href="[url="http://stats.vatsim.net/search_id.php?id="]http://stats.vatsim....arch_id.php?id=[/url]' . $fieldvalue . '" target="_blank">' . $fieldvalue . '</a></a>' ;
}
else
{
echo '<img src="[url="http://yourwebsite.com/images/inactiveicon.png"]http://yourwebsite.c...activeicon.png"[/url] width="20" height="18" border="0" alt="" /></a>' ;
}
?>
	</div></td>
  <TD ALIGN="center"><?php if($pilot->retired == 0) { ?>
	<img src="[url="http://i105.photobucket.com/albums/m228/Mickpooel89/Untitled_zpsfd5b01bd.png"]http://i105.photobuc...psfd5b01bd.png"[/url] alt="Active" />
			<?php } else { ?>
	<img src="[url="http://i105.photobucket.com/albums/m228/Mickpooel89/Untitled_zps5d4395e6.png"]http://i105.photobuc...ps5d4395e6.png"[/url] alt="Inactive" />
	<?php } ?></td>


</td>

</tr>
<?php } ?>
</tbody>
</table>
</div>

  • Members
Posted

I cannot understand what you try to achieve with that code

<div align="center">
			  <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Vatsim ID' );
if( $fieldvalue != '' )
{
echo '<a href="[url="http://stats.vatsim.net/search_id.php?id="]http://stats.vatsim....arch_id.php?id=[/url]' . $fieldvalue . '" target="_blank">' . $fieldvalue . '</a></a>' ;
}
else
{
echo '<img src="[url="http://yourwebsite.com/images/inactiveicon.png"]http://yourwebsite.c...activeicon.png"[/url] width="20" height="18" border="0" alt="" /></a>' ;
}
?>
		    </div>

do you want to show a pic or just the id ?

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.

Loading...
×
×
  • Create New...