当前位置: 首页>>代码示例>>PHP>>正文


PHP PilotData::GetPilotCode方法代码示例

本文整理汇总了PHP中PilotData::GetPilotCode方法的典型用法代码示例。如果您正苦于以下问题:PHP PilotData::GetPilotCode方法的具体用法?PHP PilotData::GetPilotCode怎么用?PHP PilotData::GetPilotCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PilotData的用法示例。


在下文中一共展示了PilotData::GetPilotCode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: acarsdata

 public function acarsdata()
 {
     $output = '';
     CodonEvent::Dispatch('refresh_acars', 'XML');
     $flights = ACARSData::GetACARSData();
     $xml = new SimpleXMLElement('<livemap/>');
     if (!$flights) {
         $flights = array();
     }
     foreach ($flights as $flight) {
         $pilot = $xml->addChild('aircraft');
         $pilot->addAttribute('flightnum', $flight->flightnum);
         $pilot->addAttribute('lat', $flight->lat);
         $pilot->addAttribute('lng', $flight->lng);
         $pilot->addChild('pilotid', PilotData::GetPilotCode($flight->code, $flight->pilotid));
         $pilot->addChild('pilotname', $flight->firstname . ' ' . $flight->lastname);
         $pilot->addChild('flightnum', $flight->flightnum);
         $pilot->addChild('lat', $flight->lat);
         $pilot->addChild('lng', $flight->lng);
         $pilot->addChild('depicao', $flight->depicao);
         $pilot->addChild('arricao', $flight->arricao);
         $pilot->addChild('phase', $flight->phasedetail);
         $pilot->addChild('alt', $flight->alt);
         $pilot->addChild('gs', $flight->gs);
         $pilot->addChild('distremain', $flight->distremain);
         $pilot->addChild('timeremain', $flight->timeremain);
     }
     header('Content-type: text/xml');
     echo $xml->asXML();
 }
开发者ID:ryanunderwood,项目名称:phpVMS,代码行数:30,代码来源:XML.php

示例2: sendmail

 public function sendmail()
 {
     $this->checkPermission(EMAIL_PILOTS);
     echo '<h3>Sending email</h3>';
     if ($this->post->subject == '' || trim($this->post->message) == '') {
         $this->set('message', 'You must enter a subject and message!');
         $this->render('core_error.php');
         return;
     }
     if (count($this->post->groups) == 0) {
         $this->set('message', 'You must select groups to send to!');
         $this->render('core_error.php');
         return;
     }
     echo 'Sending email...<br />';
     $pilotarray = array();
     //Begin the nice long assembly of e-mail addresses
     foreach ($this->post->groups as $groupid) {
         if ($groupid == 'all') {
             $all_pilots = PilotData::findPilots(array());
             foreach ($all_pilots as $pilot) {
                 $pilotarray[$pilot->pilotid] = $pilot;
             }
             break;
         } else {
             $tmp = PilotGroups::getUsersInGroup($groupid);
             if (count($tmp) == 0 || !is_array($tmp)) {
                 continue;
             }
             foreach ($tmp as $pilot) {
                 $pilotarray[$pilot->pilotid] = $pilot;
             }
         }
     }
     $subject = DB::escape($this->post->subject);
     $message = stripslashes($this->post->message) . PHP_EOL . PHP_EOL;
     # Do some quick fixing of obvious formatting errors
     $message = str_replace('<br>', '<br />', $message);
     foreach ($pilotarray as $pilot) {
         echo 'Sending for ' . $pilot->firstname . ' ' . $pilot->lastname . '<br />';
         # Variable replacements
         $send_message = str_replace('{PILOT_FNAME}', $pilot->firstname, $message);
         $send_message = str_replace('{PILOT_LNAME}', $pilot->lastname, $send_message);
         $send_message = str_replace('{PILOT_ID}', PilotData::GetPilotCode($pilot->code, $pilot->pilotid), $send_message);
         $send_message = utf8_encode($send_message);
         Util::SendEmail($pilot->email, $subject, $send_message);
     }
     echo 'Complete!';
     LogData::addLog(Auth::$userinfo->pilotid, 'Sent pass mail');
     return;
 }
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:51,代码来源:MassMailer.php

示例3: editprofile

 public function editprofile()
 {
     if (!Auth::LoggedIn()) {
         $this->set('message', 'You must be logged in to access this feature!');
         $this->render('core_error.tpl');
         return;
     }
     $this->set('userinfo', Auth::$userinfo);
     $this->set('customfields', PilotData::GetFieldData(Auth::$pilotid, true));
     $this->set('bgimages', PilotData::GetBackgroundImages());
     $this->set('countries', Countries::getAllCountries());
     $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
     $this->render('profile_edit.tpl');
 }
开发者ID:ryanunderwood,项目名称:phpVMS,代码行数:14,代码来源:Profile.php

示例4: create_acars_flight

 protected static function create_acars_flight($flight)
 {
     if (is_object($flight)) {
         $flight = (array) $flight;
     }
     // If a unique was specified
     if (isset($flight['unique_id'])) {
         $flight['id'] = $flight['unique_id'];
     }
     $acars_xml = self::$xml->addChild('flight');
     $acars_xml->addChild('unique_id', $flight['id']);
     $acars_xml->addChild('pilotid', PilotData::GetPilotCode($flight['code'], $flight['pilotid']));
     $acars_xml->addChild('pilotname', $flight['pilotname']);
     $acars_xml->addChild('flightnum', $flight['flightnum']);
     $acars_xml->addChild('aircraft', $flight['aircraft']);
     $acars_xml->addChild('lat', $flight['lat']);
     $acars_xml->addChild('lng', $flight['lng']);
     $acars_xml->addChild('depicao', $flight['depicao']);
     $acars_xml->addChild('arricao', $flight['arricao']);
     $acars_xml->addChild('deptime', $flight['deptime']);
     $acars_xml->addChild('arrtime', $flight['arrtime']);
     $acars_xml->addChild('heading', $flight['heading']);
     $acars_xml->addChild('phase', $flight['phasedetail']);
     $acars_xml->addChild('alt', $flight['alt']);
     $acars_xml->addChild('gs', $flight['gs']);
     $acars_xml->addChild('distremain', $flight['distremain']);
     $acars_xml->addChild('timeremain', $flight['timeremaining']);
     $acars_xml->addChild('client', $flight['client']);
     $acars_xml->addChild('lastupdate', $flight['lastupdate']);
 }
开发者ID:ryanunderwood,项目名称:phpVMS,代码行数:30,代码来源:CentralData.class.php

示例5: resethours

 /**
  * Maintenance::resethours()
  * 
  * @return
  */
 public function resethours()
 {
     CodonModule::checkPermission(MAINTENANCE);
     echo '<h3>Updating Total Hours Count</h3>';
     $total = 0;
     echo '<p>Calculating hours for all pilots: <br />';
     $allpilots = PilotData::GetAllPilots();
     foreach ($allpilots as $pilot) {
         $hours = PilotData::UpdateFlightHours($pilot->pilotid);
         $total = Util::AddTime($total, $hours);
         echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid) . " - found {$hours} flight hours for number <br />";
     }
     echo "Pilots have a total of <strong>{$total} hours</strong><br /><br />";
     echo "<strong>Now counting from PIREPS</strong><br />";
     StatsData::UpdateTotalHours();
     echo 'Found ' . StatsData::TotalHours() . ' total hours, updated<br /></p>';
     LogData::addLog(Auth::$userinfo->pilotid, 'Reset hours');
 }
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:23,代码来源:Maintenance.php

示例6: create_acars_flight

 /**
  * CentralData::create_acars_flight()
  * 
  * @param mixed $flight
  * @return
  */
 protected static function create_acars_flight($flight)
 {
     if (is_object($flight)) {
         $flight = (array) $flight;
     }
     // If a unique was specified
     if (isset($flight['unique_id'])) {
         $flight['id'] = $flight['unique_id'];
     }
     $acars_xml = self::addElement(null, 'flight', null, array('unique_id' => $flight['id'], 'pilotid' => PilotData::GetPilotCode($flight['code'], $flight['pilotid']), 'pilotname' => $flight['pilotname'], 'flightnum' => $flight['flightnum'], 'aircraft' => $flight['aircraft'], 'lat' => $flight['lat'], 'lng' => $flight['lng'], 'depicao' => $flight['depicao'], 'arricao' => $flight['arricao'], 'deptime' => $flight['deptime'], 'arrtime' => $flight['arrtime'], 'heading' => $flight['heading'], 'phase' => $flight['phasedetail'], 'alt' => $flight['alt'], 'gs' => $flight['gs'], 'distremain' => $flight['distremain'], 'timeremain' => $flight['timeremaining'], 'client' => $flight['client'], 'lastupdate' => $flight['lastupdate']));
 }
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:17,代码来源:CentralData.class.php

示例7: url

				Sign-in with your pilot id or email, or <a href="<?php 
    echo url('/registration');
    ?>
">register</a><br />
			<input type="text" name="email" value="" onClick="this.value=''" />
			<input type="password" name="password" value="" />
			<input type="hidden" name="remember" value="on" />
			<input type="hidden" name="redir" value="index.php/profile" />
			<input type="hidden" name="action" value="login" />
			<input type="submit" name="submit" value="Log In" />
			</form>
			<?php 
} else {
    /*	Auth::$userinfo has the information about the user currently logged in
    			We will use this next line - this gets their full pilot id, formatted properly */
    $pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
    ?>
		
		<img align="left" height="50px" width="50px" style="margin-right: 10px;"
			src="<?php 
    echo PilotData::getPilotAvatar($pilotid);
    ?>
" />

		<strong>Pilot ID: </strong> <?php 
    echo $pilotid;
    ?>
		<strong>Rank: </strong><?php 
    echo Auth::$userinfo->rank;
    ?>
<br />
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:31,代码来源:layout.php

示例8: foreach

</tr>
</thead>
<tbody>
<?php 
foreach ($allbids as $bid) {
    ?>
<tr id="row<?php 
    echo $bid->bidid;
    ?>
">
	<td><?php 
    echo $bid->code . $bid->flightnum . "({$bid->depicao} - {$bid->arricao})";
    ?>
</td>
	<td><?php 
    echo PilotData::GetPilotCode($bid->code, $bid->flightnum) . ' - ' . $bid->firstname . ' ' . $bid->lastname;
    ?>
</td>
	<td><?php 
    echo $bid->dateadded;
    ?>
</td>
	<td>
	<button href="<?php 
    echo SITE_URL;
    ?>
/admin/action.php/pilotadmin/viewbids" action="deletebid"
		id="<?php 
    echo $bid->bidid;
    ?>
" class="deleteitem {button:{icons:{primary:'ui-icon-trash'}}}">
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:31,代码来源:pilots_viewallbids.php

示例9: Smarty

 * VERSION: 1.0
 * DATE: 2015.12.25
 * AUTHOR: BASTIAN WAGNER
*/
require './smarty/libs/Smarty.class.php';
//Smarty einbinden
require '../phpvms/core/codon.config.php';
// phpVMS config file einbinden
//Neue Smarty Instanz erstellen
$tpl = new Smarty();
//Pilot-Basisinformationen aus URL und phpVMS auslesen
$pilotid = $_GET["id"];
$userinfo = PilotData::getPilotData($pilotid);
//Alle Daten des Piloten in Variablen speichern
//PilotID
$pilotcode = PilotData::GetPilotCode($userinfo->code, $userinfo->pilotid);
//Pilot Name
$name = $userinfo->firstname . ' ' . $userinfo->lastname;
//Rang Bild
$rankimg = $userinfo->rankimage;
//Rang
$rank = $userinfo->rank;
//Flüge insg.
$totalflights = $userinfo->totalflights;
//Stunden insg.
$totalhours = Util::AddTime($userinfo->totalhours, $userinfo->transferhours);
//Landesflagge
$countryflag = Countries::getCountryImage($userinfo->location);
//Landesname
$countryname = Countries::getCountryName($userinfo->location);
//IVAO Status Badge fieldvalue = IVAO VID
开发者ID:baswag,项目名称:Cologne-International-Pilot-Profile-Page,代码行数:31,代码来源:index.php

示例10: ProcessRegistration

 /**
  * Registration::ProcessRegistration()
  *
  * @return
  */
 protected function ProcessRegistration()
 {
     // Yes, there was an error
     if (!$this->VerifyData()) {
         $this->ShowForm();
         return;
     }
     $data = array('firstname' => $this->post->firstname, 'lastname' => $this->post->lastname, 'email' => $this->post->email, 'password' => $this->post->password1, 'code' => $this->post->code, 'location' => $this->post->location, 'hub' => $this->post->hub, 'confirm' => false);
     if (CodonEvent::Dispatch('registration_precomplete', 'Registration', $_POST) == false) {
         return false;
     }
     $ret = RegistrationData::CheckUserEmail($data['email']);
     if ($ret) {
         $this->set('error', Lang::gs('email.inuse'));
         $this->render('registration_error.tpl');
         return false;
     }
     $val = RegistrationData::AddUser($data);
     if ($val == false) {
         $this->set('error', RegistrationData::$error);
         $this->render('registration_error.tpl');
         return;
     } else {
         $pilotid = RegistrationData::$pilotid;
         /* Automatically confirm them if that option is set */
         if (Config::Get('PILOT_AUTO_CONFIRM') == true) {
             PilotData::AcceptPilot($pilotid);
             RanksData::CalculatePilotRanks();
             $pilot = PilotData::getPilotData($pilotid);
             $this->set('pilot', $pilot);
             $this->render('registration_autoconfirm.tpl');
         } else {
             /* Otherwise, wait until an admin confirms the registration */
             RegistrationData::SendEmailConfirm($email, $firstname, $lastname);
             $this->render('registration_sentconfirmation.tpl');
         }
     }
     CodonEvent::Dispatch('registration_complete', 'Registration', $_POST);
     // Registration email/show user is waiting for confirmation
     $sub = 'A user has registered';
     $message = "The user {$data['firstname']} {$data['lastname']} ({$data['email']}) has registered, and is awaiting confirmation.";
     $email = Config::Get('EMAIL_NEW_REGISTRATION');
     if (empty($email)) {
         $email = ADMIN_EMAIL;
     }
     Util::SendEmail($email, $sub, $message);
     // Send email to user
     $this->set('firstname', $data['firstname']);
     $this->set('lastname', $data['lastname']);
     $this->set('userinfo', $data);
     $message = Template::Get('email_registered.tpl', true);
     Util::SendEmail($data['email'], 'Registration at ' . SITE_NAME, $message);
     $rss = new RSSFeed('Latest Pilot Registrations', SITE_URL, 'The latest pilot registrations');
     $pilot_list = PilotData::GetLatestPilots();
     foreach ($pilot_list as $pilot) {
         $rss->AddItem('Pilot ' . PilotData::GetPilotCode($pilot->code, $pilot->pilotid) . ' (' . $pilot->firstname . ' ' . $pilot->lastname . ')', SITE_URL . '/admin/index.php?admin=pendingpilots', '', '');
     }
     $rss->BuildFeed(LIB_PATH . '/rss/latestpilots.rss');
 }
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:64,代码来源:Registration.php

示例11: badge

 /**
  * Profile::badge()
  *
  * @return
  */
 public function badge()
 {
     $this->set('badge_url', fileurl(SIGNATURE_PATH . '/' . PilotData::GetPilotCode(Auth::$pilot->code, Auth::$pilot->pilotid) . '.png'));
     $this->set('pilotcode', PilotData::getPilotCode(Auth::$pilot->code, Auth::$pilot->pilotid));
     $this->render('profile_badge.tpl');
 }
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:11,代码来源:Profile.php

示例12: ID

<?php

if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) {
    die;
}
?>
<h3>Registration Confirmation</h3>
<p>Thanks for joining us! Your registration has been completed! You can login using your pilot ID (<?php 
echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid);
?>
), and the password you used during registration.</p>
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:11,代码来源:registration_autoconfirm.php

示例13: FilePIREPForm

 protected function FilePIREPForm($bidid = '')
 {
     if (!Auth::LoggedIn()) {
         $this->set('message', 'You must be logged in to access this feature!');
         $this->render('core_error.tpl');
         return;
     }
     $this->set('pilot', Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname);
     $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
     $this->set('pirepfields', PIREPData::GetAllFields());
     if ($bidid != '') {
         $this->set('bid', SchedulesData::GetBid($bidid));
         // get the bid info
     }
     $this->set('allairports', OperationsData::GetAllAirports());
     $this->set('allairlines', OperationsData::GetAllAirlines(true));
     $this->set('allaircraft', OperationsData::GetAllAircraft(true));
     $this->render('pirep_new.tpl');
 }
开发者ID:rallin,项目名称:phpVMS,代码行数:19,代码来源:PIREPS.php

示例14: write_template

 protected function write_template($name, $save_as)
 {
     $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
     $this->set('userinfo', Auth::$userinfo);
     $acars_config = Template::GetTemplate($name, true);
     $acars_config = str_replace("\n", "\r\n", $acars_config);
     Util::downloadFile($acars_config, $save_as);
     return;
     # Set the headers so the browser things a file is being sent
     header('Content-Type: text/plain');
     header('Content-Disposition: attachment; filename="' . $save_as . '"');
     header('Content-Length: ' . strlen($acars_config));
     echo $acars_config;
 }
开发者ID:ryanunderwood,项目名称:phpVMS,代码行数:14,代码来源:FSFK.php

示例15: foreach

<?php

if (!defined('IN_PHPVMS') && IN_PHPVMS !== true) {
    die;
}
foreach ($pilot_list as $pilot) {
    ?>
    <p>
        <a href="<?php 
    echo url('/profile/view/' . $pilot->pilotid);
    ?>
">
            <?php 
    echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid) . ' ' . $pilot->firstname . ' ' . $pilot->lastname;
    ?>
        </a>
    </p>
<?php 
}
开发者ID:phpmods,项目名称:phpvms_5.5.x,代码行数:19,代码来源:frontpage_recentpilots.php


注:本文中的PilotData::GetPilotCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。