Exemple #1
0
 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);
 }
Exemple #2
0
 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']);
 }
Exemple #3
0
 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']);
 }