Viewing file: radacct_list.php (41.61 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//Include Common Files @1-71950580
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "radacct_list.php");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
//End Include Common Files
//Include Page implementation @97-3DD2EFDC
include_once(RelativePath . "/Header.php");
//End Include Page implementation
class clsRecordradacctSearch { //radacctSearch Class @2-AC4DDE8B
//Variables @2-F607D3A5
// Public variables
var $ComponentType = "Record";
var $ComponentName;
var $Parent;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $ErrorBlock;
var $FormSubmitted;
var $FormEnctype;
var $Visible;
var $Recordset;
var $CCSEvents = "";
var $CCSEventResult;
var $RelativePath = "";
var $InsertAllowed = false;
var $UpdateAllowed = false;
var $DeleteAllowed = false;
var $ReadAllowed = false;
var $EditMode = false;
var $ds;
var $DataSource;
var $ValidatingControls;
var $Controls;
// Class variables
//End Variables
//Class_Initialize Event @2-CB4A77B6
function clsRecordradacctSearch($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record radacctSearch/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "radacctSearch";
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->s_keyword = & new clsControl(ccsTextBox, "s_keyword", "s_keyword", ccsText, "", CCGetRequestParam("s_keyword", $Method), $this);
$this->Button_DoSearch = & new clsButton("Button_DoSearch", $Method, $this);
}
}
//End Class_Initialize Event
//Validate Method @2-A144A629
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->s_keyword->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->s_keyword->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @2-D6729123
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->s_keyword->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//Operation Method @2-41F27F1F
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
if(!$this->FormSubmitted) {
return;
}
if($this->FormSubmitted) {
$this->PressedButton = "Button_DoSearch";
if($this->Button_DoSearch->Pressed) {
$this->PressedButton = "Button_DoSearch";
}
}
$Redirect = "radacct_list.php";
if($this->Validate()) {
if($this->PressedButton == "Button_DoSearch") {
$Redirect = "radacct_list.php" . "?" . CCMergeQueryStrings(CCGetQueryString("Form", array("Button_DoSearch", "Button_DoSearch_x", "Button_DoSearch_y")));
if(!CCGetEvent($this->Button_DoSearch->CCSEvents, "OnClick", $this->Button_DoSearch)) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//Show Method @2-C0989453
function Show()
{
global $Tpl;
global $FileName;
global $CCSLocales;
$Error = "";
if(!$this->Visible)
return;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$RecordBlock = "Record " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $RecordBlock;
$this->EditMode = $this->EditMode && $this->ReadAllowed;
if (!$this->FormSubmitted) {
}
if($this->FormSubmitted || $this->CheckErrors()) {
$Error = "";
$Error = ComposeStrings($Error, $this->s_keyword->Errors->ToString());
$Error = ComposeStrings($Error, $this->Errors->ToString());
$Tpl->SetVar("Error", $Error);
$Tpl->Parse("Error", false);
}
$CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
$this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
$Tpl->SetVar("Action", $this->HTMLFormAction);
$Tpl->SetVar("HTMLFormName", $this->ComponentName);
$Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) {
$Tpl->block_path = $ParentPath;
return;
}
$this->s_keyword->Show();
$this->Button_DoSearch->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End radacctSearch Class @2-FCB6E20C
class clsGridradacct { //radacct class @5-EABCD0F8
//Variables @5-887F1D15
// Public variables
var $ComponentType = "Grid";
var $ComponentName;
var $Visible;
var $Errors;
var $ErrorBlock;
var $ds;
var $DataSource;
var $PageSize;
var $SorterName = "";
var $SorterDirection = "";
var $PageNumber;
var $CCSEvents = "";
var $CCSEventResult;
var $RelativePath = "";
// Grid Controls
var $StaticControls;
var $RowControls;
var $Sorter_RadAcctId;
var $Sorter_AcctSessionId;
var $Sorter_AcctUniqueId;
var $Sorter_UserName;
var $Sorter_Realm;
var $Sorter_NASIPAddress;
var $Sorter_NASPortId;
var $Sorter_NASPortType;
var $Sorter_AcctStartTime;
var $Sorter_AcctStopTime;
var $Sorter_AcctSessionTime;
var $Sorter_AcctAuthentic;
var $Sorter_ConnectInfo_start;
var $Sorter_ConnectInfo_stop;
var $Sorter_AcctInputOctets;
var $Sorter_AcctOutputOctets;
var $Sorter_CalledStationId;
var $Sorter_CallingStationId;
var $Sorter_AcctTerminateCause;
var $Sorter_ServiceType;
var $Sorter_FramedProtocol;
var $Sorter_FramedIPAddress;
var $Sorter_AcctStartDelay;
var $Sorter_AcctStopDelay;
//End Variables
//Class_Initialize Event @5-DC536D27
function clsGridradacct($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "radacct";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid radacct";
$this->DataSource = new clsradacctDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 20;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<br>Error: (CCS06) Invalid page size.</p>");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->SorterName = CCGetParam("radacctOrder", "");
$this->SorterDirection = CCGetParam("radacctDir", "");
$this->RadAcctId = & new clsControl(ccsLink, "RadAcctId", "RadAcctId", ccsInteger, "", CCGetRequestParam("RadAcctId", ccsGet), $this);
$this->RadAcctId->Page = "radacct_maint.php";
$this->AcctSessionId = & new clsControl(ccsLabel, "AcctSessionId", "AcctSessionId", ccsText, "", CCGetRequestParam("AcctSessionId", ccsGet), $this);
$this->AcctUniqueId = & new clsControl(ccsLabel, "AcctUniqueId", "AcctUniqueId", ccsText, "", CCGetRequestParam("AcctUniqueId", ccsGet), $this);
$this->UserName = & new clsControl(ccsLabel, "UserName", "UserName", ccsText, "", CCGetRequestParam("UserName", ccsGet), $this);
$this->Realm = & new clsControl(ccsLabel, "Realm", "Realm", ccsText, "", CCGetRequestParam("Realm", ccsGet), $this);
$this->NASIPAddress = & new clsControl(ccsLabel, "NASIPAddress", "NASIPAddress", ccsText, "", CCGetRequestParam("NASIPAddress", ccsGet), $this);
$this->NASPortId = & new clsControl(ccsLabel, "NASPortId", "NASPortId", ccsInteger, "", CCGetRequestParam("NASPortId", ccsGet), $this);
$this->NASPortType = & new clsControl(ccsLabel, "NASPortType", "NASPortType", ccsText, "", CCGetRequestParam("NASPortType", ccsGet), $this);
$this->AcctStartTime = & new clsControl(ccsLabel, "AcctStartTime", "AcctStartTime", ccsDate, $DefaultDateFormat, CCGetRequestParam("AcctStartTime", ccsGet), $this);
$this->AcctStopTime = & new clsControl(ccsLabel, "AcctStopTime", "AcctStopTime", ccsDate, $DefaultDateFormat, CCGetRequestParam("AcctStopTime", ccsGet), $this);
$this->AcctSessionTime = & new clsControl(ccsLabel, "AcctSessionTime", "AcctSessionTime", ccsInteger, "", CCGetRequestParam("AcctSessionTime", ccsGet), $this);
$this->AcctAuthentic = & new clsControl(ccsLabel, "AcctAuthentic", "AcctAuthentic", ccsText, "", CCGetRequestParam("AcctAuthentic", ccsGet), $this);
$this->ConnectInfo_start = & new clsControl(ccsLabel, "ConnectInfo_start", "ConnectInfo_start", ccsText, "", CCGetRequestParam("ConnectInfo_start", ccsGet), $this);
$this->ConnectInfo_stop = & new clsControl(ccsLabel, "ConnectInfo_stop", "ConnectInfo_stop", ccsText, "", CCGetRequestParam("ConnectInfo_stop", ccsGet), $this);
$this->AcctInputOctets = & new clsControl(ccsLabel, "AcctInputOctets", "AcctInputOctets", ccsInteger, "", CCGetRequestParam("AcctInputOctets", ccsGet), $this);
$this->AcctOutputOctets = & new clsControl(ccsLabel, "AcctOutputOctets", "AcctOutputOctets", ccsInteger, "", CCGetRequestParam("AcctOutputOctets", ccsGet), $this);
$this->CalledStationId = & new clsControl(ccsLabel, "CalledStationId", "CalledStationId", ccsText, "", CCGetRequestParam("CalledStationId", ccsGet), $this);
$this->CallingStationId = & new clsControl(ccsLabel, "CallingStationId", "CallingStationId", ccsText, "", CCGetRequestParam("CallingStationId", ccsGet), $this);
$this->AcctTerminateCause = & new clsControl(ccsLabel, "AcctTerminateCause", "AcctTerminateCause", ccsText, "", CCGetRequestParam("AcctTerminateCause", ccsGet), $this);
$this->ServiceType = & new clsControl(ccsLabel, "ServiceType", "ServiceType", ccsText, "", CCGetRequestParam("ServiceType", ccsGet), $this);
$this->FramedProtocol = & new clsControl(ccsLabel, "FramedProtocol", "FramedProtocol", ccsText, "", CCGetRequestParam("FramedProtocol", ccsGet), $this);
$this->FramedIPAddress = & new clsControl(ccsLabel, "FramedIPAddress", "FramedIPAddress", ccsText, "", CCGetRequestParam("FramedIPAddress", ccsGet), $this);
$this->AcctStartDelay = & new clsControl(ccsLabel, "AcctStartDelay", "AcctStartDelay", ccsInteger, "", CCGetRequestParam("AcctStartDelay", ccsGet), $this);
$this->AcctStopDelay = & new clsControl(ccsLabel, "AcctStopDelay", "AcctStopDelay", ccsInteger, "", CCGetRequestParam("AcctStopDelay", ccsGet), $this);
$this->Sorter_RadAcctId = & new clsSorter($this->ComponentName, "Sorter_RadAcctId", $FileName, $this);
$this->Sorter_AcctSessionId = & new clsSorter($this->ComponentName, "Sorter_AcctSessionId", $FileName, $this);
$this->Sorter_AcctUniqueId = & new clsSorter($this->ComponentName, "Sorter_AcctUniqueId", $FileName, $this);
$this->Sorter_UserName = & new clsSorter($this->ComponentName, "Sorter_UserName", $FileName, $this);
$this->Sorter_Realm = & new clsSorter($this->ComponentName, "Sorter_Realm", $FileName, $this);
$this->Sorter_NASIPAddress = & new clsSorter($this->ComponentName, "Sorter_NASIPAddress", $FileName, $this);
$this->Sorter_NASPortId = & new clsSorter($this->ComponentName, "Sorter_NASPortId", $FileName, $this);
$this->Sorter_NASPortType = & new clsSorter($this->ComponentName, "Sorter_NASPortType", $FileName, $this);
$this->Sorter_AcctStartTime = & new clsSorter($this->ComponentName, "Sorter_AcctStartTime", $FileName, $this);
$this->Sorter_AcctStopTime = & new clsSorter($this->ComponentName, "Sorter_AcctStopTime", $FileName, $this);
$this->Sorter_AcctSessionTime = & new clsSorter($this->ComponentName, "Sorter_AcctSessionTime", $FileName, $this);
$this->Sorter_AcctAuthentic = & new clsSorter($this->ComponentName, "Sorter_AcctAuthentic", $FileName, $this);
$this->Sorter_ConnectInfo_start = & new clsSorter($this->ComponentName, "Sorter_ConnectInfo_start", $FileName, $this);
$this->Sorter_ConnectInfo_stop = & new clsSorter($this->ComponentName, "Sorter_ConnectInfo_stop", $FileName, $this);
$this->Sorter_AcctInputOctets = & new clsSorter($this->ComponentName, "Sorter_AcctInputOctets", $FileName, $this);
$this->Sorter_AcctOutputOctets = & new clsSorter($this->ComponentName, "Sorter_AcctOutputOctets", $FileName, $this);
$this->Sorter_CalledStationId = & new clsSorter($this->ComponentName, "Sorter_CalledStationId", $FileName, $this);
$this->Sorter_CallingStationId = & new clsSorter($this->ComponentName, "Sorter_CallingStationId", $FileName, $this);
$this->Sorter_AcctTerminateCause = & new clsSorter($this->ComponentName, "Sorter_AcctTerminateCause", $FileName, $this);
$this->Sorter_ServiceType = & new clsSorter($this->ComponentName, "Sorter_ServiceType", $FileName, $this);
$this->Sorter_FramedProtocol = & new clsSorter($this->ComponentName, "Sorter_FramedProtocol", $FileName, $this);
$this->Sorter_FramedIPAddress = & new clsSorter($this->ComponentName, "Sorter_FramedIPAddress", $FileName, $this);
$this->Sorter_AcctStartDelay = & new clsSorter($this->ComponentName, "Sorter_AcctStartDelay", $FileName, $this);
$this->Sorter_AcctStopDelay = & new clsSorter($this->ComponentName, "Sorter_AcctStopDelay", $FileName, $this);
$this->radacct_Insert = & new clsControl(ccsLink, "radacct_Insert", "radacct_Insert", ccsText, "", CCGetRequestParam("radacct_Insert", ccsGet), $this);
$this->radacct_Insert->Parameters = CCGetQueryString("QueryString", array("RadAcctId", "ccsForm"));
$this->radacct_Insert->Page = "radacct_maint.php";
$this->Navigator = & new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpSimple, $this);
}
//End Class_Initialize Event
//Initialize Method @5-90E704C5
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = & $this->PageSize;
$this->DataSource->AbsolutePage = & $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//Show Method @5-F9B4FB11
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$ShownRecords = 0;
$this->DataSource->Parameters["urls_keyword"] = CCGetFromGet("s_keyword", "");
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) return;
$GridBlock = "Grid " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
if(($ShownRecords < $this->PageSize) && $this->DataSource->next_record())
{
do {
$this->DataSource->SetValues();
$Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
$this->RadAcctId->SetValue($this->DataSource->RadAcctId->GetValue());
$this->RadAcctId->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->RadAcctId->Parameters = CCAddParam($this->RadAcctId->Parameters, "RadAcctId", $this->DataSource->f("RadAcctId"));
$this->AcctSessionId->SetValue($this->DataSource->AcctSessionId->GetValue());
$this->AcctUniqueId->SetValue($this->DataSource->AcctUniqueId->GetValue());
$this->UserName->SetValue($this->DataSource->UserName->GetValue());
$this->Realm->SetValue($this->DataSource->Realm->GetValue());
$this->NASIPAddress->SetValue($this->DataSource->NASIPAddress->GetValue());
$this->NASPortId->SetValue($this->DataSource->NASPortId->GetValue());
$this->NASPortType->SetValue($this->DataSource->NASPortType->GetValue());
$this->AcctStartTime->SetValue($this->DataSource->AcctStartTime->GetValue());
$this->AcctStopTime->SetValue($this->DataSource->AcctStopTime->GetValue());
$this->AcctSessionTime->SetValue($this->DataSource->AcctSessionTime->GetValue());
$this->AcctAuthentic->SetValue($this->DataSource->AcctAuthentic->GetValue());
$this->ConnectInfo_start->SetValue($this->DataSource->ConnectInfo_start->GetValue());
$this->ConnectInfo_stop->SetValue($this->DataSource->ConnectInfo_stop->GetValue());
$this->AcctInputOctets->SetValue($this->DataSource->AcctInputOctets->GetValue());
$this->AcctOutputOctets->SetValue($this->DataSource->AcctOutputOctets->GetValue());
$this->CalledStationId->SetValue($this->DataSource->CalledStationId->GetValue());
$this->CallingStationId->SetValue($this->DataSource->CallingStationId->GetValue());
$this->AcctTerminateCause->SetValue($this->DataSource->AcctTerminateCause->GetValue());
$this->ServiceType->SetValue($this->DataSource->ServiceType->GetValue());
$this->FramedProtocol->SetValue($this->DataSource->FramedProtocol->GetValue());
$this->FramedIPAddress->SetValue($this->DataSource->FramedIPAddress->GetValue());
$this->AcctStartDelay->SetValue($this->DataSource->AcctStartDelay->GetValue());
$this->AcctStopDelay->SetValue($this->DataSource->AcctStopDelay->GetValue());
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->RadAcctId->Show();
$this->AcctSessionId->Show();
$this->AcctUniqueId->Show();
$this->UserName->Show();
$this->Realm->Show();
$this->NASIPAddress->Show();
$this->NASPortId->Show();
$this->NASPortType->Show();
$this->AcctStartTime->Show();
$this->AcctStopTime->Show();
$this->AcctSessionTime->Show();
$this->AcctAuthentic->Show();
$this->ConnectInfo_start->Show();
$this->ConnectInfo_stop->Show();
$this->AcctInputOctets->Show();
$this->AcctOutputOctets->Show();
$this->CalledStationId->Show();
$this->CallingStationId->Show();
$this->AcctTerminateCause->Show();
$this->ServiceType->Show();
$this->FramedProtocol->Show();
$this->FramedIPAddress->Show();
$this->AcctStartDelay->Show();
$this->AcctStopDelay->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
$ShownRecords++;
} while (($ShownRecords < $this->PageSize) && $this->DataSource->next_record());
}
else // Show NoRecords block if no records are found
{
$Tpl->parse("NoRecords", false);
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$this->Navigator->PageNumber = $this->DataSource->AbsolutePage;
if ($this->DataSource->RecordsCount == "CCS not counted")
$this->Navigator->TotalPages = $this->DataSource->AbsolutePage + ($this->DataSource->next_record() ? 1 : 0);
else
$this->Navigator->TotalPages = $this->DataSource->PageCount();
$this->Sorter_RadAcctId->Show();
$this->Sorter_AcctSessionId->Show();
$this->Sorter_AcctUniqueId->Show();
$this->Sorter_UserName->Show();
$this->Sorter_Realm->Show();
$this->Sorter_NASIPAddress->Show();
$this->Sorter_NASPortId->Show();
$this->Sorter_NASPortType->Show();
$this->Sorter_AcctStartTime->Show();
$this->Sorter_AcctStopTime->Show();
$this->Sorter_AcctSessionTime->Show();
$this->Sorter_AcctAuthentic->Show();
$this->Sorter_ConnectInfo_start->Show();
$this->Sorter_ConnectInfo_stop->Show();
$this->Sorter_AcctInputOctets->Show();
$this->Sorter_AcctOutputOctets->Show();
$this->Sorter_CalledStationId->Show();
$this->Sorter_CallingStationId->Show();
$this->Sorter_AcctTerminateCause->Show();
$this->Sorter_ServiceType->Show();
$this->Sorter_FramedProtocol->Show();
$this->Sorter_FramedIPAddress->Show();
$this->Sorter_AcctStartDelay->Show();
$this->Sorter_AcctStopDelay->Show();
$this->radacct_Insert->Show();
$this->Navigator->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @5-5ABFC372
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->RadAcctId->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctSessionId->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctUniqueId->Errors->ToString());
$errors = ComposeStrings($errors, $this->UserName->Errors->ToString());
$errors = ComposeStrings($errors, $this->Realm->Errors->ToString());
$errors = ComposeStrings($errors, $this->NASIPAddress->Errors->ToString());
$errors = ComposeStrings($errors, $this->NASPortId->Errors->ToString());
$errors = ComposeStrings($errors, $this->NASPortType->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctStartTime->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctStopTime->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctSessionTime->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctAuthentic->Errors->ToString());
$errors = ComposeStrings($errors, $this->ConnectInfo_start->Errors->ToString());
$errors = ComposeStrings($errors, $this->ConnectInfo_stop->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctInputOctets->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctOutputOctets->Errors->ToString());
$errors = ComposeStrings($errors, $this->CalledStationId->Errors->ToString());
$errors = ComposeStrings($errors, $this->CallingStationId->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctTerminateCause->Errors->ToString());
$errors = ComposeStrings($errors, $this->ServiceType->Errors->ToString());
$errors = ComposeStrings($errors, $this->FramedProtocol->Errors->ToString());
$errors = ComposeStrings($errors, $this->FramedIPAddress->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctStartDelay->Errors->ToString());
$errors = ComposeStrings($errors, $this->AcctStopDelay->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End radacct Class @5-FCB6E20C
class clsradacctDataSource extends clsDBConnection1 { //radacctDataSource Class @5-477E1887
//DataSource Variables @5-0F29408A
var $Parent = "";
var $CCSEvents = "";
var $CCSEventResult;
var $ErrorBlock;
var $CmdExecution;
var $CountSQL;
var $wp;
// Datasource fields
var $RadAcctId;
var $AcctSessionId;
var $AcctUniqueId;
var $UserName;
var $Realm;
var $NASIPAddress;
var $NASPortId;
var $NASPortType;
var $AcctStartTime;
var $AcctStopTime;
var $AcctSessionTime;
var $AcctAuthentic;
var $ConnectInfo_start;
var $ConnectInfo_stop;
var $AcctInputOctets;
var $AcctOutputOctets;
var $CalledStationId;
var $CallingStationId;
var $AcctTerminateCause;
var $ServiceType;
var $FramedProtocol;
var $FramedIPAddress;
var $AcctStartDelay;
var $AcctStopDelay;
//End DataSource Variables
//DataSourceClass_Initialize Event @5-89481238
function clsradacctDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid radacct";
$this->Initialize();
$this->RadAcctId = new clsField("RadAcctId", ccsInteger, "");
$this->AcctSessionId = new clsField("AcctSessionId", ccsText, "");
$this->AcctUniqueId = new clsField("AcctUniqueId", ccsText, "");
$this->UserName = new clsField("UserName", ccsText, "");
$this->Realm = new clsField("Realm", ccsText, "");
$this->NASIPAddress = new clsField("NASIPAddress", ccsText, "");
$this->NASPortId = new clsField("NASPortId", ccsInteger, "");
$this->NASPortType = new clsField("NASPortType", ccsText, "");
$this->AcctStartTime = new clsField("AcctStartTime", ccsDate, array("mm", "/", "dd", "/", "yyyy", " ", "HH", ":", "nn", ":", "ss"));
$this->AcctStopTime = new clsField("AcctStopTime", ccsDate, array("mm", "/", "dd", "/", "yyyy", " ", "HH", ":", "nn", ":", "ss"));
$this->AcctSessionTime = new clsField("AcctSessionTime", ccsInteger, "");
$this->AcctAuthentic = new clsField("AcctAuthentic", ccsText, "");
$this->ConnectInfo_start = new clsField("ConnectInfo_start", ccsText, "");
$this->ConnectInfo_stop = new clsField("ConnectInfo_stop", ccsText, "");
$this->AcctInputOctets = new clsField("AcctInputOctets", ccsInteger, "");
$this->AcctOutputOctets = new clsField("AcctOutputOctets", ccsInteger, "");
$this->CalledStationId = new clsField("CalledStationId", ccsText, "");
$this->CallingStationId = new clsField("CallingStationId", ccsText, "");
$this->AcctTerminateCause = new clsField("AcctTerminateCause", ccsText, "");
$this->ServiceType = new clsField("ServiceType", ccsText, "");
$this->FramedProtocol = new clsField("FramedProtocol", ccsText, "");
$this->FramedIPAddress = new clsField("FramedIPAddress", ccsText, "");
$this->AcctStartDelay = new clsField("AcctStartDelay", ccsInteger, "");
$this->AcctStopDelay = new clsField("AcctStopDelay", ccsInteger, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @5-58383AC3
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
array("Sorter_RadAcctId" => array("RadAcctId", ""),
"Sorter_AcctSessionId" => array("AcctSessionId", ""),
"Sorter_AcctUniqueId" => array("AcctUniqueId", ""),
"Sorter_UserName" => array("UserName", ""),
"Sorter_Realm" => array("Realm", ""),
"Sorter_NASIPAddress" => array("NASIPAddress", ""),
"Sorter_NASPortId" => array("NASPortId", ""),
"Sorter_NASPortType" => array("NASPortType", ""),
"Sorter_AcctStartTime" => array("AcctStartTime", ""),
"Sorter_AcctStopTime" => array("AcctStopTime", ""),
"Sorter_AcctSessionTime" => array("AcctSessionTime", ""),
"Sorter_AcctAuthentic" => array("AcctAuthentic", ""),
"Sorter_ConnectInfo_start" => array("ConnectInfo_start", ""),
"Sorter_ConnectInfo_stop" => array("ConnectInfo_stop", ""),
"Sorter_AcctInputOctets" => array("AcctInputOctets", ""),
"Sorter_AcctOutputOctets" => array("AcctOutputOctets", ""),
"Sorter_CalledStationId" => array("CalledStationId", ""),
"Sorter_CallingStationId" => array("CallingStationId", ""),
"Sorter_AcctTerminateCause" => array("AcctTerminateCause", ""),
"Sorter_ServiceType" => array("ServiceType", ""),
"Sorter_FramedProtocol" => array("FramedProtocol", ""),
"Sorter_FramedIPAddress" => array("FramedIPAddress", ""),
"Sorter_AcctStartDelay" => array("AcctStartDelay", ""),
"Sorter_AcctStopDelay" => array("AcctStopDelay", "")));
}
//End SetOrder Method
//Prepare Method @5-8A7C9E9E
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("2", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("3", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("4", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("5", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("6", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("7", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("8", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("9", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("10", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("11", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("12", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("13", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("14", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->AddParameter("15", "urls_keyword", ccsText, "", "", $this->Parameters["urls_keyword"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opContains, "AcctSessionId", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->wp->Criterion[2] = $this->wp->Operation(opContains, "AcctUniqueId", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->wp->Criterion[3] = $this->wp->Operation(opContains, "UserName", $this->wp->GetDBValue("3"), $this->ToSQL($this->wp->GetDBValue("3"), ccsText),false);
$this->wp->Criterion[4] = $this->wp->Operation(opContains, "Realm", $this->wp->GetDBValue("4"), $this->ToSQL($this->wp->GetDBValue("4"), ccsText),false);
$this->wp->Criterion[5] = $this->wp->Operation(opContains, "NASIPAddress", $this->wp->GetDBValue("5"), $this->ToSQL($this->wp->GetDBValue("5"), ccsText),false);
$this->wp->Criterion[6] = $this->wp->Operation(opContains, "NASPortType", $this->wp->GetDBValue("6"), $this->ToSQL($this->wp->GetDBValue("6"), ccsText),false);
$this->wp->Criterion[7] = $this->wp->Operation(opContains, "AcctAuthentic", $this->wp->GetDBValue("7"), $this->ToSQL($this->wp->GetDBValue("7"), ccsText),false);
$this->wp->Criterion[8] = $this->wp->Operation(opContains, "ConnectInfo_start", $this->wp->GetDBValue("8"), $this->ToSQL($this->wp->GetDBValue("8"), ccsText),false);
$this->wp->Criterion[9] = $this->wp->Operation(opContains, "ConnectInfo_stop", $this->wp->GetDBValue("9"), $this->ToSQL($this->wp->GetDBValue("9"), ccsText),false);
$this->wp->Criterion[10] = $this->wp->Operation(opContains, "CalledStationId", $this->wp->GetDBValue("10"), $this->ToSQL($this->wp->GetDBValue("10"), ccsText),false);
$this->wp->Criterion[11] = $this->wp->Operation(opContains, "CallingStationId", $this->wp->GetDBValue("11"), $this->ToSQL($this->wp->GetDBValue("11"), ccsText),false);
$this->wp->Criterion[12] = $this->wp->Operation(opContains, "AcctTerminateCause", $this->wp->GetDBValue("12"), $this->ToSQL($this->wp->GetDBValue("12"), ccsText),false);
$this->wp->Criterion[13] = $this->wp->Operation(opContains, "ServiceType", $this->wp->GetDBValue("13"), $this->ToSQL($this->wp->GetDBValue("13"), ccsText),false);
$this->wp->Criterion[14] = $this->wp->Operation(opContains, "FramedProtocol", $this->wp->GetDBValue("14"), $this->ToSQL($this->wp->GetDBValue("14"), ccsText),false);
$this->wp->Criterion[15] = $this->wp->Operation(opContains, "FramedIPAddress", $this->wp->GetDBValue("15"), $this->ToSQL($this->wp->GetDBValue("15"), ccsText),false);
$this->Where = $this->wp->opOR(
true, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false, $this->wp->opOR(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]),
$this->wp->Criterion[3]),
$this->wp->Criterion[4]),
$this->wp->Criterion[5]),
$this->wp->Criterion[6]),
$this->wp->Criterion[7]),
$this->wp->Criterion[8]),
$this->wp->Criterion[9]),
$this->wp->Criterion[10]),
$this->wp->Criterion[11]),
$this->wp->Criterion[12]),
$this->wp->Criterion[13]),
$this->wp->Criterion[14]),
$this->wp->Criterion[15]);
}
//End Prepare Method
//Open Method @5-213A9CC4
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*) " .
"FROM radacct";
$this->SQL = "SELECT radacct.RadAcctId, radacct.AcctSessionId, radacct.AcctUniqueId, radacct.UserName, radacct.Realm, radacct.NASIPAddress, radacct.NASPortId, " .
"radacct.NASPortType, radacct.AcctStartTime, radacct.AcctStopTime, radacct.AcctSessionTime, radacct.AcctAuthentic, radacct.ConnectInfo_start, " .
"radacct.ConnectInfo_stop, radacct.AcctInputOctets, radacct.AcctOutputOctets, radacct.CalledStationId, radacct.CallingStationId, " .
"radacct.AcctTerminateCause, radacct.ServiceType, radacct.FramedProtocol, radacct.FramedIPAddress, radacct.AcctStartDelay, " .
"radacct.AcctStopDelay " .
"FROM radacct {SQL_Where} {SQL_OrderBy}";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
if ($this->CountSQL)
$this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
else
$this->RecordsCount = "CCS not counted";
$this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
}
//End Open Method
//SetValues Method @5-B535BA1D
function SetValues()
{
$this->RadAcctId->SetDBValue(trim($this->f("RadAcctId")));
$this->AcctSessionId->SetDBValue($this->f("AcctSessionId"));
$this->AcctUniqueId->SetDBValue($this->f("AcctUniqueId"));
$this->UserName->SetDBValue($this->f("UserName"));
$this->Realm->SetDBValue($this->f("Realm"));
$this->NASIPAddress->SetDBValue($this->f("NASIPAddress"));
$this->NASPortId->SetDBValue(trim($this->f("NASPortId")));
$this->NASPortType->SetDBValue($this->f("NASPortType"));
$this->AcctStartTime->SetDBValue(trim($this->f("AcctStartTime")));
$this->AcctStopTime->SetDBValue(trim($this->f("AcctStopTime")));
$this->AcctSessionTime->SetDBValue(trim($this->f("AcctSessionTime")));
$this->AcctAuthentic->SetDBValue($this->f("AcctAuthentic"));
$this->ConnectInfo_start->SetDBValue($this->f("ConnectInfo_start"));
$this->ConnectInfo_stop->SetDBValue($this->f("ConnectInfo_stop"));
$this->AcctInputOctets->SetDBValue(trim($this->f("AcctInputOctets")));
$this->AcctOutputOctets->SetDBValue(trim($this->f("AcctOutputOctets")));
$this->CalledStationId->SetDBValue($this->f("CalledStationId"));
$this->CallingStationId->SetDBValue($this->f("CallingStationId"));
$this->AcctTerminateCause->SetDBValue($this->f("AcctTerminateCause"));
$this->ServiceType->SetDBValue($this->f("ServiceType"));
$this->FramedProtocol->SetDBValue($this->f("FramedProtocol"));
$this->FramedIPAddress->SetDBValue($this->f("FramedIPAddress"));
$this->AcctStartDelay->SetDBValue(trim($this->f("AcctStartDelay")));
$this->AcctStopDelay->SetDBValue(trim($this->f("AcctStopDelay")));
}
//End SetValues Method
} //End radacctDataSource Class @5-FCB6E20C
//Include Page implementation @98-58DBA1E3
include_once(RelativePath . "/Footer.php");
//End Include Page implementation
//Initialize Page @1-B5CC0AC8
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "radacct_list.html";
$BlockToParse = "main";
$TemplateEncoding = "CP1252";
$PathToRoot = "./";
//End Initialize Page
//Initialize Objects @1-464DCB56
$DBConnection1 = new clsDBConnection1();
$MainPage->Connections["Connection1"] = & $DBConnection1;
// Controls
$Header = & new clsHeader("", "Header", $MainPage);
$Header->Initialize();
$radacctSearch = & new clsRecordradacctSearch("", $MainPage);
$radacct = & new clsGridradacct("", $MainPage);
$Footer = & new clsFooter("", "Footer", $MainPage);
$Footer->Initialize();
$MainPage->Header = & $Header;
$MainPage->radacctSearch = & $radacctSearch;
$MainPage->radacct = & $radacct;
$MainPage->Footer = & $Footer;
$radacct->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
$Charset = $Charset ? $Charset : "windows-1252";
if ($Charset)
header("Content-Type: text/html; charset=" . $Charset);
//End Initialize Objects
//Initialize HTML Template @1-8F4531F3
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252");
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
//End Initialize HTML Template
//Execute Components @1-F575C206
$Header->Operations();
$radacctSearch->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-C025F62F
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBConnection1->close();
header("Location: " . $Redirect);
$Header->Class_Terminate();
unset($Header);
unset($radacctSearch);
unset($radacct);
$Footer->Class_Terminate();
unset($Footer);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-0043BABF
$Header->Show();
$radacctSearch->Show();
$radacct->Show();
$Footer->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
$main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page
//Unload Page @1-0ED6E769
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBConnection1->close();
$Header->Class_Terminate();
unset($Header);
unset($radacctSearch);
unset($radacct);
$Footer->Class_Terminate();
unset($Footer);
unset($Tpl);
//End Unload Page
?>
|