Hi guys, me again
So on my homepage, on the recent pilots bit, if you click on a name, it goes to a page, "http://myva.co.uk/pilotarea/index.php/profile/view/22"
And on that page, it says:
"
This pilot does not exist!
PIREPs List
No reports have been found
"
Conn
If you click any name, it redirects you to the same url? This means that the pilot id is hard coded and it’s not correct. You will have to use variables instead.
No, it goes to like profile/view/rightid but then it doesn’t say it is an account.
Could you please send me a url?
As i can understand it is a template problem, it seems that the developer has used wrong variables. Open your lib/skins/lance/pilot_public_profile.tpl (or .php based on your phpVMS version) and replace its content with the following:
<style>
.bg{
background-color: #ffffff;
margin-left: 200px;
margin-right: 200px;
border-bottom-color: aqua;
}
a{
color:#212121;
}
</style>
<div class="bg">
<?php
if(!$userinfo) {
echo '<h3>This pilot does not exist!</h3>';
return;
}
?>
<h3>Profile For <?php echo $userinfo->firstname . ' ' . $userinfo->lastname?></h3>
<table>
<tr>
<td align="center" valign="top">
<?php
if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$userinfocode.'.png')) {
echo 'No avatar';
} else {
echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$userinfocode.'.png'.'" alt="No Avatar" /> ';
}
?>
<br /><br />
<img src="<?php echo $userinfo->rankimage?>" alt="" />
</td>
<td valign="top">
<ul>
<li><strong>Pilot ID: </strong><?php echo $userinfocode ?></li>
<li><strong>Rank: </strong><?php echo $userinfo->rank;?></li>
<li><strong>Total Flights: </strong><?php echo $userinfo->totalflights?></li>
<li><strong>Total Hours: </strong><?php echo Util::AddTime($userinfo->totalhours, $userinfo->transferhours); ?></li>
<li><strong>Location: </strong>
<img src="<?php echo Countries::getCountryImage($userinfo->location);?>"
alt="<?php echo Countries::getCountryName($userinfo->location);?>" />
<?php echo Countries::getCountryName($userinfo->location);?>
</li>
<?php
// Show the public fields
if($allfields) {
foreach($allfields as $field) {
echo "<li><strong>$field->title: </strong>$field->value</li>";
}
}
?>
</ul>
<p>
<strong>Awards</strong>
<?php
if(is_array($allawards)) {
?>
<ul>
<?php
foreach($allawards as $award) {
/* To show the image:
<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
*/
?>
<li><?php echo $award->name ?></li>
<?php } ?>
</ul>
<?php
}
?>
</p>
</td>
</tr>
</table>
<!-- Google Chart Implementation - OFC Replacement - simpilot -->
<img src="<?php echo $chart_url ?>" alt="Pirep Chart" />
</div>