예제 #1
0
    echo fixFieldForTextArea(" - " . $locs->f_location);
    echo "</OPTION>\n";
}
?>
</SELECT>

<?php 
//-----------------------------------------------
//bike Dropdown
echo "<SELECT NAME=\"bikeID\">\n";
echo "<OPTION VALUE='0' ";
if ($currentQuery->bikeID <= 0) {
    echo "SELECTED";
}
echo ">All Bikes</OPTION>\n";
$bikes = new RDbike(DBconnect());
$results = $bikes->queryAll();
while ($bikes->parseNextRow($results)) {
    echo "<OPTION VALUE='{$bikes->f_bikeID}' ";
    if ($currentQuery->bikeID == $bikes->f_bikeID) {
        echo "SELECTED";
    }
    echo ">";
    echo fixFieldForTextArea($bikes->f_bike);
    echo "</OPTION>\n";
}
echo "</SELECT>\n";
?>

<INPUT TYPE="SUBMIT" VALUE="Go">
&nbsp;&nbsp;&nbsp;<A HREF="edit/editRide.php<?php 
예제 #2
0
 $ride->f_locationID = (int) $HTTP_POST_VARS["location"];
 $ride->f_temperature = (double) $HTTP_POST_VARS["temperature"];
 $ride->f_wind = unFixQuotes($HTTP_POST_VARS["wind"]);
 $ride->f_sky = unFixQuotes($HTTP_POST_VARS["sky"]);
 $ride->f_effortLevel = unFixQuotes($HTTP_POST_VARS["effort"]);
 $ride->f_bikeID = (int) $HTTP_POST_VARS["bike"];
 $ride->f_notes = unFixQuotes($HTTP_POST_VARS["notes"]);
 //Check for password
 $fixedPassword = unFixQuotes($HTTP_POST_VARS["password"]);
 $riderTest = new RDrider(DBConnect(), $units);
 if (!$riderTest->checkPerms($ride->f_riderID, $fixedPassword)) {
     $errMsg = "Invalid Password";
 }
 if (!$errMsg && $HTTP_POST_VARS["bike"] == 0) {
     //New Bike, create it
     $newBike = new RDbike(DBConnect());
     $newBike->f_bike = unFixQuotes($HTTP_POST_VARS["newBike"]);
     $newBike->f_computerSetting = (int) $HTTP_POST_VARS["computerSetting"];
     $newBike->f_riderID = $ride->f_riderID;
     $errMsg = $newBike->insertNew();
     $ride->f_bikeID = $newBike->f_bikeID;
 }
 if (!$errMsg && $HTTP_POST_VARS["location"] == 0) {
     $newLocation = new RDlocation(DBConnect());
     $newLocation->f_location = unFixQuotes($HTTP_POST_VARS["newLocation"]);
     $newLocation->f_description = unFixQuotes($HTTP_POST_VARS["newDescription"]);
     $newLocation->f_type = unFixQuotes($HTTP_POST_VARS["newLocationType"]);
     $errMsg = $newLocation->insertNew();
     $ride->f_locationID = $newLocation->f_locationID;
 }
 if (!$errMsg) {