Пример #1
0
function ultima_data($db_data)
{
    global $defFile;
    $OP = $defFile["PATH"]["PATH_PROC"] . "/cisis/mx {$db_data} now +control";
    $result = exec($OP);
    $regs = total_registros($result);
    $OP = $defFile["PATH"]["PATH_PROC"] . "/cisis/mx {$db_data} from={$regs} count=\"1\" \"pft=v1\" now";
    $result = exec($OP);
    $dtf = $result;
    return $dtf;
}
Пример #2
0
    $max_val = exec($OP);
    $list_box = calcula_list_box($max_val);
    $list_boxXML = calcula_list_box_XML($max_val);
} elseif ($script == 'sci_statart') {
    // ***** Calcula total por artigos *****
    $bool = monta_bool($pid, "articles");
    //exec("$utl/mxtb $db_acesso_art create=$db_tmp_article02 from=$mfn_ini_art to=$mfn_fim_art $bool \"256:mhu,v1,',',v2,\" \"tab=v5\" \"class=120000\"");
    die("{$utl}/mxtb {$db_acesso_art} create={$db_tmp_article02} from={$mfn_ini_art} to={$mfn_fim_art} \"256:mhu,v1,',',v2,\" \"tab=v5\" \"class=120000\"");
    $proc_access = monta_proc($access);
    exec("{$utl}/mx {$db_tmp_article02} \"join={$db_issue},43=s('Y',replace(v1*0.18,',',''))\" \"proc='d32001'\" {$proc_access} \"append={$db_tmp_article}\"");
    exec("{$utl}/mx {$db_tmp_article} \"join={$db_artigonp}=s('HR=S',replace(v1,',',''))\" copy={$db_tmp_article} -all now");
    exec("{$utl}/msrt {$db_tmp_article} \"128\" \"f(val('9999999')-val(v999),7,0)\"");
    // ***** Pega o total de registros *****
    $OP1 = "{$utl}/mx {$db_tmp_article} now +control";
    $result = exec($OP1);
    $tot_regs = total_registros($result);
    // ***** Calcula o total de paginas *****
    $tot_pags = ceil($tot_regs / $nlines);
    // ***** Calcula proxima pagina ********
    $nextpg = $cpage + 1;
    // ***** Pega a maior frequencia *****
    $OP = "{$utl}/mx {$db_tmp_article} \"from=1\" \"to=1\" \"pft=v999/\" now";
    $max_val = exec($OP);
    $list_box = calcula_list_box($max_val);
    $list_boxXML = calcula_list_box_XML($max_val);
}
// ***************************************************************
// ********  Camada de Apresentação dos dados             ********
// ********  Exibe os dados em formato XML para posterior ********
// ********  transformação pela XSL adequada              ********
// ***************************************************************