This repository has been archived by the owner on Dec 6, 2019. It is now read-only.
/
pilot_public_profile.tpl
86 lines (80 loc) · 2.33 KB
/
pilot_public_profile.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?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.'/'.$pilotcode.'.png')) {
echo 'No avatar';
} else {
echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.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 $pilotcode ?></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>
<?php
/*
Added in 2.0!
*/
$chart_width = '800';
$chart_height = '250';
/* Don't need to change anything below this here */
?>
<div align="center" style="width: 100%;">
<div align="center" id="pireps_chart"></div>
</div>
<script type="text/javascript" src="<?php echo fileurl('/lib/js/ofc/js/swfobject.js')?>"></script>
<script type="text/javascript">
swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>",
"pireps_chart", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>",
"9.0.0", "expressInstall.swf",
{"data-file":"<?php echo actionurl('/pilots/statsdaysdata/'.$userinfo->pilotid);?>"});
</script>