diff options
Diffstat (limited to 'public/catalog/model/account/activity.php')
-rw-r--r-- | public/catalog/model/account/activity.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/public/catalog/model/account/activity.php b/public/catalog/model/account/activity.php new file mode 100644 index 0000000..438e7db --- /dev/null +++ b/public/catalog/model/account/activity.php @@ -0,0 +1,12 @@ +<?php +class ModelAccountActivity extends Model { + public function addActivity($key, $data) { + if (isset($data['customer_id'])) { + $customer_id = $data['customer_id']; + } else { + $customer_id = 0; + } + + $this->db->query("INSERT INTO `" . DB_PREFIX . "customer_activity` SET `customer_id` = '" . (int)$customer_id . "', `key` = '" . $this->db->escape($key) . "', `data` = '" . $this->db->escape(json_encode($data)) . "', `ip` = '" . $this->db->escape($this->request->server['REMOTE_ADDR']) . "', `date_added` = NOW()"); + } +}
\ No newline at end of file |