aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.php8
-rw-r--r--dbinit.sql2
-rw-r--r--manageorders.php2
-rw-r--r--order.php2
4 files changed, 7 insertions, 7 deletions
diff --git a/client.php b/client.php
index 43dd78b..dbab9e8 100644
--- a/client.php
+++ b/client.php
@@ -14,7 +14,7 @@ $type = $_SESSION["type"];
require_once "config.php";
// Get orders
-$sql = "SELECT id, service, name, billing, comments FROM orders WHERE client = ?";
+$sql = "SELECT id, service, name, billing, comments, status FROM orders WHERE client = ?";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_bind_param($stmt, "s", $param_client);
$param_client = $clientid;
@@ -59,12 +59,12 @@ function getservicebyid($id) {
<h3><?php echo strtoupper($type[0]).substr($type, 1); ?> panel</h3>
<div class="row">
<div class="col5">
- <h3>Active services</h3>
+ <h3>Orders</h3>
<table>
- <tr><th>service</th><th>instance</th><th>billing</th><th>comments</th></tr>
+ <tr><th>service</th><th>instance</th><th>billing</th><th>comments</th><th>status</th></tr>
<?php
foreach ($orders as $order) {
- echo "<tr><td>".getservicebyid($order["service"])["name"]."</td><td>".$order["name"]."</td><td>".$order["billing"]."</td><td><pre>".$order["comments"]."</pre></td></tr>\n";
+ echo "<tr><td>".getservicebyid($order["service"])["name"]."</td><td>".$order["name"]."</td><td>".$order["billing"]."</td><td><pre>".$order["comments"]."</pre></td><td>".$order["status"]."</tr>\n";
}
?>
</table>
diff --git a/dbinit.sql b/dbinit.sql
index 506729a..b505dbc 100644
--- a/dbinit.sql
+++ b/dbinit.sql
@@ -28,7 +28,7 @@ CREATE TABLE `arfnet2`.`orders` (
`client` INT NOT NULL ,
`billing` VARCHAR(255) NOT NULL ,
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
- `status` ENUM('active','inactive') NOT NULL ,
+ `status` ENUM('setting up','active','inactive') NOT NULL ,
`comments` TEXT NOT NULL ,
PRIMARY KEY (`id`)
);
diff --git a/manageorders.php b/manageorders.php
index 9452509..49c2e63 100644
--- a/manageorders.php
+++ b/manageorders.php
@@ -143,7 +143,7 @@ function getclientbyid($id) {
echo "<div class=\"form\"><h3>Edit order ".$order["id"]."</h3><form action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"post\">\n"
."<label>Name</label><br><input type=\"text\" name=\"name\" value=\"".$order["name"]."\"><br>\n"
."<label>Billing</label><br><input type=\"text\" name=\"billing\" value=\"".$order["billing"]."\"><br>\n"
- ."<label>Status</label><br><select name=\"status\"><option value=\"active\" ".($service["status"] == "active" ? "selected" : "").">active</option><option value=\"inactive\" ".($service["status"] == "inactive" ? "selected" : "").">inactive</option></select><br>\n"
+ ."<label>Status</label><br><select name=\"status\"><option value=\"setting up\" ".($service["status"] == "setting up" ? "selected" : "").">setting up</option><option value=\"active\" ".($service["status"] == "active" ? "selected" : "").">active</option><option value=\"inactive\" ".($service["status"] == "inactive" ? "selected" : "").">inactive</option></select><br>\n"
."<label>Comments</label><br><textarea name=\"comments\" rows=\"10\" cols=\"80\">".$order["comments"]."</textarea><br>\n"
."<input type=\"hidden\" name=\"id\" value=\"".$order["id"]."\">"
."<br><input type=\"submit\" name=\"save\" value=\"Save\"><a href=\"".$_SERVER['SCRIPT_NAME']."\">cancel</a>"
diff --git a/order.php b/order.php
index 12984ff..5e5675a 100644
--- a/order.php
+++ b/order.php
@@ -168,7 +168,7 @@ function genoption($id, $name) {
<input type=text name="name"><br>
<div id="commentcontainer">
<br><label>Comments (describe use case and requirements)</label><br>
- <textarea id="commentbox" rows="10" cols="80" onchange="updatecomment()"></textarea><br>
+ <textarea id="commentbox" rows="10" cols="80" onchange="update()"></textarea><br>
</div>
<input type="hidden" name="billing" id="billing">
<input type="hidden" name="comments" id="comments">