protected function _rpc_login() { $u = c2Req::get('u'); $p = c2Req::get('p'); if (empty($u)) { throw new c2Ex('Empty user!'); } if (empty($p)) { throw new c2Ex('Empty password!'); } $c2 = __k_fetch('c2'); $se = new c2Sys($c2['sys.c']); $se->start(); try { return $se->login($u, $p); } catch (Exception $e) { $se->stop(false); throw $e; } }
<?php require_once "../php/h.php"; $uac = new c2UAC(); $uac->rpc(c2Req::get('c'));