Qoob Portfolio

The open qoob is a php mvc framework created to speed up the process of creating dynamic sites. This is the code running this website!

Qoob Portfolio

qoob/app/model/stats_model.php


<?php
/**
 * stats model
 * save statistic data about a request
 *
 * @author 		xero harrison / http://xero.nu
 * @copyright 	creative commons attribution-shareAlike 3.0 Unported
 * @license 	http://creativecommons.org/licenses/by-sa/3.0/ 
 * @version 	1.0.0
 * @package		app
 * @subpackage	model
 */
namespace app\model;
class stats_model extends portfolio_model {
	/**
	 * save
	 * insert statistic info
	 *
	 * @param array $info
	 */
	public function save($info) {
		$this->query(
			"INSERT INTO `stats` (`auto_id`, `time`, `domain`, `uri`, `url_checksum`, `verb`, `ajax`, `status`, `referer`, `referer_domain`, `referer_checksum`, `browser`, `version`, `platform`, `type`, `useragent`, `ipaddress`, `hostname`, `location`) VALUES (NULL, :time, ':domain', ':uri', :url_checksum, ':verb', :ajax, :status, ':referer', ':ref_domain', :ref_checksum, ':browser', ':version', ':platform', ':type', ':useragent', ':ipaddress', ':hostname', ':location');",
			$info,
			false
		);
	}
}
?>

Download

raw zip tar