本文整理匯總了PHP中XML::XmlArrayResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP XML::XmlArrayResponse方法的具體用法?PHP XML::XmlArrayResponse怎麽用?PHP XML::XmlArrayResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XML
的用法示例。
在下文中一共展示了XML::XmlArrayResponse方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UserList
private function UserList()
{
$DB = new DataBase();
$EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias");
$SelectUsers = "SELECT * FROM Users WHERE UserName != 'admin'";
$ResultSelect = $DB->ConsultaSelect($EnterpriseAlias, $SelectUsers);
if ($ResultSelect['Estado'] != 1) {
XML::XmlResponse("Error", 0, "<p><b>Error</b> al consultar los usuarios</p><br>Detalles:<br><br>" . $ResultSelect['Estado']);
return 0;
}
$Users = $ResultSelect['ArrayDatos'];
XML::XmlArrayResponse("UserList", "User", $Users);
}
示例2: GetSystemEnterprises
private function GetSystemEnterprises()
{
$DB = new DataBase();
$IdEnterprise = filter_input(INPUT_POST, "IdEnterprise");
$EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias");
if ($IdEnterprise > 0) {
$Condition = " WHERE en.IdEnterprise = {$IdEnterprise} ";
}
$QueryEnterprises = "SELECT en.IdEnterprise, en.EnterpriseName, en.Alias, en.RFC, en.DischargeDate, en.UsedMemory, en.AvailableMemory, en.TotalMemory, vol.IdVolume, vol.VolumeName FROM Enterprises en LEFT JOIN Volumes vol ON en.IdVolume = vol.IdVolume {$Condition}";
$ResultQuery = $DB->ConsultaSelect($EnterpriseAlias, $QueryEnterprises);
if ($ResultQuery['Estado'] != 1) {
XML::XmlResponse("Error", 0, "<p><b>Error</b> al obtener el listado de empresas</p><br>Detalles:<br><br>" . $ResultQuery['Estado']);
return 0;
}
XML::XmlArrayResponse("Enterprises", "Enterprise", $ResultQuery['ArrayDatos']);
}
示例3: GetActiveEmails
private function GetActiveEmails()
{
$DB = new DataBase();
$EnterpriseAlias = filter_input(INPUT_POST, "EnterpriseAlias");
$IdUser = filter_input(INPUT_POST, "IdUser");
$UserName = filter_input(INPUT_POST, "UserName");
$ActiveEmailsQuery = "SELECT IdEmail, User FROM EmailEngine";
$ActiveEmailResult = $DB->ConsultaSelect($EnterpriseAlias, $ActiveEmailsQuery);
if ($ActiveEmailResult['Estado'] != 1) {
XML::XmlResponse("Error", 0, "<p><b>Error</b> al consultar los correos activos</p><br>Detalles:<br><br>" . $ActiveEmailResult['Estado']);
return 0;
}
XML::XmlArrayResponse("ActiveEmails", "Email", $ActiveEmailResult['ArrayDatos']);
}