require_once ('config.php'); require_once ('libpam.php'); require_once ('conector.php'); require_once ('dbmanager.php'); CheckLevel($db,7); function LimitTxt($txtin){ if(strlen($txtin)>=15){ $txt=substr($txtin, 0, 6)."...".substr($txtin, -6, 6); }else{ $txt=$txtin; } return $txt; } function GetWFname($db,$id){ $recordSet = ew_ListaRegistro($db,"workflows",$Elements,"`id_wf`=".$id," LIMIT 1"); while (!$recordSet->EOF) { $rst = $recordSet->fields[1]; $recordSet->MoveNext(); } return $rst; } $timestamp=time(); $recordSet = ew_ListaRegistro($db,"agenda",$Elements,"`fire_time`>=".$timestamp," ORDER BY `id` ASC LIMIT 1"); while (!$recordSet->EOF) { $nextcmd = $recordSet->fields[1]; $nextime = $recordSet->fields[3]; $recordSet->MoveNext(); } if($nextime!=""){ $nextime=date('d-m-y H:i:s',$nextime); $nextcmd=GetWFname($db,$nextcmd); }else{ $nextcmd="Ninguno"; $nextime="xx-xx-xx xx:xx:xx"; } $errores_total = ew_ContarRegistros($db,"errores","`date_error`=CURDATE()"); $muestras_total = ew_ContarRegistros($db,"muestras",$Where); $workflows_total = ew_ContarRegistros($db,"workflows",$Where); ?>