-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec-sequence.json
More file actions
45 lines (34 loc) · 1.04 KB
/
Copy pathexec-sequence.json
File metadata and controls
45 lines (34 loc) · 1.04 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
<?php
require("sub/head.php");
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$seq_id = 0;
if (isset($_POST['seq_id']))
$seq_id = $_POST['seq_id'];
if (! $seq_id) {
pclog("seq value not set");
jsonResponse();
}
$select_seq = $mysqli->prepare(
"select idx, target_type, target_num, command_name, value
from sequence_commands
where sequence_id = ?
order by idx");
if (! $select_seq) {
pclog("prepare select_seq error: {$mysqli->error}");
jsonResponse();
}
$select_seq->bind_param('i', $seq_id);
if (! $select_seq->execute()) {
pclog("execute select_seq error: {$mysqli->error}");
jsonResponse();
}
$select_seq->bind_result($idx, $tt, $tn, $cn, $val);
$select_seq->store_result();
pclog("exec-sequence: executing sequence $seq");
$resp['pcontrols'] = array();
while ($select_seq->fetch()) {
setPControl($tt, $tn, "", $cn, $val);
}
$resp['status'] = 1;
jsonResponse();
}