Esempio n. 1
0
<?php

$root = substr($_SERVER["DOCUMENT_ROOT"], 0, -1);
require_once "{$root}/Class/Database.php";
require_once "{$root}/Function/DataTime.php";
require_once "{$root}/Class/psxlsgen.php";
$d = new Database("localhost", "gestore", "polipo", "gestione");
$r = $d->GetRows("*", "view_call", "", "", "data_att limit 50", 1);
$myxls = new PhpSimpleXlsGen();
$myxls->totalcol = 8;
$myxls->InsertText("N.Call");
$myxls->InsertText("Data Chisura");
$myxls->InsertText("Cliente");
$myxls->InsertText("CITY");
$myxls->InsertText("Tecnico");
$myxls->InsertText("Tipo Call");
$myxls->InsertText("Note");
$myxls->InsertText("Economico");
$tot_economico = 0;
foreach ($r as $key => $field) {
    if ($field['n_pdl'] > "1") {
        $economico = floatval($field['econ']) * floatval($field['n_pdl']);
        $compenso = floatval($field['prz']) * floatval($field['n_pdl']);
    } else {
        $economico = floatval($field['econ']);
        $compenso = floatval($field['prz']);
    }
    $myxls->InsertText($field['n_call']);
    $myxls->InsertText(Inverti_Data($field['data_att']));
    $myxls->InsertText($field['cliente']);
    $myxls->InsertText($field['Comune'] . " (" . $field['Targa'] . ")");
Esempio n. 2
0
$M_PENDIDIDKAN = $list->getMPendidikan();
$M_KAWIN = array('x' => 'Seluruh Status') + $M_KAWIN;
$M_DUSUN = array('x' => 'Seluruh Dusun') + $M_DUSUN;
$M_AGAMA = array('x' => 'Seluruh Agama') + $M_AGAMA;
$M_KERJA = array('x' => 'Seluruh Pekerjaan') + $M_KERJA;
$M_PENDIDIDKAN = array('x' => 'Seluruh Pendidikan') + $M_PENDIDIDKAN;
foreach ($M_FIELD as $key => $field) {
    $fieldOptions[$key] = $field[1];
}
if ($next || $download) {
    if (!$errorCode) {
        $penduduk = new Penduduk($ADODB);
        $result = $penduduk->searchAdvance($kField, $keyword, $limit, $page, $kAgama, $kKerja, $kDusun, $kKawin, $kPendidikan, $download);
        if ($download) {
            require_once 'component/psxlsgen.php';
            $myxls = new PhpSimpleXlsGen();
            $myxls->filename = "download";
            $myxls->WriteText_pos(0, 0, 'No');
            $myxls->WriteText_pos(0, 1, 'NIK');
            $myxls->WriteText_pos(0, 2, 'No. KTP');
            $myxls->WriteText_pos(0, 3, 'Nama');
            $myxls->WriteText_pos(0, 4, 'Agama');
            $myxls->WriteText_pos(0, 5, 'Pekerjaan');
            $myxls->WriteText_pos(0, 6, 'Alamat');
            $myxls->WriteText_pos(0, 7, 'Dusun');
            $myxls->WriteText_pos(0, 8, 'No. RT');
            $myxls->WriteText_pos(0, 9, 'No. RW');
            $myxls->WriteText_pos(0, 10, 'Tempat Lahir');
            $myxls->WriteText_pos(0, 11, 'Tanggal Lahir');
            $myxls->WriteText_pos(0, 12, 'Umur');
            $myxls->WriteText_pos(0, 13, 'Jenis Kelamin');