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.     $fecha = date('24/10/19');
  12.     $horaPeticionProtom = '1571911629';
  13.     
  14.     //Valores devueltos por consulta AlarmLog
  15.     $fechaAlarmLog = "22/10/19";
  16.     $horaAlarmLog = "19:50:40";
  17.     
  18.     $resultAlarmLog = strtotime($horaAlarmLog);
  19.     if(strcasecmp($fecha, $fechaAlarmLog) == 0 && $resultAlarmLog > $horaPeticionProtom){
  20.         echo "Fuera de pruebas (CCS)";
  21.     }
  22.     else{
  23.         echo "En pruebas (ITS)";
  24.     }
  25.  
File Description
  • Consultar Estado de Panel
  • PHP Code
  • 24 Oct-2019
  • 691 Bytes
You can Share it: