This repository was archived by the owner on Jul 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset.php
More file actions
51 lines (47 loc) · 1.19 KB
/
reset.php
File metadata and controls
51 lines (47 loc) · 1.19 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=MacRoman">
<meta http-equiv="refresh" content="1;url=batch_complete.php" />
<title>Reset PropID</title>
</head>
<body>
<?php
include_once("library/functions.php");
$propid = null;
//Parse Inputs
for($i=0; $i < $c; $i++)
{
if($keys[$i] == 'subj'){
$targ = $_GET['subj'];
$targ = trim($targ);
$propid = $targ;
$targ = NULL;
}
}
if($propid == "ALL")
$query="UPDATE BATCH_PROP SET completed='false'";
else
$query="UPDATE BATCH_PROP SET completed='false' WHERE prop='".$propid."'";
$result=doSqlQuery($query);
if($result == TRUE){
//$query="INSERT INTO BATCH_PROP (prop) VALUES ('".$propid."')";
//$result=executeQuery($query);
//if($result == TRUE)
echo "$propid reset";
//else
// echo "Error re-inserting $propid";
}
else
echo "Error resetting $propid";
//Execute the batch pdf
if($production==false)
$phpCmd = "/Applications/MAMP/bin/php/php5.2.17/bin/php ";
else
$phpCmd = "php-cli ";
$filename = "./cli/batch_pdf.php";
$output = shell_exec("$phpCmd $filename >error_log 2>&1 &");
?>
<br>
<br><br><A HREF="batch_complete.php">Back</A>
</html>