Spiffs up contact_and_edit, adding error correction and required waiver.

1). Next step will be an opt-in/out to mailman.
2). Originally this program was using google lists, but there are too many steps for users involved.
This commit is contained in:
Jonathan Rosenbaum
2015-02-11 01:55:38 +00:00
parent 8f8e1623df
commit 7b64d0c494
12 changed files with 268 additions and 126 deletions
+13 -2
View File
@@ -97,17 +97,28 @@ $change_fund = CHANGE_FUND;
if ($result['history'] == "") {
echo "First Transaction";
} else {
echo $result['history'];
// Description may have newlines
$history_result = str_replace("\n", "\\n",$result['history']);
echo $history_result;
}
}
// Transaction history - update transaction history
// Note: This could easily be turned into its own table with a foreign key
// referencing transaction_log.transaction_id, but most transactions
// will probably only occur 1 time, and there probably isn't that much
// need to do many things with this data other than rollback a transaction, or
// research what happened on a particular shop day.
if(isset($_POST['history_update'])) {
$json = json_encode($_POST['history']);
$query = "UPDATE transaction_log SET history='$json'" .
' WHERE transaction_id="' . $_POST['transaction_id'] . '";';
$result = mysql_query($query, $YBDB) or die(mysql_error());
//echo ;
// show history
if(isset($_POST['more_than_one'])) {
list_history($_POST['history']);
}
}
// Check for most recent transaction_id if transaction_id has changed