コード例 #1
0
 /**
  * Expects a "get variables" type array with settings
  * for all the various things you can search on
  */
 function RDQuery($getVars)
 {
     $this->riderID = (int) $getVars["riderID"];
     $this->locationID = unFixQuotes($getVars["locID"]);
     $this->effort = $getVars["effort"];
     $this->bikeID = (int) $getVars["bikeID"];
     $this->beforeDate = unFixQuotes($getVars["beforeDate"]);
     $this->afterDate = unFixQuotes($getVars["afterDate"]);
 }
コード例 #2
0
        $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) {
        if ($newRide) {
            $errMsg = $ride->insertNew(unFixQuotes($HTTP_POST_VARS["password"]));
            if (!$errMsg) {
                $normMsg = "Ride Inserted";
                $rideID = $ride->f_rideID;
                $newRide = 0;
            }
        } else {
            $ride->f_rideID = $rideID;
            $errMsg = $ride->update($password);
            if (!$errMsg) {
                $normMsg = "Ride Updated";
            }
        }
    }
}
//Get the data from the db if we aren't doing a new
コード例 #3
0
along with Ride Dammit!; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
//Stupid PHP includes:
chdir("..");
require "RD/RDdbclasses.php";
$getVars = $HTTP_GET_VARS;
$rider = new RDrider(DBConnect(), $units);
//Check for form submit and handle it here
if ($HTTP_POST_VARS["submit"]) {
    //Fill in the info they submitted.
    $rider->f_firstName = unFixQuotes($HTTP_POST_VARS["firstName"]);
    $rider->f_lastName = unFixQuotes($HTTP_POST_VARS["lastName"]);
    $pword = unFixQuotes($HTTP_POST_VARS["password"]);
    $verify = unFixQuotes($HTTP_POST_VARS["verify"]);
    $code = unFixQuotes($HTTP_POST_VARS["code"]);
    //Check for code word
    if (md5($code) != $RD_authCodeMD5) {
        $errMsg = "Invalid Code!  No permission to create an account.";
    }
    //Check for password mismatch
    if (!$errMsg && $pword != $verify) {
        $errMsg = "Passwords do not match!  Please enter them again.";
    }
    if (!$errMsg) {
        $errMsg = $rider->insertNew($pword);
        if (!$errMsg) {
            //Inserted, send them back to the front!
            $getVars["riderID"] = $rider->f_riderID;
            header("Location: {$RD_baseURL}/showRides.php" . encodeGet($getVars));
            return;
コード例 #4
0
 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_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) {
     if ($newRide) {
         $errMsg = $ride->insertNew($fixedPassword);
         if (!$errMsg) {
             $getVars["rideID"] = $ride->f_rideID;
             header("Location: ../showRide.php" . encodeGet($getVars));
             return;
         }
     } else {
         $ride->f_rideID = $rideID;
         $errMsg = $ride->update($fixedPassword);
         if (!$errMsg) {