-
Notifications
You must be signed in to change notification settings - Fork 7
/
halaman_print.php
executable file
·158 lines (108 loc) · 2.85 KB
/
halaman_print.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
<?php
//ambil nilai
require("inc/config.php");
require("inc/fungsi.php");
require("inc/koneksi.php");
$tpl = LoadTpl("template/window.html");
nocache;
//nilai
$filenya = "halaman.php";
$kd = nosql($_REQUEST['kd']);
//PROSES ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//re-direct print...
$ke = "$filenya?kd=$kd";
$diload = "window.print();location.href='$ke'";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//detail
$qku = mysql_query("SELECT cp_artikel.*, cp_m_kategori.nama AS katnama ".
"FROM cp_artikel, cp_m_kategori ".
"WHERE cp_artikel.kd_kategori = cp_m_kategori.kd ".
"AND cp_artikel.kd = '$kd'");
$rku = mysql_fetch_assoc($qku);
$ku_katkd = nosql($rku['kd_kategori']);
$ku_katnama = balikin($rku['katnama']);
$ku_judul2 = balikin($rku['judul']);
$ku_isi = balikin($rku['isi']);
$ku_postdate = $rku['postdate'];
//pecah titik - titik
$ku_isi2 = pathasli1($ku_isi);
//judul
$judul = "$ku_judul2";
$judulku = $judul;
//isi *START
ob_start();
//view //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '<form action="'.$filenya.'" method="post" name="formx">
<table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr valign="top">
<td bgcolor="white">
<p>
<h1>
'.$ku_judul2.'
</h1>
<i>
Dikirim : <b>'.$ku_postdate.'</b>
</i>
<br>
<p>
'.$ku_isi2.'
</p>
<br>
<br>
<hr>';
//query
$qku2 = mysql_query("SELECT cp_artikel_komentar.* ".
"FROM cp_artikel_komentar ".
"WHERE cp_artikel_komentar.kd_artikel = '$kd'");
$rku2 = mysql_fetch_assoc($qku2);
$tku2 = mysql_num_rows($qku2);
if ($qku2 != 0)
{
//view data
echo '<table width="100%" border="0" cellspacing="3" cellpadding="3">';
do
{
//nilai
$nomer = $nomer + 1;
$i_kd = nosql($rku2['kd']);
$i_nama = balikin($rku2['nama']);
$i_alamat = balikin($rku2['alamat']);
$i_email = balikin($rku2['email']);
$i_isi = balikin($rku2['isi']);
$i_postdate = $rku2['postdate'];
echo "<tr valign=\"top\" bgcolor=\"$warna\" onmouseover=\"this.bgColor='$warnaover';\" onmouseout=\"this.bgColor='$warna';\">";
echo '<td>
'.$i_isi.'
<br>
<i>
['.$i_nama.']. ['.$i_alamat.']. ['.$i_email.']. ['.$i_postdate.'].
</i>
</td>
</tr>';
}
while ($rku2 = mysql_fetch_assoc($qku2));
echo '</table>';
}
else
{
echo '<p>
<font color="blue">
<strong>BELUM ADA DATA.</strong>
</font>
</p>';
}
echo '</td>
</tr>
</table>
<br>
</form>';
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//isi
$isi = ob_get_contents();
ob_end_clean();
require("inc/niltpl.php");
//diskonek
xclose($koneksi);
exit();
?>