X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_ip_access.php;h=295b4e1a9c98ff8554b682e89a807f519d1168a0;hb=1176e53589634b8a25dbb8619cad2b926c2ad5e4;hp=2f171a4249e2edc1800edba0152d3671f7589c32;hpb=7773b67c07f1d94441e9f91cdbb4d091c3b30b98;p=Pman.Core diff --git a/DataObjects/Core_ip_access.php b/DataObjects/Core_ip_access.php index 2f171a42..295b4e1a 100644 --- a/DataObjects/Core_ip_access.php +++ b/DataObjects/Core_ip_access.php @@ -14,7 +14,10 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject public $status; public $authorized_by; public $authorized_key; - + public $email; + public $expire_dt; + public $user_agent; + /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE @@ -37,7 +40,29 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject return; } + require_once 'Net/XMPP.php'; + + $conn = new Net_XMPP('talk.google.com', 5222, $ff->Pman['XMPP']['username'], $ff->Pman['XMPP']['password'], 'xmpphp', 'gmail.com', $printlog=false, $loglevel=Net_XMPP_Log::LEVEL_VERBOSE); + + print_R($ff);exit; + try { + $conn->connect(); + $conn->processUntil('session_start'); + $conn->presence(); + $conn->message($ff->Pman['XMPP']['to'], " + New IP Login Required\n + test\n + http://www.roojs.com\n + {$url} + "); + $conn->disconnect(); + + } catch(XMPPHP_Exception $e) { + $ff->page->jerr($e->getMessage()); + } + + return; }