-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomsim.php
More file actions
94 lines (92 loc) · 2.83 KB
/
comsim.php
File metadata and controls
94 lines (92 loc) · 2.83 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<?php
/*------------------------------------------------------------------------*
* © 2010 University of Limerick. All rights reserved. This material may *
* not be reproduced, displayed, modified or distributed without the *
* express prior written permission of the copyright holder. *
*------------------------------------------------------------------------*/
require_once('./conf.php');
?>
<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>locConnect <?php print BASE_VER;?> - Component Simulator</title>
</head><body>
<h2>locConnect <?php print BASE_VER;?> - Component Simulator</h2>
<br>
<form target="_self" enctype="multipart/form-data" method="post" action="simulate.php" name="simul">
<table style="text-align: left; width: 100px;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td></td>
<td>Component</td>
<td>
<select name="com"> <?php
foreach ($arr as $lkey => $lvalue)
{ if (isset($_GET["lastcom"]))
if ($_GET["lastcom"]==$lkey)
print "<option selected=\"selected\">\n".$lkey."\n</option>\n";
else
print "<option>\n".$lkey."\n</option>\n";
else
print "<option>\n".$lkey."\n</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td></td>
<td>Project ID</td>
<td>
<select name="job"><?php $db = new PDO('sqlite:'.BASE_DB_URL.'locTemp.sqlite');
$res = $db->query('Select PName, ID from Project where FinishDate is null Order by CreateDate Desc');
foreach($res as $row)
{
if (isset($_GET["lastid"]))
if ($_GET["lastid"]==$row['ID'])
print "<option value='".$row['ID']."' selected='selected'>".$row['ID']." - ".$row['PName']."</option>";
else
print "<option value='".$row['ID']."'>".$row['ID']." - ".$row['PName']."</option>";
else
print "<option value='".$row['ID']."'>".$row['ID']." - ".$row['PName']."</option>";
}
$db=NULL;
;?></select>
</td>
</tr>
<tr>
<td><input name="api" value="status" type="radio"></td>
<td>Set Status</td>
<td>
<select name="status"><option>processing</option><option>complete</option><option>pending</option></select>
</td>
</tr>
<tr>
<td><input name="api" value="feedback" type="radio"></td>
<td>Send Feedback</td>
<td><input maxlength="250" size="40" name="feedback"></td>
</tr>
<tr>
<td><input name="api" value="output" type="radio"></td>
<td>Send Output</td>
<td><input name="output" type="file"></td>
</tr>
<tr>
<td><input name="api" value="fetch" type="radio"></td>
<td>Fetch Job</td>
<td></td>
</tr>
<tr><td><input name="api" value="get" type="radio"></td><td>Get Job</td><td></td></tr><tr>
<tr>
<td><input name="api" value="directjob" type="radio"></td>
<td>Create job</td>
<td><input name="datafile" type="file"></td>
</tr>
<td></td>
<td></td>
<td><input type="submit"><input type="reset"></td>
</tr>
</tbody>
</table>
<br>
</form>
</body></html>