Ejemplo n.º 1
0
if (!file_exists($GLOBALS['dirLibServer'] . 'dkLibServer.php')) {
    echo "não encontrou arquivo de biblioteca";
}
include $GLOBALS['dirLibServer'] . 'dkLibServer.php';
?>


<!DOCTYPE HTML>

<html lang="en">
<head>
	<meta charset="utf-8" />
	<?php 
$dkphp = new dkLibServer();
$dkphp->header();
$dkphp->setdbType("oracle");
$dkphp->setConnection();
?>

	<title></title>
</head>



<body>
	<?php 
//Pagar
$nrcontrato = array("attribute" => array("id" => "nrcontrato", "name" => "nrcontrato", "value" => "1", "type" => "text", "table_field" => "nrcontrato", "table" => "pagar"));
$nrpagar = array("attribute" => array("class" => "form-control", "name" => "nrpagar", "id" => "nrpagar", "value" => "", "type" => "number", "table_field" => "nrpagar", "table" => array("pagar", "pagar_parcela")), "label_text" => "Numero Pagar");
$nrfornecedor = array("attribute" => array("class" => "form-control", "name" => "nrfornecedor", "id" => "nrfornecedor", "value" => "", "type" => "number", "table_field" => "nrfornecedor", "table" => "pagar"), "label_text" => "Numero do Fornecedor");
$txobservacao = array("attribute" => array("class" => "form-control", "name" => "txobservacao", "id" => "txobservacao", "type" => "text", "value" => "", "table_field" => "txobservacao", "table" => "pagar"), "label_text" => "Taxa de Observacao");
Ejemplo n.º 2
0
include_once '../controller/dkLib.php';
if (!file_exists($GLOBALS['dirLibServer'] . 'dkLibServer.php')) {
    echo "não encontrou arquivo de biblioteca: " . $GLOBALS['dirLibServer'];
}
include $GLOBALS['dirLibServer'] . 'dkLibServer.php';
?>


<!DOCTYPE HTML>

<html lang="en">
<head>
  <?php 
$dkphp = new dkLibServer();
$dkphp->header();
$dkphp->setdbType("ORACLE");
$dkphp->setConnection();
//Criação do js
$tableFName = $dkphp->generateFileName("table");
$javaScript = array("name" => "geraFluxo", "result" => "resultadoPesquisa", "component" => array("jsdtinicio" => array("id" => "dtinicio", "type" => "date"), "dtfim" => array("id" => "dtfim", "type" => "date")));
$dkphp->generateJavaScript($javaScript, $tableFName);
$dkphp->clearJSCode();
$dkphp->setQueryType("SEARCH");
$sql = 'SELECT * FROM table(dkfinanceiro.fluxo_det(  :dtinicio , :dtfim ))  ';
$sql = "select a.nrorigem,\n           a.nrparcela,\n           a.txfluxo,\n           a.dtfluxo,\n           to_char(a.vlreceber,'9,999,990.00') vlreceber,\n           to_char(a.vlpagar,'9,999,990.00') vlpagar,\n           to_char(a.vlsaldo,'9,999,990.00') vlsaldo,\n           a.situacao\n      from table(dkfinanceiro.fluxo_det(:dtinicio,:dtfim)) a";
$sql = '"' . $sql . '"';
$dkphp->setQuery($sql);
$dkphp->setQueryParam(array(":dtinicio", ":dtfim"));
$table = array("id" => "txfluxo", "div" => array("class='matter'", "class='container' ", "class='row' ", "class='col-md-12'", "class='widget wgreen'", "class='widget-head'", "class='clearfix'", "class='page-tables'", "class='widget-content'", "class='padd'", "class='table-responsive'"), "class" => "table-striped table-bordered table-hover cellpadding='0' cellspacing='0' border='0' width='100%'", "header" => array("Origem", "Parc.", "Data", "Descr.", "Receber", "Pagar", "SAldo", "Situação"), "header-coluna-style" => array("Receber" => " align='right' ", "vlpagar" => "align='right'"), "coluna" => array("nrorigem", "nrparcela", "dtfluxo", "txfluxo", "vlreceber", "vlpagar", "vlsaldo", "situacao"), "coluna-style" => array("vlreceber" => " align='right'", "vlpagar" => "align='right'", "vlsaldo" => "align='right'"));
$dkphp->generateTable($table);
?>