Exemplo n.º 1
0
 public function pilotranks()
 {
     switch ($this->post->action) {
         case 'addrank':
             $this->add_rank_post();
             break;
         case 'editrank':
             $this->edit_rank_post();
             break;
         case 'deleterank':
             $ret = RanksData::DeleteRank($this->post->id);
             echo json_encode(array('status' => 'ok'));
             return;
             break;
     }
     $this->set('ranks', RanksData::GetAllRanks());
     $this->render('ranks_allranks.tpl');
 }
Exemplo n.º 2
0
    } else {
        $sel = '';
    }
    echo '<option value="' . $hub->icao . '" ' . $sel . '>' . $hub->icao . ' - ' . $hub->name . '</option>';
}
?>
	
		</select>
	</td>
</tr>
<tr>
	<td>Current Rank</td>
	<td>
	<?php 
if (Config::Get('RANKS_AUTOCALCULATE') == false) {
    $allranks = RanksData::GetAllRanks();
    echo '<select name="rank">';
    foreach ($allranks as $rank) {
        $selected = $pilotinfo->rank == $rank->rank ? "selected=\"selected\"" : '';
        echo "<option value=\"{$rank->rankid}\" {$selected}>{$rank->rank}</option>";
    }
    echo '</select>';
} else {
    echo $pilotinfo->rank;
}
?>
</td>
</tr>
<tr>
	<td>Date Joined</td>
	<td><?php