Fix customer logs:

- SQLSTATE[HY000]: General error: mode must be an integer
- customer_logger.php:78 Undefined variable $_actions
This commit is contained in:
Max Khon
2017-04-15 15:58:50 +07:00
parent cb2f094e3d
commit 872928fb38

View File

@@ -38,7 +38,8 @@ if ($page == 'log') {
Database::pexecute($result_stmt, array( Database::pexecute($result_stmt, array(
"loginname" => $userinfo['loginname'] "loginname" => $userinfo['loginname']
)); ));
$result_cnt_stmt = Database::query($query, array( $result_cnt_stmt = Database::prepare($query);
Database::pexecute($result_cnt_stmt, array(
"loginname" => $userinfo['loginname'] "loginname" => $userinfo['loginname']
)); ));
$res_cnt = $result_cnt_stmt->fetch(PDO::FETCH_ASSOC); $res_cnt = $result_cnt_stmt->fetch(PDO::FETCH_ASSOC);
@@ -69,6 +70,7 @@ if ($page == 'log') {
$log_count = 0; $log_count = 0;
$log = ''; $log = '';
foreach ($clog as $action => $logrows) { foreach ($clog as $action => $logrows) {
$_action = 0;
foreach ($logrows as $row) { foreach ($logrows as $row) {
// if ($paging->checkDisplay($i)) { // if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row); $row = htmlentities_array($row);