-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhalamanmessage.php
More file actions
97 lines (95 loc) · 2.36 KB
/
halamanmessage.php
File metadata and controls
97 lines (95 loc) · 2.36 KB
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
<html>
<body>
<div id="isi">
<form action="kirimmhs.php" method="POST">
<table border="0">
<tr>
<td><font color="white">To</font></td>
<td><font color="white">:</font></td>
<td><input type="text" name="tujuan" /><font color="white">* Masukkan NIM/NIP</font></td>
</tr>
<tr>
<td><font color="white">Subject</font></td>
<td><font color="white">:</font></td>
<td><input type="text" name="subject" size="40" /></td>
</tr>
<tr>
<td><font color="white">Mail</font></td>
<td><font color="white">:</font></td>
<td>
<textarea cols="40" rows="10" name="isi"></textarea>
</td>
</tr>
<tr>
<td colspan="3">
<center>
<input type="submit" value="Kirim" />
<input type="reset" value="Cancel" />
</center>
</td>
</tr>
</table>
</form>
</div>
<div id="inbox">
<table border="0" cellspacing="35">
<tr>
<td colspan="2"><font color="white"><b>Inbox</b></font></td>
</tr>
<?php
session_start();
include "koneksi.php";
$to = $_SESSION['user'];
$no = 1;
$in = "SELECT * FROM datapesan WHERE ke='$to' ORDER BY tanggal DESC;";
$queryin = mysql_query($in);
while($hasil = mysql_fetch_array($queryin)) {
$sub = $hasil['subject'];
$from = $hasil['dari'];
$isi = $hasil['isi'];
$tgl = $hasil['tanggal'];
?>
<tr>
<td><font color="white">From: <?php echo $from; ?></font></td>
<td><font color="white"><?php echo $isi; ?></font></td>
<td><font color="white"><?php echo $tgl; ?></font></td>
</tr>
<?php
$no++;
}
?>
</table>
</div>
<div id="outbox">
<table border="0" cellspacing="35">
<tr>
<td colspan="2"><font color="white"><b>Outbox</b></font></td>
</tr>
<?php
session_start();
include "koneksi.php";
$from = $_SESSION['user'];
$no = 1;
$out = "SELECT * FROM datapesan WHERE dari='$from' ORDER BY tanggal DESC;";
$queryout = mysql_query($out);
while($hsl = mysql_fetch_array($queryout)) {
$sub = $hsl['subject'];
$to = $hsl['ke'];
$isi = $hsl['isi'];
$tgl = $hsl['tanggal'];
?>
<tr>
<font color="white">
<td><font color="white">To: <?php echo $to; ?></font></td>
<td><font color="white"><?php echo $isi; ?></font></td>
<td><font color="white"><?php echo $tgl; ?></font></td>
</font>
</tr>
<?php
$no++;
}
?>
</table>
</div>
</body>
</html>