First public release of MyAAC

This commit is contained in:
slawkens1
2017-05-01 20:02:45 +02:00
parent 31172b4883
commit b5362d0654
2016 changed files with 114481 additions and 0 deletions

45
system/libs/data.php Normal file
View File

@@ -0,0 +1,45 @@
<?php
/**
* Data class
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.0.1
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
class Data
{
private $table = '';
public function __construct($table) {
$this->table = $table;
}
public function get($where)
{
global $db;
return $db->select($this->table, $where);
}
public function add($data)
{
global $db;
return $db->insert($this->table, $data);
}
public function delete($data, $where)
{
global $db;
return $db->delete($this->table, $data, $where);
}
public function update($data, $where)
{
global $db;
return $db->update($this->table, $data, $where);
}
}
?>