PHP File Manager
Editing File: Logs.php
<?php /* * Copyright (C) Wayne Purton-Smith - All Rights Reserved * Unauthorized copying of this file or removing this paragraph, via any medium is strictly prohibited * Proprietary and confidential * Written by Wayne Purton-Smith <waynepurtonsmith@hotmail.co.uk> February 2014 */ class Logs extends CI_Model { public function get() { } public function add($data = array()) { if(isset($data['log']) && ($message_log = trim($data['log']))) { $log_data = array ( 'user_id' => $this->users->user_id, 'order_id' => (isset($data['order_id']) && ($order_id = (int) $data['order_id']) > 0) ? $order_id : NULL, 'date' => time(), 'message' => $message_log ); $this->db->query($this->db->insert_string('system_logs', $log_data)); } } }
Cancel