Consultar Estado de Panel - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.

Name: Consultar Estado de Panel fullscreencopydownloadembedprint


Your result can be seen below.

Result of php executing





Full code of Consultar Estado de Panel.php

  1. <?php
  2.  
  3.      /*
  4.     $fecha = date('d/m/y');
  5.     $horaPeticionProtom = strtotime('now');
  6.     echo ("fecha: " . $fecha);
  7.     echo ("\n horaPeticionProtom: " . $horaPeticionProtom);
  8.     */
  9.     
  10.     //Valores devueltos por las operaciones de arriba ANTES de lanzar PROTOM:
  11.     /*
  12.     ValidateSaviaInstallation::sendSaviaInstallationCommand
  13.         <country>ES</country>
  14.         <numinst>1502597</numinst>
  15.         <panel>SDVECU</panel>
  16.         <mode>1</mode>
  17.         <maintenance>28239840</maintenance>
  18.         <version>2.33</version>
  19.         <transaction_id>M1358834261568630424</transaction_id>
  20.         <command_type>ConsultSystemTechnicalStatus_v08_08</command_type>
  21.         <sei>1</sei>
  22.     */
  23.     
  24.     $fecha = date('24/10/19');
  25.     $horaPeticionProtom = '1571911629';
  26.     
  27.     //Valores devueltos por consulta AlarmLog
  28.     /*
  29.     MCG_PO_AlarmLogManagement_1::getAlarmLogByFilters
  30.         <typ:getAlarmLogByFiltersRequest>
  31.              <typ:country>ESP</typ:country>
  32.              <typ:idApplication>THNLY</typ:idApplication>
  33.              <typ:installation>
  34.                 <typ:ins_no>1502597</typ:ins_no>
  35.              </typ:installation>
  36.              <typ:filters>
  37.                 <typ:medioList>
  38.                    <typ:medio>GPR</typ:medio>
  39.                    <typ:medio>SMS</typ:medio>
  40.                 </typ:medioList>
  41.                 <typ:transmitionCycleList>
  42.                    <typ:transmitionCycle>C</typ:transmitionCycle>
  43.                    <typ:transmitionCycle>S</typ:transmitionCycle>
  44.                 </typ:transmitionCycleList>
  45.              </typ:filters>
  46.              <typ:returnAll>false</typ:returnAll>
  47.         </typ:getAlarmLogByFiltersRequest>
  48.     */
  49.     
  50.     $fechaAlarmLog = "22/10/19";
  51.     $horaAlarmLog = "19:50:40";
  52.     
  53.     $resultAlarmLog = strtotime($horaAlarmLog);
  54.     if(strcasecmp($fecha, $fechaAlarmLog) == 0 && $resultAlarmLog > $horaPeticionProtom){
  55.         echo "Fuera de pruebas (CCS)";
  56.     }
  57.     else{
  58.         echo "En pruebas (ITS)";
  59.     }
  60.  
File Description
  • Consultar Estado de Panel
  • PHP Code
  • 24 Oct-2019
  • 1.93 Kb
You can Share it: