コード例 #1
0
ファイル: display_pax.php プロジェクト: nugget/lolsite
    <th colspan="2">Hours</th>
    <th>Flights</th>
    <th>Segs</th>
    <th colspan="2">Hours</th>
   </tr>
<?php 
$class = '';
foreach (pax_search("") as $alias) {
    if ($class != "odd") {
        $class = "odd";
    } else {
        $class = "even";
    }
    $status = pax_status($alias, $rvar_pilot, "");
    $line = pax_detail($alias, $rvar_pilot, "");
    $year = pax_detail($alias, $rvar_pilot, "date >= '{$thisyear}-01-01' and date <= '{$thisyear}-12-31'");
    $detaillink = "detail_pax.php?alias={$alias}&pilot={$rvar_pilot}";
    $features = "&nbsp;";
    if ($line['image_url']) {
        $features = "<img src=\"images/image.gif\" height=\"15\" width=\"64\"/>";
    }
    $name = $alias;
    if ($line['fullname']) {
        $name = $line['fullname'] . " (" . $alias . ")";
    }
    if (strpos($line['detail'], "\n")) {
        $line['detail'] = substr($line['detail'], 0, strpos($line['detail'], "\n"));
    }
    if (strlen($line['detail']) > 60) {
        $line['detail'] = substr($line['detail'], 0, 60) . "...";
    }
コード例 #2
0
ファイル: edit_pax.php プロジェクト: nugget/lolsite
} else {
    if ($rvar_id == 0) {
        if (!isset($rvar_pilot)) {
            $error_title = "No pilot specified";
            $error_text = "You must specify a pilot in order to add a new passenger entry.";
        }
        $title = "passenger: Add";
        $alias = $rvar_alias;
    } else {
        $key = pax_key($rvar_id);
        if (isset($key['pilot_id'])) {
            $rvar_pilot = $key['pilot_id'];
            $alias = $key['alias'];
        }
    }
    $line = pax_detail($alias, $rvar_pilot, "");
}
if (!is_mine()) {
    $error_title = "Up To No Good";
    $error_text = "I can't edit an entry if you don't own it!";
    unset($rvar_fullname);
}
if (isset($rvar_fullname)) {
    # I see data, we need to insert/update as required.
    if ($rvar_id == 0) {
        # new logbook entry
        $sql = "INSERT INTO passengers\n            (alias, pilot_id, is_pilot, fullname,\n            image_url, link_url, detail) VALUES " . "('{$alias}', {$rvar_pilot}, 0, '{$rvar_fullname}', " . "'{$rvar_image_url}','{$rvar_link_url}','{$rvar_detail}')";
    } else {
        # editing an old entry
        $sql = "UPDATE passengers SET " . "fullname='{$rvar_fullname}', " . "image_url='{$rvar_image_url}', link_url='{$rvar_link_url}', detail='{$rvar_detail}' where id = {$rvar_id}";
    }
コード例 #3
0
ファイル: detail_pax.php プロジェクト: nugget/lolsite
    print $yeartotals['segments'];
    ?>
</td>
       <td class="integer"><?php 
    print $yeartotals['landings'];
    ?>
</td>
       <?php 
    split_decimal($yeartotals['total_hours']);
    ?>
       <td width="100%">&nbsp;</td>
      </tr>

   <?php 
}
$yeartotals = pax_detail($alias, $rvar_pilot, '');
?>
     <tr>
      <td><strong>Total</strong></td>
      <td class="integer"><?php 
print $yeartotals['flights'];
?>
</td>
      <td class="integer"><?php 
print $yeartotals['segments'];
?>
</td>
      <td class="integer"><?php 
print $yeartotals['landings'];
?>
</td>