90 |
$time_human = $year . "-" . $mon . "-" . $mday . " " . $hours . ":" . $minutes . ":" . $seconds; |
$time_human = $year . "-" . $mon . "-" . $mday . " " . $hours . ":" . $minutes . ":" . $seconds; |
91 |
|
|
92 |
// Build the SQL line to insert it into the database |
// Build the SQL line to insert it into the database |
93 |
$sql = "INSERT INTO session (staff_account, user_ip, session_id, time_human, time_unix, time_expire) VALUES ('" |
$sql = "INSERT INTO session (staff_account, user_ip, session_id, time_human, time_unix, time_expire) |
94 |
. $staff_account |
VALUES (?, ?, ?, ?, ?, ?)"; |
|
. "', '" |
|
|
. $user_ip |
|
|
. "', '" |
|
|
. $session_id |
|
|
. "', '" |
|
|
. $time_human |
|
|
. "', '" |
|
|
. $time_unix |
|
|
. "', '" |
|
|
. $time_expire |
|
|
. "')"; |
|
95 |
|
|
96 |
// xx_query ("LOCK TABLE session WRITE", $this->con_session); |
// xx_query ("LOCK TABLE session WRITE", $this->con_session); |
97 |
if (!xx_query($sql, $this->con_session)){ |
if (!xx_prepare_execute($sql, |
98 |
|
$staff_account, |
99 |
|
$user_ip, |
100 |
|
$session_id, |
101 |
|
$time_human, |
102 |
|
$time_unix, |
103 |
|
$time_expire)) { |
104 |
xx_query ("UNLOCK TABLES", $this->con_session); |
xx_query ("UNLOCK TABLES", $this->con_session); |
105 |
$this->bailout(); |
$this->bailout(); |
106 |
} |
} |