-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsaveBoulder.php
More file actions
30 lines (24 loc) · 803 Bytes
/
saveBoulder.php
File metadata and controls
30 lines (24 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: application/json');
include_once('config.php');
$id = $_GET['id'];
$name = $_GET['name'];
$description = $_GET['description'];
$wall = $_GET['wall'];
$user_id = $_GET['user_id'];
$isRemix = $_GET['isRemix'];
$step_grip = $_GET['step_grip']?$_GET['step_grip']:false;
$step_spax = $_GET['step_spax']?$_GET['step_spax']:true;
$newBoulder = new Boulder();
$newBoulder->Id = $id;
$newBoulder->Name = $name;
$newBoulder->Description = $description;
$newBoulder->WallId = $wall;
$newBoulder->UserId = $user_id;
$newBoulder->StepGrip = $step_grip == "true"?true:false;
$newBoulder->StepSpax = $step_spax == "true"?true:false;
$newBoulder->IsRemix = $isRemix == "true"?true:false;
$newBoulder->save();
echo $newBoulder->Id;
?>