DataObjects/Core_ip_access.php
[Pman.Core] / DataObjects / Core_ip_access.php
1 <?php
2
3 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
4
5 class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject 
6 {
7     ###START_AUTOCODE
8     /* the code below is auto generated do not remove the above tag */
9
10     public $__table = 'core_ip_access';
11     public $id;
12     public $ip;
13     public $created_dt;
14     public $status;
15     public $authorized_by;
16     public $authorized_key;
17     
18     /* the code above is auto generated do not remove the tag below */
19     ###END_AUTOCODE
20     
21     function applyFilters($q, $au)
22     {
23         
24     }
25     
26     var $masterTemplate = 'xmpp_master.html';
27     
28     function sendXMPP()
29     {
30         $ff = HTML_FlexyFramework::get();
31         
32         if(
33                 empty($ff->Pman['ip_management']) || 
34                 empty($ff->Pman['XMPP']) ||
35                 empty($ff->Pman['XMPP']['username']) ||
36                 empty($ff->Pman['XMPP']['password']) ||
37                 empty($ff->Pman['XMPP']['to'])
38         ) {
39             return;
40         }
41         
42         $template_engine = new HTML_Template_Flexy();
43         $template_engine->compile($this->masterTemplate);
44         
45         $fn = $this->tempName('html');
46         
47         file_put_contents($fn, $template_engine->bufferedOutputObject($this, $this->elements));
48     }
49     
50     
51 }