Jump to content

[SOLVED] Code Change


OmerAslan

Recommended Posts

I think he needs to use the Auth:: as he wants to display in an external page?

Depends where he wants it, the Auth:: variable will only access the currently logged in user (I believe), so you can declare $pilot or $userinfo separately wherever he wants to use it.

And also, by the looks of things, it looks like he wants to access the profile page of a pilot. Specifically, like the pilot roster, $pilot could be a number of pilotids which are looped through.

<?php
$allpilots = PilotData::getAllPilots();
foreach($allpilots as $pilot) {
  echo '<a href="'.SITE_URL.'/index.php/profile/view/{$pilot->pilotid}">View Profile</a>';
}
?>

Link to comment
Share on other sites

Sorry. I will try to explain better. I am using different skin and with this code

<td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
  <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

pilot id taking me to old skin. I want to change this php echo url to www.mywebsite.com

to do this i have to make little change on this line also ('/profile/view/'.$pilot->pilotid);?>">

this is what i am trying to do.

Thanks.

Link to comment
Share on other sites

  • Moderators

Sorry. I will try to explain better. I am using different skin and with this code

<td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

pilot id taking me to old skin. I want to change this php echo url to www.mywebsite.com

to do this i have to make little change on this line also ('/profile/view/'.$pilot->pilotid;?>">

this is what i am trying to do.

Thanks.

Ok i think this is what you need,

<td width="1%" nowrap><a href="http://www.yoursite.com/profile/view/<?php echo $pilot->pilotid;?>">
<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

If im understanding you correct.

Link to comment
Share on other sites

Ok i think this is what you need,

<td width="1%" nowrap><a href="http://www.yoursite.com/profile/view/<?php echo $pilot->pilotid;?>">
<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

If im understanding you correct.

Yes my friend. It's working well. Thanks a lot.

Link to comment
Share on other sites

Hi,

Also i want to change two more links same way please,

If anyone using Airmail i changed all the links only

Move message to : when i move any message from folder to folder

and

Create New Folder : when i create new folder when i click save new folder button

move_message.php

<?php
//AIRMail3
//simpilotgroup addon module for phpVMS virtual airline system
//
//simpilotgroup addon modules are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2009-2011, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
?>
   <form action="http://www.crew.aalvirtual.com/index.php/Mail" method="post" enctype="multipart/form-data">
    <table width="100%" cellspacing="1" cellpadding="5" border="1">
	    <tr>
		    <td colspan="2" align="center"><b>Create New Message folder for <?php echo (Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname.' '.$pilotcode); ?></b></td>
	    </tr>
	    <tr>
		    <td colspan="2" align="center"><b>New Folder Name:<input type="text" name="folder_title"></b></td>
	    </tr>
	    <tr>
		    <td colspan="2" align="center">
			    <input type="hidden" name="action" value="savefolder" />
			    <input type="submit" value="Save New Folder">
		    </td>
	    </tr>
	    <tr>
		    <td align="center" colspan="2"><b><font size="1.5px">| AIRmail3 © 2011 | <a href="http://www.simpilotgroup.com">simpilotgroup.com</a> |</font></b></td>
	    </tr>
    </table>
   </form>

mail_newfolder.php

<?php
//AIRMail3
//simpilotgroup addon module for phpVMS virtual airline system
//
//simpilotgroup addon modules are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2009-2011, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
?>
<form action="http://www.crew.aalvirtual.com/index.php/Mail" method="post" enctype="multipart/form-data">
   <center>
    <b>Move Message To:</b>
   <select name="folder">
    <option value="0">AIRMail Inbox</option>
   <?php
    if(isset($folders)) {foreach ($folders as $folder) {echo '<option value="'.$folder->id.'">'.$folder->folder_title.'</option>';}
   }?>
   </select>
   <input type="hidden" name="mail_id" value="<?php echo $mail_id ?>" />
   <input type="hidden" name="cur_folder" value="<?php echo $data->reciever_folder ?>" />
   <input type="hidden" name="action" value="move" />
   <input type="submit" value="Move" />
   </center>
</form>
<center>
   <b><font size="1.5px">| AIRmail3 © 2011 | <a href="http://www.simpilotgroup.com">simpilotgroup.com</a> |</font></b>
</center>

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