2012-06-25 13:04:51 +00:00
|
|
|
<?php
|
2012-07-08 16:11:25 +00:00
|
|
|
class CSRAtom extends Node implements CSR {
|
2012-06-25 13:04:51 +00:00
|
|
|
|
2012-07-02 16:56:13 +00:00
|
|
|
function CSRAtom($data,$parent) {
|
2012-06-25 13:04:51 +00:00
|
|
|
$this->id = $data['atom_id'];
|
2012-07-02 16:56:13 +00:00
|
|
|
$this->parent = $parent;
|
2012-06-25 13:04:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function grant($pid) {
|
|
|
|
$this->clear_all($pid); #empty database
|
|
|
|
}
|
|
|
|
|
|
|
|
function deny($pid) {
|
|
|
|
$this->clear_all($pid); #empty database
|
|
|
|
}
|
|
|
|
|
|
|
|
private function clear_all($pid) {
|
|
|
|
global $DBc;
|
|
|
|
$DBc->sqlQuery("DELETE FROM ach_player_atom WHERE apa_atom='".$this->getID()."' AND apa_player='".$pid."'");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|