示例#1
0
function selectLNC($name, $atribut = "")
{
    $db_function = new db_function();
    $options = array();
    $data = $db_function->selectAllRows("select singkatan from master_cab order by singkatan asc");
    foreach ($data as $row) {
        $options[$row["singkatan"]] = $row["singkatan"];
    }
    $value = cleanstr($_POST[$name]);
    $value = in_array($value, array(null, "")) ? $_GET[$name] : $value;
    $return = "<select id='{$name}' name='{$name}' {$atribut}>";
    $return .= "<option value='all'>- All -</option>";
    if (!empty($options)) {
        foreach ($options as $optVal => $optName) {
            $selected = $optVal == $value ? "selected='selected'" : "";
            $return .= "<option value='{$optVal}' {$selected} >{$optName}</option>";
        }
    }
    $return .= "</select>";
    return $return;
}
<?php

require_once "functions.php";
session_start();
security::redirect_if_not_loggedin();
# Delete & Modify
if (isset($_POST["TrModify"])) {
    $TrModify = $_POST["TrModify"];
    if (isset($_POST["TrDelete"]) && $TrModify == "Delete") {
        $TrDeleteArr = $_POST["TrDelete"];
        db_function::transaction_delete_group($TrDeleteArr);
        attachments::delete_group($TrDeleteArr);
        header("Location: show.php");
    }
    if (!isset($_POST["TrDelete"]) && $TrModify == "Delete") {
        $test = various::send_alert_and_redirect("No transaction selected!", "show.php");
    }
    if (isset($_POST["TrEdit"]) && $TrModify == "Edit") {
        $TrEdit = $_POST["TrEdit"];
        header("Location: new_transaction.php?TrEditNr={$TrEdit[0]}");
    }
    if (!isset($_POST["TrEdit"]) && $TrModify == "Edit") {
        $test = various::send_alert_and_redirect("No transaction selected!", "show.php");
    }
}
if (empty($_GET["submn"])) {
    header("location:col_produktifitas.php?submn=input");
    exit;
}
$cssTabActive = "ui-tabs-active ui-state-active";
$cssInput = $cssTabActive;
$cssEdit = "";
$submn = $_GET['submn'];
if ($submn == "input") {
    $cssInput = $cssTabActive;
    $cssEdit = "";
} else {
    $cssEdit = $cssTabActive;
    $cssInput = "";
}
$db_function = new db_function();
$dataTBL = array();
$listLNC = array();
$listLNC[''] = "semua";
$data = $db_function->selectAllRows("select singkatan from master_cab order by singkatan asc");
foreach ($data as $row) {
    $listLNC[$row["singkatan"]] = $row["singkatan"];
}
if (!empty($_POST)) {
    $tgl1 = balikTgl($_POST['frm']['tgl1']);
    $tgl2 = balikTgl($_POST['frm']['tgl2']);
    $sql = "select lnc,npp,nama,jml from pegawai right join\n            (select lnc,userupdate,count(no_rekg_pinjaman) jml from debitur_trail \n            where 1=1 :whereLNC: and :whereInput: and tgl_update>'{$tgl1}' and tgl_update<'{$tgl2} 23:59:59'\n            group by userupdate,lnc) sumjml on pegawai.npp=sumjml.userupdate order by lnc,npp";
    if ($_POST['frm']['lnc'] == "") {
        $sql = str_replace(":whereLNC:", "", $sql);
    } else {
        $sql = str_replace(":whereLNC:", "and lnc='" . $_POST['frm']['lnc'] . "'", $sql);
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
ini_set('max_execution_time', 0);
$showtable = false;
$ddl_tglpoint = array();
$setTgl = "";
if (empty($_GET["jns_pencarian"])) {
    header("location:col_sumLegalitas.php?jns_pencarian=tgl");
    exit;
}
$_POST['frm']['jns_pencarian'] = $_GET['jns_pencarian'];
if (!empty($_POST)) {
    $db_function = new db_function();
    if (strtolower($_POST['action']) == "simpan point") {
        $data = $_SESSION['colateral']['summery_legal'];
        $tanggal = $data[0]['tanggal'];
        $setTgl = $tanggal;
        unset($_SESSION['colateral']['summery_legal']);
        $db_function->exec("delete summery_legal where tanggal='{$tanggal}'");
        foreach ($data as $row) {
            if (intval($row['jumlah']) != 0) {
                $db_function->exec("insert into summery_legal values('" . $row['tanggal'] . "',\n                '" . $row['lnc'] . "',\n                '" . $row['jenis'] . "',\n                '" . $row['jumlah'] . "')");
            }
        }
        header("location:col_sumLegalitas.php?jns_pencarian=point&tgl_point=" . $tanggal);
        exit;
    }
    $dataLNC = $db_function->selectAllRows("select UPPER(singkatan) singkatan from master_cab order by singkatan asc");
示例#5
0
<?php

$db_function = new db_function();
/*
$listTypeLookup=array();
$rows=$db_function->selectAllRows("select distinct type from lookup order by type asc");
foreach($rows as  $row){
    $listTypeLookup[$row["type"]]=$row["type"];
}*/
$listTypeLookup = array("asuransi_jiwa" => "Asuransi Jiwa", "asuransi_kerugian" => "Asuransi Kerugian", "daftar_kjpp" => "Daftar Kjpp", "developer" => "Developer", "jns_kendaraan" => "Jenis Kendaraan", "merk_kendaraan" => "Merek Kendaraan", "notaris" => "Notaris", "kendala" => "Kendala Pengikatan", "jns_pengikatan" => "Jenis Pengikatan", "jns_surat_tanah" => "Jenis Jaminan");
$listLookup = "";
$action = $_GET['action'] != null ? $_GET['action'] : "Simpan";
if (!empty($_POST)) {
    if ($_POST['action'] == "Batal") {
        header("location:col_lookup.php?type=" . $_GET['type']);
    } elseif ($_POST['action'] == "Simpan") {
        $frm = $_POST['frm'];
        $sql = "insert into lookup(type,value,lnc)values('" . $frm['type'] . "','" . $frm['value'] . "','" . $frm['lnc'] . "')";
        $db_function->exec($sql);
        header("location:col_lookup.php?type=" . $_GET['type']);
    } elseif ($_POST['action'] == "Edit") {
        $frm = $_POST['frm'];
        $db_function->exec("update lookup set type='" . $frm['type'] . "',value='" . $frm['value'] . "',lnc='" . $frm['lnc'] . "' " . "where type='" . $_GET['type'] . "' and value='" . $_GET['value'] . "'");
        header("location:col_lookup.php?type=" . $_GET['type']);
    }
}
if ($action == "delete") {
    $db_function->exec("delete from lookup where type='" . $_GET['type'] . "' and value='" . $_GET['value'] . "'");
    header("location:col_lookup.php?type=" . $_GET['type']);
} elseif ($action == "Edit" && empty($_POST)) {
    $_POST['frm']['value'] = $_GET['value'];
示例#6
0
<?php

require_once "functions.php";
$error = db_function::db_create();
if ($error !== "ok") {
    echo $error;
} else {
    $upgrade_result = db_upgrade::upgrade_db();
    if ($upgrade_result == "update_done") {
        various::send_alert_and_redirect("Database succesfully updated to version " . costant::app_version(), "index.php");
    }
}
$username = null;
$password = null;
$const_username = costant::login_username();
$const_password = costant::login_password();
$const_disable_authentication = costant::disable_authentication();
if ($const_disable_authentication == "True") {
    header("Location: landing.php");
}
if ($const_disable_authentication !== "True" && (!isset($const_username) or !isset($const_password))) {
    header("Location: settings.php");
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!empty($_POST["Username"]) && !empty($_POST["Password"])) {
        $username = $_POST["Username"];
        $password = hash("sha512", $_POST["Password"]);
        if ($username == $const_username && $password == $const_password) {
            session_start();
            $user_browser = $_SERVER['HTTP_USER_AGENT'];
            $_SESSION["username"] = $username;
示例#7
0
<?php

$db_function = new db_function();
if (empty($_GET['no_trail'])) {
    $no_trail = $db_function->selectOnefield("select no_trail from debitur_trail where no_rekg_pinjaman='" . $_GET['id'] . "' order by no_trail desc limit 1");
    header("location: col_trail.php?id=" . $_GET['id'] . "&no_trail=" . $no_trail);
    exit;
}
$showInformasiJaminan = false;
$showInformasiAsuransiKerugian = false;
$showInformasiAsuransiJiwa = false;
$showInformasiFleksi = false;
$showInformasiOto = false;
$showDtLunas = false;
$showForm = true;
$showInformasiLain = true;
$showEmergencyKon = true;
$messageBox = "";
$pesanError = array();
$program_kd = "";
$cab_kd = "";
$lnc = "*";
//$messageBox = showMessage("<div>Data Telah di simpan</div>","notice");
$no_trail = $_GET['no_trail'];
$_POST['frm']['no_trail'] = $no_trail;
$trailSekarang;
$trailSebelum;
$buf = $db_function->selectOneRows("select * from debitur_trail  where no_rekg_pinjaman='" . $_GET['id'] . "' and no_trail='" . $_GET['no_trail'] . "'");
foreach ($buf as $key => $val) {
    if (!is_int($key)) {
        $trailSekarang[strtolower($key)] = isDateDB($val) ? balikTgl($val) : $val;
示例#8
0
<?php

if (isset($_POST['frm']['lnc'])) {
    $lnc = $_POST['frm']['lnc'];
} else {
    if (isset($_POST['lnc'])) {
        $lnc = $_POST['lnc'];
    }
}
if (!isset($db_function)) {
    $db_function = new db_function();
}
$listAgama = array('ISLAM' => 'ISLAM', 'KRISTEN' => 'KRISTEN', 'PROTESTAN' => 'PROTESTAN', 'BUDDHA' => 'BUDDHA', 'HINDU' => 'HINDU', 'KONG HU CHU' => 'KONG HU CHU', 'KEPERCAYAAN LAINNYA' => 'KEPERCAYAAN LAINNYA');
$listJenkel = array('LAKI-LAKI' => 'LAKI-LAKI', 'PEREMPUAN' => 'PEREMPUAN');
$listJnsJaminan = array("INDUK" => "INDUK", "SATUAN" => "SATUAN", "GIRIK" => "GIRIK");
$listJnsPengikatan = $db_function->selectLookup("jns_pengikatan");
$listAdaPending = array("ADA" => "ADA", "PENDING" => "PENDING");
$listAdaPendingTidak = array("ADA" => "ADA", "PENDING" => "PENDING", "TIDAK" => "TIDAK");
$listAdaTidak = array("ADA" => "ADA", "TIDAK ADA" => "TIDAK ADA");
$ListSkimPKSDev = array("READY STOCK" => "READY STOCK", "KAVLING BANGUN" => "KAVLING BANGUN", "INDENT" => "INDENT");
$ListSelesaiBelum = array("SELESAI" => "SELESAI", "BELUM SELESAI" => "BELUM SELESAI");
$ListSkimPencairan = array("SEKALIGUS" => "SEKALIGUS", "PARTIAL DROW DOWN" => "PARTIAL DROW DOWN");
$ListJnsJaminanFleksi = array('SK' => 'SK', 'IJAZAH' => 'IJAZAH', 'KARTU TASPEN' => 'KARTU TASPEN');
$ListSerah = array("SUDAH" => "SUDAH", "BELUM" => "BELUM");
$ListStatusRekg = array("AKTIF" => "AKTIF", "LUNAS" => "LUNAS");
$ListProsesAgunan = array("PPJB" => "PPJB", "AJB" => "AJB", "PPJK" => "PPJK");
//$ListJenisSuratTanah = array("SHM" => "SHM", "SHGB" => "SHGB", "STRATA TITLE" => "STRATA TITLE", "OTHER" => "OTHER");
$ListJenisSuratTanah = $db_function->selectLookup("jns_surat_tanah", $lnc);
$ListJenisSertifikat = array("SHGB" => "SHGB", "SHGB DIATAS HPL" => "SHGB DIATAS HPL", "SHGB - STRATA TITLE" => "SHGB - STRATA TITLE", "SHM" => "SHM", "SHM - SRS" => "SHM - SRS");
$ListJnsProsespengikatan = array("PENDING DEVELOPER" => "PENDING DEVELOPER", "PENDING NOTARIS" => "PENDING NOTARIS", "SELESAI" => "SELESAI");
$ListJnsKendaraan = $db_function->selectLookup("jns_kendaraan", $lnc);
示例#9
0
}
$TrAmount = $_POST["Amount"];
$TrNotes = $_POST["Notes"];
#Execute common insert
db_function::category_insert_single($TrCategory, $TrSubCategory);
db_function::payee_insert_single($TrPayee, $TrCategory, $TrSubCategory);
db_function::payee_update_single($TrPayee, $TrCategory, $TrSubCategory);
if (isset($_POST["TrEditedNr"])) {
    $TrEditedNr = $_POST["TrEditedNr"];
    # Update
    db_function::transaction_update($TrEditedNr, $TrDate, $TrStatus, $TrType, $TrAccount, $TrToAccount, $TrPayee, $TrCategory, $TrSubCategory, $TrAmount, $TrNotes);
    echo "<script type='text/javascript'>";
    echo "location.href='show.php'";
    echo "</script>";
} else {
    $TrEditedNr = db_function::transaction_insert($TrDate, $TrStatus, $TrType, $TrAccount, $TrToAccount, $TrPayee, $TrCategory, $TrSubCategory, $TrAmount, $TrNotes);
}
attachments::rename_zero($TrEditedNr);
?>
        
        <div class="container text_align_center">
            <br />
            <br />
            <h3>Transaction inserted successfully</h3>
            <br />
            <br />
            <input type="button" class="btn btn-lg btn-success btn-block" value="Insert new" onclick="top.location.href = 'new_transaction.php'" />
            <br />
            <input type="button" class="btn btn-lg btn-success btn-block" value="Show transaction" onclick="top.location.href = 'show.php'" />
            <br />
            <input type="button" class="btn btn-lg btn-success btn-block" value="Return to menu" onclick="top.location.href = 'landing.php'" />
if ($FlagNew) {
    $resultarray = array();
    $TransactionHeaderText = "Insert new transcation";
    $TransactionDate = "2014-01-01";
    $TransactionStatus = costant::transaction_default_status();
    $TransactionType = costant::transaction_default_type();
    $TransactionAccount = costant::transaction_default_account();
    $TransactionToAccount = "None";
    $TransactionPayee = "";
    $TransactionCategory = "";
    $TransactionSubCategory = "";
    $TransactionAmount = "0";
    $TransactionNotes = "Empty";
    $TransactionSubmit = "Insert transaction";
} else {
    $resultarray = db_function::transaction_select_one($TrEditNr);
    $TransactionHeaderText = "Edit transcation";
    $TransactionDate = $resultarray["Date"];
    $TransactionStatus = $resultarray["Status"];
    $TransactionType = $resultarray["Type"];
    $TransactionAccount = $resultarray["Account"];
    $TransactionToAccount = $resultarray["ToAccount"];
    $TransactionPayee = $resultarray["Payee"];
    $TransactionCategory = $resultarray["Category"];
    $TransactionSubCategory = $resultarray["SubCategory"];
    $TransactionAmount = $resultarray["Amount"];
    $TransactionNotes = $resultarray["Notes"];
    $TransactionSubmit = "Edit transaction";
}
if (sizeof($resultarray) > 0 || $FlagNew == True) {
    echo "<div class='container'>";
示例#11
0
 public static function to_0_9_7()
 {
     $const_dbpath = costant::database_path();
     $db = new PDO("sqlite:{$const_dbpath}");
     $db->exec("ALTER TABLE New_Transaction RENAME TO New_Transaction_Old");
     db_function::db_create();
     $db->exec("INSERT INTO New_Transaction (Date, Status, Type, Account, ToAccount, Payee, Category, SubCategory, Amount, Notes)\r\n                            SELECT Date, Status, Type, Account, ToAccount, Payee, 'None', 'None', Amount, Notes FROM New_Transaction_Old");
     $db->exec("DROP TABLE New_Transaction_Old");
     $db->exec("UPDATE Parameters SET Value = '0.9.7' WHERE Parameter = 'Version';");
     $db = null;
 }
示例#12
0
<?php

include 'collateral_script/session_head.php';
include 'collateral_script/function.php';
include 'collateral_script/db_function.php';
$db_function = new db_function();
if (!empty($_POST)) {
    $user = $_SESSION['colateral']['npp'];
    $error = $db_function->initTrail('init', "1", "sama");
    echo $error;
}
$row = $db_function->selectOnefield("select count(*)from debitur left join debitur_trail on debitur.noaplikasi = debitur_trail .noaplikasi where debitur_trail.noaplikasi is null");
?>
<!DOCTYPE html>
<html>
    <head>
        <?php 
include 'collateral_script/head.php';
?>
  
    </head>
    <body>
        <div style="margin:0px 50px;text-align: left;">
            <h1 class="judulfrm">Inisialisasi Trail</h1>
            <div style="margin:10px;">
                <form method="POST">
                    <h3><?php 
echo $row;
?>
 data tidak ada auditrail </h3>
                    <input type="submit" value="Inisialisasi Trail" name="action" />
示例#13
0
<?php

$db_function = new db_function();
$action = $_POST["action"] == null ? "" : strtolower($_POST["action"]);
$showInformasiJaminan = false;
$showInformasiAsuransiKerugian = false;
$showInformasiAsuransiJiwa = false;
$showInformasiFleksi = false;
$showInformasiOto = false;
$showDtLunas = false;
$showForm = true;
$showInformasiLain = true;
$showEmergencyKon = true;
$messageBox = "";
$pesanError = array();
$program_kd = "";
$cab_kd = "";
$lnc = "*";
//$messageBox = showMessage("<div>Data Telah di simpan</div>","notice");
$produkLama = "";
$programLama = "";
$agamaLama = "";
$kelaminLama = "";
$skdrLama = "";
$jaminanLama = "";
$proses_agunanLama = "";
$jenis_surat_tanahLama = "";
$no_covernoteLama = "";
$jkw_covernoteLama = "";
$status_imbLama = "";
$jenis_pengikatanLama = "";
示例#14
0
   <TR>
   <TD></p>
       
       <table>
        <tr>
            <td>Nama LNC</td>
            <td><?php 
echo selectLNC("LNC");
?>
</td>
        </tr>
        <tr>
            <td>Nama Produk</td>
            <td>
            <?php 
$db_function = new db_function();
$options = array();
$data = $db_function->selectAllRows("select produk_nm from master_produk");
foreach ($data as $row) {
    $options[$row["produk_nm"]] = $row["produk_nm"];
}
echo selectnya("cari", $options);
?>
            </td>
        </tr>
        <tr>
            <td>Hari Proses</td>
            <td><?php 
echo inputnya("hariproses1", "style='width:100px'") . " s/d " . inputnya("hariproses2", "style='width:100px'");
?>
 </td>
<?php

ini_set('max_execution_time', 0);
$showtable = false;
$ddl_tglpoint = array();
$setTgl = "";
if (empty($_GET["jns_pencarian"])) {
    header("location:col_sumCairTahap.php?jns_pencarian=tgl");
    exit;
}
$_POST['frm']['jns_pencarian'] = $_GET['jns_pencarian'];
if (!empty($_POST)) {
    $db_function = new db_function();
    if (strtolower($_POST['action']) == "simpan point") {
        $data = $_SESSION['colateral']['summery_bertahap'];
        $tanggal = $data[0]['tanggal'];
        $setTgl = $tanggal;
        unset($_SESSION['colateral']['summery_bertahap']);
        $db_function->exec("delete summery_bertahap where tanggal='{$tanggal}'");
        foreach ($data as $row) {
            if (intval($row['jumlah']) != 0) {
                $db_function->exec("insert into summery_bertahap values('" . $row['tanggal'] . "',\r\n                '" . $row['lnc'] . "',\r\n                '" . $row['jenis'] . "',\r\n                '" . $row['jumlah'] . "')");
            }
        }
        header("location:col_sumCairTahap.php?jns_pencarian=point&tgl_point=" . $tanggal);
        exit;
    }
    $dataLNC = $db_function->selectAllRows("select UPPER(singkatan) singkatan from master_cab order by singkatan asc");
    if ($_GET['jns_pencarian'] == "saat_ini") {
        $setTgl = date("Y-m-d");
        $sql = "select lnc,count(tgl_cair_tahap_fondasi)jml from debitur where  skim_pencairan='PARTIAL DROW DOWN' " . "and skim_pks in('KAVLING BANGUN','INDENT') and progress <> '' group by lnc";
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
ini_set('max_execution_time', 0);
$showtable = false;
$ddl_tglpoint = array();
$setTgl = "";
if (empty($_GET["jns_pencarian"])) {
    header("location:col_sumPending.php?jns_pencarian=tgl");
    exit;
}
$_POST['frm']['jns_pencarian'] = $_GET['jns_pencarian'];
if (!empty($_POST)) {
    $db_function = new db_function();
    if (strtolower($_POST['action']) == "simpan point") {
        $data = $_SESSION['colateral']['summery_pending'];
        $tanggal = $data[0]['tanggal'];
        $setTgl = $tanggal;
        unset($_SESSION['colateral']['summery_pending']);
        $db_function->exec("delete summery_pending where tanggal='{$tanggal}'");
        foreach ($data as $row) {
            if (intval($row['jumlah']) != 0) {
                $db_function->exec("insert into summery_pending values('" . $row['tanggal'] . "',\n                '" . $row['lnc'] . "',\n                '" . $row['jenis'] . "',\n                '" . $row['jumlah'] . "')");
            }
        }
        header("location:col_sumPending.php?jns_pencarian=point&tgl_point=" . $tanggal);
        exit;
    }
    $dataLNC = $db_function->selectAllRows("select UPPER(singkatan) singkatan from master_cab order by singkatan asc");
示例#17
0
<?php

require_once "functions.php";
session_start();
security::redirect_if_not_loggedin();
#Return payee default category
if (isset($_GET["get_default_category"])) {
    $ArrDefaultCategory = db_function::payee_select_one($_GET["get_default_category"]);
    echo json_encode($ArrDefaultCategory);
}
#Return subcategory
if (isset($_GET["get_subcategory"])) {
    $ArrSubCategory = db_function::subactegory_select_all($_GET["get_subcategory"]);
    echo json_encode($ArrSubCategory);
}
示例#18
0
    <link rel="stylesheet" type="text/css" href="res/bootstrap-3.2.0.min.css" />
    <link rel="stylesheet" type="text/css" href="res/bootstrap-theme-3.2.0.min.css" />
    <link rel="stylesheet" type="text/css" href="res/style_global-0.9.9.css" />

    <script src="res/jquery-2.1.1.min.js" type="text/javascript"></script>
    <script src="res/bootstrap-3.2.0.min.js" type="text/javascript"></script>
    <script src="res/functions-1.0.1.js" type="text/javascript"></script>

</head>

<body>

<?php 
$recordmaxid = db_function::transaction_select_maxid();
if ($recordmaxid > 0) {
    $resultarray = db_function::transaction_select_all_order_by_date();
    echo "<div class='container'>";
    echo "<h3 class='text_align_center'>Current pending transaction</h3>";
    echo "<br/>";
    echo "<div class='table-responsive'>";
    echo "<form id='Show_Function' class='form-show-function' method='post' action = 'show_function.php'>";
    echo "<table class = 'table table-hover table-condensed'>";
    #echo "<table class = 'table table-hover table-condensed table-bordered'>"; //TABLE BORDERED FOR DEBUG
    echo "<thead>";
    echo "<tr>";
    echo "<th>Date</th>";
    echo "<th>Type</th>";
    echo "<th>Account</th>";
    if (costant::disable_payee() == False) {
        echo "<th>Payee</th>";
    }
示例#19
0
<?php

session_start();
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
if (!empty($_SESSION['colateral'])) {
    header('location:start.php');
}
$errorBox = "";
$db_function = new db_function();
if (!empty($_POST)) {
    $pesanError = array();
    $dataUser = $db_function->selectOneRows("select * from pegawai where npp='" . $_POST['frm']['npp'] . "'");
    if (empty($dataUser)) {
        array_push($pesanError, "Pegawai Tidak Terdaftar");
    } elseif ($dataUser['PASSWORD'] != $_POST['frm']['password']) {
        array_push($pesanError, "Password salah");
    } else {
        $_SESSION['colateral']['npp'] = $dataUser["NPP"];
        $_SESSION['colateral']['nama'] = $dataUser["NAMA"];
        $_SESSION['colateral']['jabatan'] = $dataUser["JABATAN"];
        $_SESSION['colateral']['cabang'] = $dataUser["CABANG"];
        $_SESSION['colateral']['group'] = $dataUser["group"];
        header('location:start.php');
    }
    $errorBox = showMessage($pesanError);
}
示例#20
0
    #Download Attachments by name
    if (isset($_GET["download_attachment"])) {
        $AttachmentFileName = $_GET["download_attachment"];
        if (!empty($AttachmentFileName)) {
            $FullPath = costant::attachments_folder() . "/" . $AttachmentFileName;
            header("Content-Type:");
            header("Cache-Control: public");
            header("Content-Description: File Transfer");
            header("Content-Disposition: attachment; filename= " . $AttachmentFileName);
            header("Content-Transfer-Encoding: binary");
            readfile($FullPath);
        }
    }
    #Delete Attachments
    if (isset($_GET["delete_attachment"])) {
        $AttachmentFileName = $_GET["delete_attachment"];
        if (!empty($AttachmentFileName)) {
            attachments::delete_attachment_by_name($AttachmentFileName);
        }
    }
    #Delete transaction group
    if (isset($_GET["delete_group"])) {
        $deletegroup_string = $_GET["delete_group"];
        $deletegroup_array = explode(",", $deletegroup_string);
        db_function::transaction_delete_group($deletegroup_array);
        attachments::delete_group($deletegroup_array);
        echo $operation_succeded;
    }
} else {
    echo $wrong_guid;
}
示例#21
0
function validasi_form($frm)
{
    $pesanError = array();
    $db_function = new db_function();
    if (cleanstr($frm['namadebitur']) == "") {
        array_push($pesanError, "Nama Debitur Harus diisi");
    }
    if (cleanstr($frm['tgl_pk']) == "") {
        array_push($pesanError, "Tgl Perjanjian Kredit Harus diisi");
    }
    if (cleanstr($frm['jkw_kredit']) == "") {
        array_push($pesanError, "Jangka Waktu Kredit Harus diisi");
    }
    if (cleanstr($frm['fixed_rate']) == "" && preg_match("/(griya|multiguna)/", strtolower($frm['produk']))) {
        array_push($pesanError, "Masa fix rate Harus diisi");
    }
    if (cleanstr($frm['no_rekg_pinjaman']) == "") {
        array_push($pesanError, "Norek Pinjaman Harus diisi");
    }
    //validasi no_rekg_pinjaman
    $buf = $db_function->selectOnefield("select noaplikasi from debitur where no_rekg_pinjaman ='" . $frm['no_rekg_pinjaman'] . "'");
    if (cleanstr($buf) != "") {
        array_push($pesanError, "Norek Pinjaman sudah ada sebelum nya dengan no aplikasi " . $buf);
    }
    $skimPencairan = strtolower($frm['skim_pencairan']);
    $skimPks = strtolower($frm['skim_pks']);
    if ($skimPencairan == "partial drow down" && in_array($skimPks, array("kavling bangun", "indent"))) {
        if ($frm['progress'] == "") {
            array_push($pesanError, "Progress Pembangunan harus di isi untuk Partial drow down, skim pks kavling bangun/indent ");
        } elseif ($frm["progress"] != "SELESAI" && !in_array($frm['tgl_cair_tahap_dok'], array("", "00-00-0000"))) {
            array_push($pesanError, "tanggal cair tahap dok sudah di isi harap progress pembangunan = <b>selesai</b>");
        }
    }
    return $pesanError;
}
示例#22
0
function insertDebiturTrail($data, $row)
{
    if (cleanstr($data->val($row, 9)) != "") {
        $pesan = "";
        $db_function = new db_function();
        $sql = "delete from debitur_trail where no_rekg_pinjaman='" . $data->val($row, 7) . "' and no_trail='" . $data->val($row, 156) . "'";
        $pesan = $db_function->exec($sql);
        if ($pesan != "") {
            $_SESSION['colateral']['message_loop'][] = $pesan;
        }
        $sql = "insert into debitur_trail (LNC,NOAPLIKASI,NAMADEBITUR,TEMPATLAHIR,TGLLAHIR,CIF,no_rekg_pinjaman,afiliasi,instansi,produk,maksimum_kredit,no_pk,tgl_pk,jkw_kredit,fixed_rate,tgl_jt_pk,tgl_jt_fixed_rate,lokasi_dokumen_asli,amplop_asli,amplopasli,lokasi_dokumen_copy,amplop_copy,amplopcopy,jaminan,jml_jaminan,jenis_surat_tanah,alamat_collateral,luas_tanah,tgl_jt_surat_tanah,jenis_pengikatan,nilai_ht,jkw_covernote,notaris,appraisal,no_ajb,no_surat_tanah,collateral_zipcode,luas_bangunan,nilai_taksasi,harga_tanah,harga_bangunan,harga_tanah_imb,harga_bangunan_imb,no_pengikatan,tgl_covernote,tgl_jt_covernote,developer,skim_pks,no_imb,status_imb,nama_perumahan,asuransi_jiwa,no_polis_ass_jiwa,premi_jiwa,nilai_pertanggungan_ass_jiwa,tgl_ass_jiwa,tgl_jt_ass_jiwa,asuransi_kerugian,no_polis_ass_kerugian,premi_kerugian,nilai_pertanggungan_ass_kerugian,tgl_ass_kerugian,tgl_jt_ass_kerugian,jenis_kendaraan,no_bpkb,no_rangka,nama_dealer,merk,no_mesin,no_polisi,status_rekg,tgl_pelunasan,memo,skdr,siup,tdp,others,serah,kendala,tgl_update,bunga,program,agama,npwp,kelamin,tgl_imb,penilai,tgl_taksasi,tinggal,cabang,no_ktp,ibu_kandung,jabatan,memo_appraisal,plafond_dimohon,nama_emergency,telp_emergency,alamat_kantor,hubungan,progress,sales,hp_sales,kjpp,status,tgl_update_app,tgl_update_los,tgl_update_asc,skim_pencairan,input_date,no_covernote,no_covernote_n,no_pengikatan_n,tgl_penyerahan_berkas,proses_pengikatan,jenis_sertifikat,jenis_proyek,kategori_proyek,total_unitdibangun,penguasaan_sertifikat,no_rek_escrow,cair_tahap_fondasi,tgl_cair_tahap_fondasi,ket_cair_tahap_fondasi,cair_tahap_topping,tgl_cair_tahap_topping,ket_cair_tahap_topping,cair_tahap_bast,tgl_cair_tahap_bast,ket_cair_tahap_bast,cair_tahap_dok,tgl_cair_tahap_dok,ket_cair_tahap_dok,proses_agunan,no_polis_ass_kerugian_n,berkas_asuransi_kerugian,no_polis_ass_jiwa_n,berkas_assuransi_jiwa,no_jaminan_fleksi,no_jaminan_fleksi_n,jns_jaminan_fleksi,srt_pernyataan_fleksi,no_bpkb_n,tgl_serah,pelunasan_penerima,pelunasan_keterangan,siup_n,tdp_n,no_pks,tgl_pengikatan,others_n,kjpp_flag,no_ajb_n,jml_jaminan_n,userupdate,insertfrom,no_trail) values(";
        for ($col = 1; $col <= 156; $col++) {
            $value = $data->val($row, $col);
            $sql .= "'" . $value . "',";
        }
        $sql = substr($sql, 0, strlen($sql) - 1);
        $sql .= ")";
        $pesan = $db_function->exec($sql);
        if ($pesan != "") {
            $_SESSION['colateral']['message_loop'][] = "[insrt debitur trail]no_rekg_pinjaman->" . $data->val($row, 7) . ":" . $pesan;
        }
    }
}
示例#23
0
set_time_limit(0);
ini_set('memory_limit', '2500M');
ini_set('memory_limit', '-1');
if (!empty($_POST)) {
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/force-download");
    header("Content-Type: application/octet-stream");
    header("Content-Type: application/download");
    header("Content-Disposition: attachment;filename=EXPORTCADS_" . str_replace("-", "", $_POST["frm"]["tgl_awal"]) . "_" . str_replace("-", "", $_POST["frm"]["tgl_akhir"]) . ".xls ");
    header("Content-Transfer-Encoding: binary ");
    xlsBOF();
    $judulArray = array("TGL SIMPAN", "TGL. INPUT", "LNC", "NO. APLIKASI", "NAMA DEBITUR", "TEMPAT LAHIR", "TGL. LAHIR", "CIF", "NO.REKG. PINJAMAN", "AFILIASI", "INSTANSI", "PRODUK", "PLAFOND", "NO. PK", "TGL. PK", "JKW. KREDIT", "FIX RATE", "TGL. JT TEMPO", "TGL. JT FIX", "LOKASI DOK. ASLI", "NO.BANTEK ASLI", "NO. AMPLOP ASLI", "LOKASI DOK. COPY", "NO. BANTEK COPY", "NO. AMPLOP COPY", "JENIS SERTIFIKAT", "STATUS SERTIFIKAT", "NO. GS/SU", "JENIS SURAT TANAH", "ALAMAT OBYEK JAMINAN", "LUAS TANAH", "TGL.JT SURAT TANAH", "JENIS HT", "NILAI HT", "STATUS COVERNOTE", "NO COVERNOTE", "TGL. COVERNOTE", "JKW COVERNOTE", "TGL JT COVERNOTE", "NAMA NOTARIS", "NAMA PEMILIK JAMINAN", "JUMLAH JAMINAN", "STATUS AJB", "NO. AJB", "NO. KEPEMILIKAN TANAH", "COLLATERAL ZIPCODE", "LUAS BANGUNAN", "TGL. SERTIFIKAT", "HARGA TANAH", "HARGA BANGUNAN", "HARGA TANAH IMB/M2", "HARGA BANGUNAN IMB/M2", "STATUS PENGIKATAN", "NO. PENGIKATAN", "PROSES PENGIKATAN", "TGL PENGIKATAN", "TGL PENERAHAN BERKAS", "DEVELOPER", "NO PKS", "SKIM PKS", "STATUS IMB", "NO. IMB", "NAMA PROYEK", "KATEGORI PROYEK", "JENIS PROYEK", "TOTAL UNIT DI BANGUN", "PENGUASAAN SERTIFIKAT", "NO REK ESCROW", "CAIR TAHAP FONDASI", "TGL CAIR TAHAP FONDASI", "KET CAIR TAHAP FONDASI", "CAIR TAHAP TOPPING", "TANGGAL CAIR TAHAP TOPPING", "KET CAIR TAHAP TOPPING", "CAIR TAHAP BAST", "TANGGAL CAIR TAHAP BAST", "KET CAIR TAHAP BAST", "CAIR TAHAP DOK", "TANGGAL CAIR TAHAP DOK", "KET CAIR TAHAP DOK", "PROSES ANGGUNAN", "ASS. JIWA", "STATUS POLIS ASS JW", "NO.POLIS ASS JW", "PREMI ASS.JW", "NILAI PERTANGG ASS JW", "TGL. ASS JW", "TGL. JT ASS JW", "BERKAS ASURANSI JW", "ASS. KERUGIAN", "STATUS POLIS ASS KERUGIAN", "NO. POLIS ASS KERUGIAN", "PREMI KERUGIAN", "NILAI PERTGG ASS KERUGIAN", "TGL. ASS KERUGIAN", "TGL. JT ASS KERUGIAN", "BERKAS ASURANSI KERUGIAN", "JENIS KENDARAAN", "STATUS BPKB", "NO. BPKB", "NO. RANGKA", "NAMA DEALER", "MERK", "NO. MESIN", "NO. POLISI", "STATUS REKG", "TGL. LUNAS", "TANGGAL DISERAHKAN", "PENERIMA PELUNASAN", "KETERANGAN PELUNASAN", "MEMO", "SKDR", "STATUS SIUP", "SIUP", "STATUS TDP", "TDP", "STATUS OTHERS", "OTHERS", "STATUS PENYERAHAN JAMINAN", "KENDALA", "TGL. UPDATE", "BUNGA", "PROGRAM", "AGAMA", "NO. NPWP", "JENIS KELAMIN", "TGL. IMB", "PENILAI", "TGL. TAKSASI", "ALAMAT", "KODE CABANG", "NO. KTP", "IBU KANDUNG", "JABATAN", "MEMO APPRAISAL", "PLAFOND DIMOHON", "NAMA EMERGENCY", "NO.TELP. EMERGENCY", "ALAMAT KANTOR", "HUBUNGAN EMERGENCY", "PROGRESS BANGUNAN", "NAMA SALES", "NO. HP SALES", "STATUS KJPP", "KJPP", "STATUS APLIKASI", "TGL.UPDATE APP", "TGL.UPDATE LOS", "TGL.UPDATE ASC", "SKIM PENCAIRAN", "STATUS JAMINAN FLEKSI", "NO JAMINAN FLEKSI", "JENIS JAMINAN FLEKSI", "SURAT PERNYATAAN FLEKSI", "USER CREATE", "USER UPDATE");
    $db_function = new db_function();
    $sql = "select action,input_date,LNC,NOAPLIKASI,NAMADEBITUR,TEMPATLAHIR,TGLLAHIR,CIF,no_rekg_pinjaman,afiliasi,instansi,produk,maksimum_kredit,no_pk,tgl_pk,jkw_kredit,fixed_rate,tgl_jt_pk,tgl_jt_fixed_rate,lokasi_dokumen_asli,amplop_asli,amplopasli,lokasi_dokumen_copy,amplop_copy,amplopcopy,jenis_sertifikat,jaminan,jml_jaminan,jenis_surat_tanah,alamat_collateral,luas_tanah,tgl_jt_surat_tanah,jenis_pengikatan,nilai_ht,no_covernote,no_covernote_n,tgl_covernote,jkw_covernote,tgl_jt_covernote,notaris,appraisal,jml_jaminan_n,no_ajb,no_ajb_n,no_surat_tanah,collateral_zipcode,luas_bangunan,nilai_taksasi,harga_tanah,harga_bangunan,harga_tanah_imb,harga_bangunan_imb,no_pengikatan,no_pengikatan_n,proses_pengikatan,tgl_pengikatan,tgl_penyerahan_berkas,developer,no_pks,skim_pks,status_imb,no_imb,nama_perumahan,kategori_proyek,jenis_proyek,total_unitdibangun,penguasaan_sertifikat,no_rek_escrow,cair_tahap_fondasi,tgl_cair_tahap_fondasi,ket_cair_tahap_fondasi,cair_tahap_topping,tgl_cair_tahap_topping,ket_cair_tahap_topping,cair_tahap_bast,tgl_cair_tahap_bast,ket_cair_tahap_bast,cair_tahap_dok,tgl_cair_tahap_dok,ket_cair_tahap_dok,proses_agunan,asuransi_jiwa,no_polis_ass_jiwa,no_polis_ass_jiwa_n,premi_jiwa,nilai_pertanggungan_ass_jiwa,tgl_ass_jiwa,tgl_jt_ass_jiwa,berkas_assuransi_jiwa,asuransi_kerugian,no_polis_ass_kerugian,no_polis_ass_kerugian_n,premi_kerugian,nilai_pertanggungan_ass_kerugian,tgl_ass_kerugian,tgl_jt_ass_kerugian,berkas_asuransi_kerugian,jenis_kendaraan,no_bpkb,no_bpkb_n,no_rangka,nama_dealer,merk,no_mesin,no_polisi,status_rekg,tgl_pelunasan,tgl_serah,pelunasan_penerima,pelunasan_keterangan,memo,skdr,siup,siup_n,tdp,tdp_n,others,others_n,serah,kendala,tgl_update,bunga,program,agama,npwp,kelamin,tgl_imb,penilai,tgl_taksasi,tinggal,cabang,no_ktp,ibu_kandung,jabatan,memo_appraisal,plafond_dimohon,nama_emergency,telp_emergency,alamat_kantor,hubungan,progress,sales,hp_sales,kjpp_flag,kjpp,status,tgl_update_app,tgl_update_los,tgl_update_asc,skim_pencairan,no_jaminan_fleksi,no_jaminan_fleksi_n,jns_jaminan_fleksi,srt_pernyataan_fleksi,usercreate,userupdate from debitur ";
    $sql .= "where tgl_update>= '" . balikTgl($_POST["frm"]["tgl_awal"]) . " 00:00:00' and tgl_update<='" . balikTgl($_POST["frm"]["tgl_akhir"]) . " 23:59:59'";
    $dataArray = $db_function->selectAllRows($sql);
    xlsWriteLabel(0, 0, "[debitur]");
    $row = 1;
    foreach ($judulArray as $col => $data) {
        xlsWriteLabel($row, $col, $data);
    }
    $row++;
    foreach ($dataArray as $data) {
        foreach ($judulArray as $col => $judul) {
            $kata = $data[$col];
            if (strlen($kata) > 1000) {
                $kata = substr($kata, 0, 1000);
            }
示例#24
0
function json_sumDetCair()
{
    $db_function = new db_function();
    $lnc = $_GET['lnc'];
    $jns = $_GET['jns'];
    $page = $_GET['page'];
    $limit = $_GET['rows'];
    $sidx = $_GET['sidx'];
    $sord = $_GET['sord'];
    $tgl = $_GET['tgl'];
    if ($limit == "") {
        $limit = 10;
    }
    $tgl_update = $tgl . " 23:59:59";
    $sql = "select trail.noaplikasi,trail.namadebitur,trail.no_rekg_pinjaman,trail.tgl_pk ,trail.tgl_cair_tahap_fondasi,trail.tgl_cair_tahap_topping,trail.tgl_cair_tahap_bast,trail.tgl_cair_tahap_dok \n            from debitur join debitur_trail trail on debitur.no_rekg_pinjaman=trail.no_rekg_pinjaman\n            join (\n            select max(tgl_update) tgl_update,no_rekg_pinjaman from debitur_trail where tgl_update <= '{$tgl_update}'  group by no_rekg_pinjaman) bb\n            on trail.no_rekg_pinjaman=bb.no_rekg_pinjaman and trail.tgl_update=bb.tgl_update\n            where 1=1 and trail.skim_pencairan='PARTIAL DROW DOWN' and trail.skim_pks in('KAVLING BANGUN','INDENT') :paramwhere: group by trail.lnc";
    if (isset($_GET['searchValue']) && trim($_GET['searchValue']) != "") {
        $sql .= " and " . $_GET['searchBy'] . " like '%" . $_GET['searchValue'] . "%' ";
    }
    switch ($jns) {
        case "debitur":
            $sql = str_replace(":paramwhere:", "and trail.progress <>'' ", $sql);
            break;
        case "pondasi":
            $sql = str_replace(":paramwhere:", "and trail.progress='BELUM SELESAI' and trail.tgl_cair_tahap_fondasi  in(null,'','0000-00-00') ", $sql);
            break;
        case "topping":
            $sql = str_replace(":paramwhere:", "and trail.progress='BELUM SELESAI' and trail.tgl_cair_tahap_fondasi >'0000-00-00' and trail.tgl_cair_tahap_topping in(null,'','0000-00-00') ", $sql);
            break;
        case "bast":
            $sql = str_replace(":paramwhere:", "and trail.progress='BELUM SELESAI' and trail.tgl_cair_tahap_topping >'0000-00-00' and trail.tgl_cair_tahap_bast in(null,'','0000-00-00') ", $sql);
            break;
        case "dokumen":
            $sql = str_replace(":paramwhere:", "and trail.progress='BELUM SELESAI' and trail.tgl_cair_tahap_bast >'0000-00-00' and trail.tgl_cair_tahap_dok in(null,'','0000-00-00') ", $sql);
            break;
        case "inprogress":
            $sql = str_replace(":paramwhere:", "and trail.progress='SELESAI' ", $sql);
            break;
        case "selesai":
            $sql .= "AND progress='SELESAI'";
            break;
    }
    $sqlCount = "select count(*) from ({$sql}) test";
    $count = $db_function->selectOnefield($sqlCount);
    if ($count > 0 && $limit > 0) {
        $total_pages = ceil($count / $limit);
    } else {
        $total_pages = 0;
    }
    if ($page > $total_pages) {
        $page = $total_pages;
    }
    $start = $limit * $page - $limit;
    if ($start < 0) {
        $start = 0;
    }
    $sqlDt = "select * from ({$sql})temp LIMIT {$start} , {$limit}";
    $query = $db_function->selectAllRows($sqlDt);
    $responce['page'] = $page;
    $responce['total'] = $total_pages;
    $responce['records'] = $count;
    $i = 0;
    foreach ($query as $row) {
        $row['tgl_pk'] = balikTgl($row['tgl_pk']);
        $row['tgl_cair_tahap_fondasi'] = cleanDate(balikTgl($row['tgl_cair_tahap_fondasi']));
        $row['tgl_cair_tahap_topping'] = cleanDate(balikTgl($row['tgl_cair_tahap_topping']));
        $row['tgl_cair_tahap_bast'] = cleanDate(balikTgl($row['tgl_cair_tahap_bast']));
        $row['tgl_cair_tahap_dok'] = cleanDate(balikTgl($row['tgl_cair_tahap_dok']));
        $responce['rows'][$i]['id'] = $i;
        $responce['rows'][$i]['cell'] = $row;
        $i++;
    }
    echo json_encode($responce);
    exit;
}