MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
mreport.class
Ir para a documentação deste ficheiro.
1
<?php
2
7
class
MReport
8
{
9
}
7
class
MReport
{
…
};
10
15
class
MCrystalReport
extends
MReport
16
{
17
21
var
$filetype
;
// pdf doc xls rtf htm rpt
22
26
var
$dsodbc
;
// CROR7 CROR8V36
27
31
var
$fileout
;
32
36
var
$fileexp
;
37
41
var
$objDb
;
42
46
var
$db
;
47
58
function
__construct
(
$db
=
'admin'
,
$dsodbc
=
'CROR8V36'
)
59
{
60
global
$MIOLO
;
61
$this->db =
$db
;
62
$this->objDb =
$MIOLO
->GetDatabase(
$db
);
63
$this->dsodbc =
$dsodbc
;
64
}
58
function
__construct
(
$db
=
'admin'
,
$dsodbc
=
'CROR8V36'
) {
…
}
65
79
function
Execute
($module, $name, $parameters =
null
, $rangeparam =
null
,
$filetype
=
'pdf'
)
80
{
81
global
$MIOLO
, $page;
82
83
//var_dump($this->objDb);
84
$db
= $this->objDb->db;
85
$user = $this->objDb->user;
86
$pass = $this->objDb->pass;
87
$this->filetype =
$filetype
;
88
$filein =
$MIOLO
->GetModulePath($module,
'reports/'
. $name .
'.rpt'
);
89
$nameo = uniqid(md5(uniqid(
""
)));
90
$this->fileexp =
$MIOLO
->html_home .
'/reports/'
. $nameo .
'.'
.
$this->filetype
;
91
$this->fileout =
$MIOLO
->url_base .
$MIOLO
->reports_home .
'/'
. $nameo .
'.'
.
$this->filetype
;
92
$cmd =
$MIOLO
->miolo_home .
'/crexport.exe '
.
'-U'
.
"\"$user\""
.
' '
.
'-P'
.
"\"$pass\""
.
' '
.
'-F'
93
. $filein .
' '
.
'-O'
. $this->fileexp .
' '
.
'-E'
. $this->filetype .
' -S'
. $this->dsodbc
94
.
' -D'
.
$db
.
' -XFile '
;
95
96
if
(is_array($parameters))
97
{
98
$n = count($parameters);
99
$cmd .=
'-N'
. $n .
' '
;
100
101
foreach
($parameters as $pn => $pv)
102
{
103
$cmd .=
'-A'
. $pn .
" -J\""
. $pv .
"\" "
;
104
}
105
}
106
107
if
(is_array($rangeparam))
108
{
109
$n = count($rangeparam);
110
$cmd .=
'-M'
. $n .
' '
;
111
112
foreach
($rangeparam as $pn => $pv)
113
{
114
$cmd .=
'-B'
. $pn .
" -V\""
. $pv .
"\" "
;
115
}
116
}
117
118
$p_db =
$this->db
;
119
$p_m = $module;
120
$p_f = $name .
'.rpt'
;
121
$p_o = $nameo .
'.'
.
$this->filetype
;
122
$p_par =
'-E'
. $this->filetype .
' -S'
. $this->dsodbc .
' -XFile '
;
123
124
if
(is_array($parameters))
125
{
126
$n = count($parameters);
127
$p_par .=
'-N'
. $n .
' '
;
128
129
foreach
($parameters as $pn => $pv)
130
{
131
$p_par .=
'-A'
. $pn .
" -J!$pv! "
;
132
}
133
}
134
135
if
(is_array($rangeparam))
136
{
137
$n = count($rangeparam);
138
$p_par .=
'-M'
. $n .
' '
;
139
140
foreach
($rangeparam as $pn => $pv)
141
{
142
$p_par .=
'-B'
. $pn .
" -V!$pv! "
;
143
}
144
}
145
146
// var_dump($cmd);
147
// exec($cmd, $a, $retcode);
148
$this->fileout
149
=
"http://creta.cpd.ufjf.br:8080/crreport.php?p_db=$p_db&p_m=$p_m&p_f=$p_f&p_o=$p_o&p_par=$p_par"
;
150
//echo $this->fileout;
151
//var_dump($this->fileout);
152
// var_dump($a);
153
// var_dump($retcode);
154
155
}
79
function
Execute
($module, $name, $parameters =
null
, $rangeparam =
null
,
$filetype
=
'pdf'
) {
…
}
156
}
15
class
MCrystalReport
extends
MReport
{
…
};
157
?>
MCrystalReport
Definição
mreport.class:16
MCrystalReport\Execute
Execute($module, $name, $parameters=null, $rangeparam=null, $filetype='pdf')
Definição
mreport.class:79
MCrystalReport\$db
$db
Definição
mreport.class:46
MCrystalReport\$filetype
$filetype
Definição
mreport.class:21
MCrystalReport\$fileout
$fileout
Definição
mreport.class:31
MCrystalReport\$objDb
$objDb
Definição
mreport.class:41
MCrystalReport\$dsodbc
$dsodbc
Definição
mreport.class:26
MCrystalReport\$fileexp
$fileexp
Definição
mreport.class:36
MCrystalReport\__construct
__construct($db='admin', $dsodbc='CROR8V36')
Definição
mreport.class:58
MReport
Definição
mreport.class:8
$MIOLO
$MIOLO
Definição
mdatetimefield.class:25
classes
ui
reports
mreport.class
Gerado por
1.10.0