shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

activity.php (540B)


      1 <?php
      2 class ModelAccountActivity extends Model {
      3 	public function addActivity($key, $data) {
      4 		if (isset($data['customer_id'])) {
      5 			$customer_id = $data['customer_id'];
      6 		} else {
      7 			$customer_id = 0;
      8 		}
      9 
     10 		$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()");
     11 	}
     12 }