Ejemplo n.º 1
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}";
    }
    $sql_response = lol_query($sql);
    $target = "detail_pax.php?alias={$alias}&pilot={$rvar_pilot}";
Ejemplo n.º 2
0
        print "[<a href=\"edit_cert.php?id=" . $certlist[$i]['id'] . "&pilot={$rvar_username}&delcert=delcert\">Delete Cert</a>]";
        print "</td>";
    }
    ?>
    </tr>

   <?php 
}
?>

  </table>

 </div>

 <?php 
if (is_mine()) {
    ?>
   <div id="buttonbar">
    <form action="edit_cert.php">
     New Cert:
     <?php 
    print $buttons;
    ?>
     <input type="hidden" value="0" name="id">
     <input type="hidden" value="<?php 
    print $rvar_username;
    ?>
" name="pilot">
    </form>
   </div>
   <?php 
Ejemplo n.º 3
0
       <div id="buttonbar">
         <form action="edit_airports.php">
         <input type="hidden" value="<?php 
            print $rvar_pilot;
            ?>
" name="pilot">
         <input type="hidden" value="<?php 
            print $line['ident'];
            ?>
" name="ident">
         <input type="submit" value="Add Airport"></form>
       </div>
       <?php 
        }
    } else {
        if (is_mine() or is_admin()) {
            ?>
       <div id="buttonbar">
        <form action="edit_airports.php">
         <input type="hidden" value="<?php 
            print $rvar_pilot;
            ?>
" name="pilot">
         <input type="hidden" value="<?php 
            print $line['ident'];
            ?>
" name="ident">
         <input type="submit" value="Edit Airport"></form>
       </div>
       <?php 
        }
Ejemplo n.º 4
0
}
if (!isset($rvar_ident)) {
    $error_title = "No ident Specified";
    $error_text = "I can't continue if you don't tell me which airport!";
} else {
    if ($rvar_ident == '') {
        if (!isset($rvar_pilot)) {
            $error_title = "No pilot specified";
            $error_text = "You must specify a pilot in order to add a new airport entry.";
        }
        $title = "airport: Submit";
    }
    $ident = $rvar_ident;
    $line = airport_detail($ident);
}
if (isset($rvar_ident) and !is_mine() and !is_admin()) {
    $error_title = "Up To No Good";
    $error_text = "I can't edit an entry if you don't own it!";
    unset($rvar_submit);
}
if (isset($rvar_ident)) {
    $rvar_ident = strtoupper($rvar_ident);
    if (!isset($rvar_link_url)) {
        $rvar_link_url = "http://www.airnav.com/airport/" . $rvar_ident;
    }
}
if (isset($rvar_submit)) {
    # I see data, we need to insert/update as required.
    if (!isset($rvar_tower)) {
        $rvar_tower = 'false';
    } else {