-
Notifications
You must be signed in to change notification settings - Fork 1
/
Report.php
47 lines (39 loc) · 928 Bytes
/
Report.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
<?php
$rpt_file = $_REQUEST['rpt_file'];
require_once("Java.inc");
java_require("./");
//$rpt = new java("com.jeki.Report","Reports/".$rpt_file);
$rpt = new java("com.jeki.Report","Reports/".$rpt_file,true);
/*$rpt->setDataRow(
array(
array("kelamin","Pria"),
array("agama","Protestan"),
array("alamat","Sidoarjo"),
array("ijazah_terakhir1","SMP")
)
);
/**/
if(isset($_POST['params'])){
$params = json_decode($_POST['params'],true);
foreach($params as $key=>$param){
$rpt->setParams($key,$param);
}
}
if(isset($_POST['fields'])){
$fields = json_decode($_POST['fields'],true);
foreach($fields as $d){
$rpt->setDataRow($d);
}
}
if(isset($_POST['struk'])){
if(get_magic_quotes_gpc()){
$struk = stripslashes($_POST['struk']);
}else{
$struk = $_POST['struk'];
}
$struk = json_decode($struk);
$rpt->setDataRow($struk);
}
$rpt->report();
die();
?>