/
lihat_fix.php
293 lines (263 loc) · 8.99 KB
/
lihat_fix.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?php include 'collateral_script/session_head.php'; ?>
<?php include 'collateral_script/head.php'; ?>
<?php include 'collateral_script/db_function.php';?>
<?php include 'collateral_script/function.php';?>
<div style="margin:0px 50px;text-align: left;">
<form name=biodata method=get action=lihat_fix.php>
<p class="style11">
<INPUT type=radio name=pilih value=status_rekg checked>
MONITORING BUNGA & JATUH TEMPO FIX RATE PER PERIODE<br>
</p>
<table>
<tr>
<td>Nama LNC</td>
<td><?=selectLNC("LNC","style='width:100px'") ?></td>
</tr>
<tr>
<td>Tgl Jth Tempo SHGB</td>
<td> <?=inputnya("tgl_awal",'style="width:100px" onClick="if(self.gfPop)gfPop.fPopCalendar(document.biodata.tgl_awal);return false;"') ?>
s/d <?=inputnya("tgl_akhir",'style="width:100px" onClick="if(self.gfPop)gfPop.fPopCalendar(document.biodata.tgl_awal);return false;"') ?>
</td>
</tr>
<tr>
<td>Hari Proses</td>
<td><?= inputnya("hariproses1","style='width:100px'")." s/d ".inputnya("hariproses2","style='width:100px'") ?> </td>
</tr>
</table>
<p class="style11">
<input type=submit name=oke value=Cari>
</p>
</form>
<div align="center">
<div align="center">
<?php
$tgl_awal = $_POST['tgl_awal'];
$tgl_akhir = $_POST['tgl_akhir'];
$oke=$_GET['oke'];
if ($oke=='Cari'){
Include ("koneksi.php");
Include ("inc.librari.php");
mysql_select_db("collateral_db");
//Langkah 1
$batas = 100000;
$halaman = $_GET['halaman'];
if(empty($halaman)){
$posisi = 0;
$halaman = 1;
}
else{
$posisi=($halaman-1)* $batas;}
$warna1 = "#DBDBA6"; // baris genap berwarna tua
$warna2 = "#F2F2DF"; // baris ganjil berwarna muda
$warna = $warna1; // warna default
//Langkah 2
$cari=$_GET['cari'];
$pilih=$_GET['pilih'];
$lnc=$_GET['LNC'];
$nama=$_GET['NAMADEBITUR'];
$bpkb=$_GET['no_bpkb'];
$ajb=$_GET['no_ajb'];
$aplikasi=$_GET['NOAPLIKASI'];
$notaris=$_GET['no_pengikatan'];
$developer=$_GET['developer'];
$assjiwa=$_GET['no_polis_ass_jiwa'];
$asskerugian=$_GET['no_polis_ass_kerugian'];
$tgl_pk=$_GET['tgl_pk'];
$maksimum_kredit=$_GET['maksimum_kredit'];
$nilai_ht=$_GET['nilai_ht'];
$today=date(Ymd);
$tgl_jt_pk = $_POST['tgl_jt_pk'];
$a=$today>40;
if($pilih == "status_rekg")
{
$a = "MONITORING BUNGA & JATUH TEMPO FIX RATE PER PERIODE";
}
elseif($pilih == "no_polis_ass_jiwa")
{
$a = "MONITORING ASURANSI JIWA";
}
elseif($pilih == "no_polis_ass_kerugian")
{
$a = "MONITORING ASURANSI KERUGIAN";
}
elseif($pilih == "no_ajb")
{
$a = "MONITORING AKTA JUAL BELI";
}
$sqlHariProsses="";
if(intval($_GET['hariproses1'])&&intval($_GET['hariproses2']))
{
$sqlHariProsses=" and DATEDIFF(now(),tgl_pk) >= ".$_GET['hariproses1']." and DATEDIFF(now(),tgl_pk) <= ".$_GET['hariproses2'];
}
$tampil=mysql_query("SELECT NOAPLIKASI,NAMADEBITUR,no_rekg_pinjaman,produk,program,tgl_pk,bunga,fixed_rate,tgl_jt_fixed_rate,no_rekg_pinjaman,DATEDIFF(now(),tgl_pk)hari_proses FROM debitur WHERE $pilih='AKTIF' $sqlHariProsses ".(($lnc=="all")?"":"AND LNC='$lnc'")." AND debitur.tgl_jt_fixed_rate between '$_GET[tgl_awal]' AND '$_GET[tgl_akhir]' ORDER BY tgl_jt_fixed_rate ASC");
$jumlah= mysql_num_rows($tampil);
if ($jumlah > 0) {
echo "<br><p class=style11><b>$a $_GET[tgl_awal] S/D $_GET[tgl_akhir] LNC $lnc</b></p><table class='tblLookup' border='1px'>
<thead>
<tr>
<th>NO.</th>
<th>NO. APLIKASI</th>
<th>NAMA DEBITUR</th>
<th widht=20>NO. REK. PINJAMAN</th>
<th>JENIS PRODUK</th>
<th>PROGRAM</th>
<th>MAKSIMUM KREDIT</th>
<th width=65>TGL. PK</th>
<th width=65>Hari Proses</th>
<th>BUNGA</th>
<th width=65>MASA FIX RATE</th>
<th width=65>TGL. JATUH TEMPO FIX RATE</th>
<th width=10>ACTION</th></th>
</tr></thead>";
$no=$posisi+1;
While ($r=mysql_fetch_array($tampil)){
if($warna == $warna1){
$warna = $warna2;
}
else{
$warna = $warna1;
}
//ngitung jumlah pada tabel
$allx = "SELECT SUM(maksimum_kredit) AS total_max FROM debitur WHERE $pilih='AKTIF' $sqlHariProsses ".(($lnc=="all")?"":"AND LNC='$lnc'")." AND debitur.tgl_jt_fixed_rate between '$_GET[tgl_awal]' AND '$_GET[tgl_akhir]' ORDER BY debitur.tgl_jt_fixed_rate DESC ";
$result = mysql_query($allx) or die
(mysql_error());
$t = mysql_fetch_array($result);
$xxx = number_format($t['total_max'],0,',','.');
//ngitung selisih tgl
$tgl2=$r['tgl_jt_pk'];
$tgl1=date('Y-m-d');
// memecah tanggal untuk mendapatkan bagian tanggal, bulan dan tahun
// dari tanggal pertama
$pecah1 = explode("-", $tgl1);
$date1 = $pecah1[2];
$month1 = $pecah1[1];
$year1 = $pecah1[0];
// memecah tanggal untuk mendapatkan bagian tanggal, bulan dan tahun
// dari tanggal kedua
$pecah2 = explode("-", $tgl2);
$date2 = $pecah2[2];
$month2 = $pecah2[1];
$year2 = $pecah2[0];
// menghitung JDN dari masing-masing tanggal
$jd1 = GregorianToJD($month1, $date1, $year1);
$jd2 = GregorianToJD($month2, $date2, $year2);
// hitung selisih hari kedua tanggal
$selisih = $jd2 - $jd1;
$aaa = 40;
$c1 = 0;
$bbb = $selisih < $c1;
$c2 = $selisih < $aaa;
$ab = "JATUH TEMPO";
$count = "AKAN JATUH TEMPO";
$st = "AKTIF";
$slsh = number_format($selisih,0,',','.');
$rupiah= number_format($r['maksimum_kredit'],0,',','.');
if ($bbb==1){
$bbb=$st;
}
elseif ($c2==1){
$bbb=$count;
}
else {
$bbb = $ab;
}
if ($bbb=='JATUH TEMPO'){
Echo "
<tr bgcolor=$warna>
<td>$no</td>
<td align='center'>$r[NOAPLIKASI]</td>
<td>$r[NAMADEBITUR]</td>
<td align='right'>$r[no_rekg_pinjaman]</td>
<td align='center'>$r[produk]</td>
<td align='center'>$r[program]</td>
<td align='right'>$rupiah</td>
<td align='center'>$r[tgl_pk]</td>
<td align='center'>$r[hari_proses]</td>
<td align='center'>$r[bunga]</td>
<td align='center'>$r[fixed_rate]</td>
<td align='center'><blink><b>$r[tgl_jt_fixed_rate]</td>
<td align='center'><a href=edit_data_debitur.php?id=$r[no_rekg_pinjaman]>Edit
</tr>";
$no++;
}
elseif ($bbb=='AKAN JATUH TEMPO'){
Echo "
<tr bgcolor=$warna>
<td><font color='blue'><b>$no</td>
<td align='center'><font color='blue'><b>$r[NOAPLIKASI]</td>
<td><font color='blue'><b>$r[NAMADEBITUR]</td>
<td align='right'><font color='blue'><b>$r[no_rekg_pinjaman]</td>
<td align='center'><font color='blue'><b>$r[produk]</td>
<td align='center'><font color='blue'><b>$r[program]</td>
<td align='right'><font color='blue'><b>$rupiah</td>
<td align='center'><font color='blue'><b>$r[tgl_pk]</td>
<td align='center'><b>$r[hari_proses]</td>
<td align='center'><font color='blue'><b>$r[bunga]</td>
<td align='center'><font color='blue'><b>$r[fixed_rate]</td>
<td align='center'><font color='blue'><b>$r[tgl_jt_fixed_rate]</td>
<td align='center'><a href=edit_data_debitur.php?id=$r[NOAPLIKASI]>Edit
</tr>";
$no++;
}
else {
Echo "
<tr bgcolor=$warna>
<td><b>$no</td>
<td align='center'><b>$r[NOAPLIKASI]</td>
<td><b>$r[NAMADEBITUR]</td>
<td align='right'><b>$r[no_rekg_pinjaman]</td>
<td align='center'><b>$r[produk]</td>
<td align='right'><b>$r[program]</td>
<td align='right'><b>$rupiah</td>
<td align='center'><b>$r[tgl_pk]</td>
<td align='center'><b>$r[hari_proses]</td>
<td align='right'><b>$r[bunga]</td>
<td align='center'><b>$r[fixed_rate]</td>
<td align='center'><b>$r[tgl_jt_fixed_rate]</td>
<td align='center'><a href=edit_data_debitur.php?id=$r[NOAPLIKASI]>Edit
</tr>";
$no++;
}
}
echo "</table>";
//Langkah 3 : Hitung total data dan halaman serta link 1,2,3
$tampil2 = mysql_query("SELECT * FROM debitur WHERE $pilih LIKE 'AKTIF' AND LNC LIKE '$lnc' AND debitur.tgl_jt_fixed_rate between '$_GET[tgl_awal]' AND '$_GET[tgl_akhir]' $sqlHariProsses ORDER BY tgl_jt_fixed_rate DESC ");
$jmldata = mysql_num_rows($tampil2);
$jmlhalaman = ceil($jmldata/$batas);
$file = "lihat_fix.php";
$jmldata = number_format($jmldata,0,',','.');
//Link ke halaman sebelumnya (previous)
//if ($halaman>1){
// $previous = $halaman-1;
// echo "<A HREF=$file?halaman=1> << First </A> |
// <A HREF=$file?halaman=$previous> < Previous </A> | ";
//}
//else{
// echo "<< First | < Previous | "; }
//Tampilkan link halaman 1,2,3,...
//for ($i=1;$i<=$jmlhalaman;$i++)
//if ($i !=$halaman){
// echo "<a href=$file?halaman=$i>$i</A> | ";}
//else{
// echo "<b>$i</b> | ";}
//Link ke halaman berikutnya (Next)
//if ($halaman < $jmlhalaman){
// $next = $halaman+1;
// echo "<A HREF=$file?halaman=$next> Next > </A> |
// <A HREF=$file?halaman=$jmlhalaman> Previous >> </A> | ";
//}
//else{
// echo "Next > | Last >>";}
echo "<b><font color='blue'><p>TOTAL NOMINAL LNC $lnc : $jmldata DEBITUR - Rp. $xxx</b> </font>";
//echo "<p>TOTAL DATA <b>$a dari LNC $lnc</b> : <b>$jmldata</b> DEBITUR </p>";
}
else{
echo "<br><p class=style11><b>Maaf, data <b>$a $_GET[tgl_awal] S/D $_GET[tgl_akhir] dari LNC $lnc</b> yang anda cari tidak ada pada database !!!</b></p>";
}
}
?>
</div>
</div>
<!-- PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=174 height=189 name="gToday:normal:./calender/agenda.js" id="gToday:normal:./calender/agenda.js" src="./calender/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>