Page MenuHomePhabricator

provisioning.phtml
No OneTemporary

provisioning.phtml

<?
/*
Copyright (c) 2007 AG Projects
http://ag-projects.com
Author Adrian Georgescu
This page provides the functions for managing SIP accounts,
ENUM ranges, ENUM numbers, Trusted Peers, LCR, Rating plans
on a remote NGN-Pro server
*/
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache");
include("./global.inc");
page_open(
array("sess" => "CDRTool_Session",
"auth" => "CDRTool_Auth",
"perm" => "CDRTool_Perm"));
$title="SIP and ENUM provisioning";
if (is_readable("local/header.phtml")) {
include("local/header.phtml");
} else {
include("header.phtml");
}
set_time_limit(600);
$perm->check("provisioning");
$layout = new pageLayoutLocal();
$layout->showTopMenu($title);
global $CDRTool;
$loginCredentials=array();
if ($CDRTool['impersonate']) {
if (preg_match("/^([1-9][0-9]*)\.([1-9][0-9]*)$/",$CDRTool['impersonate'],$m)) {
$_customer=$m[1];
$_reseller=$m[2];
$loginCredentials=array(
'customer' => $_customer,
'reseller' => $_reseller,
'loginType' => 'admin'
);
} else if (preg_match("/^(\[1-9][0-9]*)$/",$CDRTool['impersonate'],$m)) {
$_customer=$m[1];
$loginCredentials=array(
'customer' => $_customer,
'reseller' => $_customer,
'loginType' => 'admin'
);
} else if ($CDRTool['impersonate'] == '0' || $CDRTool['impersonate'] = '0.0') {
$loginCredentials=array(
'loginType' => 'admin'
);
} else {
page_close();
printf ("Error: Invalid impersonate value %s",$CDRTool['impersonate']);
exit;
}
} else {
page_close();
printf ("Please define impersonate field for login account <b>%s</b>",$auth->auth["uname"]);
exit;
}
require_once("provisioning/ngnpro_soap_library.phtml");
require_once("provisioning/ngnpro_client_lib.phtml");
require("provisioning/ngnpro_engines.inc");
if ($resellerFilters[$loginCredentials['reseller']]) {
$loginCredentials['soapFilter'] = $resellerFilters[$loginCredentials['reseller']]['soapFilter'];
$loginCredentials['recordGenerator'] = $resellerFilters[$loginCredentials['reseller']]['recordGenerator'];
} else if ($resellerFilters['default']) {
$loginCredentials['soapFilter'] = $resellerFilters['default']['soapFilter'];
$loginCredentials['recordGenerator'] = $resellerFilters['default']['recordGenerator'];
}
$loginCredentials['resellerFilters'] = $resellerFilters;
if ($_REQUEST['generatorId']) {
$generator = new recordGenerator($_REQUEST['generatorId'],$recordGenerators,$soapEngines,$loginCredentials);
if ($_REQUEST['action']=='Generate') {
$generator->generateRecords();
$generator->showGeneratorForm();
} else {
$generator->showGeneratorForm();
}
} else {
$SOAPEngine = new SOAPEngine($_REQUEST['service'],$soapEngines,$loginCredentials);
$_class = $SOAPEngine->recordsClass;
$RECORDS = new $_class(&$SOAPEngine);
if ($_REQUEST['action']=='Add') $RECORDS->addRecord();
if ($_REQUEST['action']=='Copy') $RECORDS->copyRecord();
if ($_REQUEST['action']=='Delete') $RECORDS->deleteRecord();
if ($_REQUEST['action']=='Update') $RECORDS->updateRecord();
if ($_REQUEST['action']=='PerformActions') {
$RECORDS->performActions();
} else {
$RECORDS->listRecords();
}
}
$layout->showFooter();
print "
</body>
</html>
";
page_close();
?>

File Metadata

Mime Type
text/x-php
Expires
Sat, Nov 23, 2:19 PM (23 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3409268
Default Alt Text
provisioning.phtml (3 KB)

Event Timeline