/* Check to make sure we are connected to the database before
allowing access to the home page. If not connected, go connect
and initialize; otherwise, welcome the user.\
*/
if(!database.connected())
redirect("init.htm");
project.lock();
if (client.action == "insert") {
database.execute("insert into transaction (ssn, done, date_done) values (" + client.ssn + ", '" + request.done + "', '" + request.date_done + "')");
} else {
database.execute("update transaction set done = '" + request.done + "', date_done = '" + request.date_done + "' where ssn = " + client.ssn + "");
}
database.execute("update status set cs7 = 'yes' where employee_ssn = " + client.ssn + "");
project.unlock();
redirect("areas.htm");