-
Notifications
You must be signed in to change notification settings - Fork 1
/
SampleSelector.php
executable file
·102 lines (82 loc) · 1.93 KB
/
SampleSelector.php
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<html>
<head>
<style>
body{
font-family:verdana;
}
.result{
font-family:courier;
color:green;
}
</style>
</head>
<body>
<h3>VWS Samples in PHP using HTTP_Request2</h3>
<br />
<br />
<br />
<?php
require_once 'GetTarget.php';
require_once 'UpdateTarget.php';
require_once 'DeleteTarget.php';
require_once 'PostNewTarget.php';
require_once 'GetAllTargets.php';
$instance = null;
if( isset( $_GET['select']) ){
$selection = $_GET['select'];
echo "<div> $selection RESULT :</div><br/>";
echo "<div class='result'>";
switch( $selection ){
case "GetTarget" :
$instance = new GetTarget();
break;
case "UpdateTarget" :
$instance = new UpdateTarget();
break;
case "DeleteTarget" :
$instance = new DeleteTarget();
break;
case "PostNewTarget" :
$instance = new PostNewTarget();
break;
case "GetAllTargets" :
$instance = new GetAllTargets();
break;
default :
echo "INVALID SELECTION";
break;
}
echo "</div>";
echo "<br /><div>~~~~~~~~~~~~~~~</div><br />";
}
?>
<div>Samples:</div>
<br />
<div>
<a href="SampleSelector.php?select=GetTarget"><b>GetTarget.php</b> queries a single target by target id.</a>
</div>
<br />
<div>
<a href="SampleSelector.php?select=GetAllTargets"><b>GetAllTargets.php</b> queries for all target ids in a Cloud Reco database.</a>
</div>
<br />
<div>
<a href="SampleSelector.php?select=UpdateTarget"><b>UpdateTarget.php</b> updates the metadata for a target.</a>
</div>
<br />
<div>
<a href="SampleSelector.php?select=DeleteTarget"><b>DeleteTarget.php</b> deletes a target from its Cloud Database.</a>
</div>
<br />
<div>
<a href="SampleSelector.php?select=PostNewTarget"><b>PostNewTarget.php</b> uploads a new target to a Cloud Database.</a>
</div>
<br />
<br />
<br />
<br />
<div>
<a href="CheckPHPEnvironment.php">Review your PHP installation.</a>
</div>
</body>
</html>