예제 #1
0
function idname()
{
    if ($this->gtask_id) {
        return $this->resolve("gtask_id") . "@" . int_to_text($this->inicio);
    } else {
        return "-";
    }
}
예제 #2
0
 function ValidateDate($id, $event, $myDate)
 {
     global $xajax;
     $objResponse = new xajaxResponse();
     if ($this->ifFormat == "%d/%m/%Y") {
         if (text_to_int($myDate) == 3600) {
             $objResponse->script("alert('Fecha inválida -{$myDate}-')");
             $objResponse->assign($id, "value", int_to_text(time()));
         } else {
             $objResponse->assign($id, "value", int_to_text(text_to_int($myDate)));
         }
     } else {
         if (date_parse_from_format($this->ifFormat, $myDate)) {
             $objResponse->assign($id, "value", $myDate);
         } else {
             $objResponse->script("alert('Fecha inválida -{$myDate}-')");
             $objResponse->assign($id, "value", strftime($this->ifFormat, time()));
         }
     }
     return $objResponse;
 }
예제 #3
0
<?php

require_once "Bilo.php";
header("Content-Type: plain/text");
header("Content-Disposition: attachment; filename=registros.csv");
$r = newObject("registro");
if (empty($sort)) {
    $sort = " dia DESC ";
}
setlimitRows(5000);
$r->searchResults = $r->selectAll($offset, $sort);
echo "username,nombre,apellidos,dia,entrada,salida\n";
do {
    $o = current($r->searchResults);
    echo $o->get_ext("user", $o->user_id, "username") . ",";
    echo $o->get_ext("user", $o->user_id, "nombre") . ",";
    echo $o->get_ext("user", $o->user_id, "apellidos") . ",";
    echo int_to_text($o->dia) . ",";
    $void = $o->entrada_m > 3600 ? strftime("%H:%M", $o->entrada_m) . "," : "-,";
    echo $void;
    $void = $o->salida_m > 3600 ? strftime("%H:%M", $o->salida_m) : "-";
    echo $void;
    echo "\n";
} while (next($r->searchResults));
resetlimitRows();
//require $registry->get('templates', 'horde') . '/common-footer.inc';