Jump to content

Custom field display on pilot pending [Solved]


orobouros

Recommended Posts

Hello,

i'm new to php and phpvms.

i've added a custom field in the pilot registration (ID IVAO).

I want to display this custom field in the pilot pending table in backend, with a link to the IVAO profile of each pilot.

I've tried some solutions but it doesn't work. Here's my last :

pilot_pending.php

<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
<h3>Pending Pilots</h3>
<?php
if(!$allpilots) {
echo '<p>There are no pilots!</p>';
return;
}
?>
<table id="tabledlist" class="tablesorter">
<thead>
<tr>
<th>Pilot Name</th>
<th>Email Address</th>
<th>Location</th>
<th>Hub</th>
<th>ID IVAO</th>
<th>Options</th>
</tr>
</thead>
<tbody>
<?php
foreach($allpilots as $pilot)
{
?>
<?php $urlivao = 'https://www.ivao.aero/Member.aspx?Id=';
$fieldvalues = 'phpvms_fieldvalues';
?>
<tr>
<td><a href="<?php echo SITE_URL?>/admin/index.php/pilotadmin/viewpilots?action=viewoptions&pilotid=<?php echo $pilot->pilotid;?>"><?php echo $pilot->firstname . ' ' . $pilot->lastname; ?></a></td>
<td align="center"><?php echo $pilot->email; ?></td>
<td align="center"><?php echo $pilot->location; ?></td>
<td align="center"><?php echo $pilot->hub; ?></td>
<td align="center"><a href=<?php echo $urlivao ?><?php echo PilotData::GetFieldValue($fieldvalues->pilotid, 'value'); ?> target="blank"><?php echo PilotData::GetFieldValue($fieldvalues->pilotid, 'value'); ?></a>
</td>
<td align="center" width="1%" nowrap>
 <button href="<?php echo SITE_URL?>/admin/action.php/pilotadmin/pendingpilots" action="approvepilot"
id="<?php echo $pilot->pilotid;?>" class="ajaxcall {button:{icons:{primary:'ui-icon-circle-check'}}}">Accept</button>

 <button href="<?php echo SITE_URL?>/admin/action.php/pilotadmin/pendingpilots" action="rejectpilot"
id="<?php echo $pilot->pilotid;?>" class="ajaxcall {button:{icons:{primary:'ui-icon-circle-close'}}}">Reject</button>

 <?php
 if(Config::Get('PILOT_AUTO_CONFIRM') == false) {
	 ?>
 <button href="<?php echo SITE_URL?>/admin/action.php/pilotadmin/resendemail" action="resendemail"
id="<?php echo $pilot->pilotid;?>" class="ajaxcall {button:{icons:{primary:'ui-icon-circle-close'}}}">Re-Send Activation Email</button>
 <?php
 }
 ?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>

I know the problem is located on line 33, but how to solve it ?

thanks for reply, have a nice day

Edited by orobouros
Link to comment
Share on other sites

Try this

<td align="center"><a href="https://www.ivao.aero/Member.aspx?id=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'value'); ?>" target="_blank"><?php echo PilotData::GetFieldValue($pilot->pilotid, 'value'); ?></a></td>

Make sure to change 'value' to your field name for the IVAO ID in your database.

Link to comment
Share on other sites

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...