diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-03-06 13:53:40 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-05-19 18:15:30 +0200 |
commit | f28234a7176db39e4002aa115316dda8ba1dbe2d (patch) | |
tree | c7ffca16380432e7a74d49bd793e65496adf1e6e /admin/WebConsole/varios/consulta_programaciones.php | |
parent | 7dc24087185bfd12c0f9eb285cf991cda35288d0 (diff) |
#942 Use /schedule/get in consulta_programaciones (web)
Diffstat (limited to 'admin/WebConsole/varios/consulta_programaciones.php')
-rw-r--r-- | admin/WebConsole/varios/consulta_programaciones.php | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/admin/WebConsole/varios/consulta_programaciones.php b/admin/WebConsole/varios/consulta_programaciones.php index 127dde3e..c2735030 100644 --- a/admin/WebConsole/varios/consulta_programaciones.php +++ b/admin/WebConsole/varios/consulta_programaciones.php @@ -12,21 +12,30 @@ include_once("../includes/ctrlacc.php"); include_once("../clases/AdoPhp.php"); include_once("../includes/comunes.php"); include_once("../includes/CreaComando.php"); +include_once("../includes/restfunctions.php"); //_________________________________________________________________________________________________________ // Toma parametros $idprogramacion=0; if (isset($_POST["idprogramacion"])) $idprogramacion=$_POST["idprogramacion"]; -// Abre conexiones -$cmd=CreaComando($cadenaconexion); // Crea objeto comando -$rs=new Recordset; // Recupero acciones anidadas -$cmd->texto="SELECT * FROM programaciones WHERE idprogramacion=".$idprogramacion; -$rs->Comando=&$cmd; -if ($rs->Abrir()){ // Error al abrir recordset - $cadena_campos=$rs->campos[0]; - for($i=1;$i<$rs->numerodecampos;$i++) - $cadena_campos.=";".$rs->campos[$i]; // Usa el caracter ; para delimitar - echo $cadena_campos; -} -$rs->Cerrar(); +$schedule = get_schedule(null, $idprogramacion); +$task = $schedule['schedule'][0]; +$cadena_campos = "null;null;null"; +$cadena_campos.= ";".$task[OG_REST_PARAM_NAME]; +$cadena_campos.= ";".$task[OG_REST_PARAM_YEARS]; +$cadena_campos.= ";".$task[OG_REST_PARAM_MONTHS]; +$cadena_campos.= ";".$task[OG_REST_PARAM_DAYS]; +$cadena_campos.= ";".$task['week_days']; +$cadena_campos.= ";".$task['weeks']; +$cadena_campos.= ";".$task[OG_REST_PARAM_HOURS]; +$cadena_campos.= ";".$task[OG_REST_PARAM_AM_PM]; +$cadena_campos.= ";".$task[OG_REST_PARAM_MINUTES]; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +$cadena_campos.= ";null"; +echo $cadena_campos; |