-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathviewmessage.php
More file actions
126 lines (110 loc) · 4.05 KB
/
Copy pathviewmessage.php
File metadata and controls
126 lines (110 loc) · 4.05 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
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
<?php
session_start();
include("header.php");
include("dbconnection.php");
$dttim = date("Y-m-d h:i:s");
$result = mysql_query("SELECT * FROM message where msgid='$_GET[msgid]'");
while($row = mysql_fetch_array($result))
{
$msgid = $row[msgid];
$sender = $row[senderid];
$receiver = $row[receiverid];
$msgtitle = $row[msgtitle];
$msg = $row[msg];
$tdatetime = $row[datetime];
}
$resulta = mysql_query("SELECT * FROM message where replyid='$_GET[msgid]'");
$replycount = mysql_num_rows($resulta);
?>
<div id="templatemo_content">
<div id="templatemo_content_left">
<div class="header_02"><a href="inbox.php">Inbox</a></div>
<p class="bi_para"><a href="message.php">Send Message</a> <?php echo $msgres; ?></p>
<form id="form1" name="form1" method="post" action="message.php">
<table width="500" border="1">
<tr>
<th colspan="2" scope="col">View message</th>
</tr>
<tr>
<td width="125" height="30"><strong>Sender :
</strong></td>
<td width="359"> <strong><?php echo $sender; ?></strong></td>
</tr>
<tr>
<td height="29"><strong>Date Time : </strong></td>
<td> <strong><?php echo $dttim; ?></strong></td>
</tr>
<tr>
<td height="33"><strong>Message title :</strong></td>
<td height="33"> <strong><?php echo $msgtitle; ?></strong></td>
</tr>
<tr>
<td height="107" valign="top"><strong>Message: </strong></td>
<td height="107" valign="top"> <strong><?php echo $msg; ?></strong></td>
</tr>
<tr>
<td> </td>
<td>
<input type="hidden" name="messageid" value="<?php echo $msgid; ?>" />
<input type="hidden" name="senderid" value="<?php echo $sender; ?>" />
<input type="submit" name="reply" id="reply" value="Reply" /></td>
</tr>
</table>
</form>
<?php
if($replycount>=1)
{
echo "<p><strong> Replies:</strong></p>";
while($rowas = mysql_fetch_array($resulta))
{
?>
<table width="500" border="1">
<tr>
<td width="125" height="30"><strong>Sender : </strong></td>
<td width="359"> <strong><?php echo $rowas["senderid"]; ?></strong></td>
</tr>
<tr>
<td height="29"><strong>Date Time : </strong></td>
<td> <strong><?php echo $rowas["datetime"]; ?></strong></td>
</tr>
<tr>
<td height="33"><strong>Message title : </strong></td>
<td height="33"> <strong><?php echo $rowas["msgtitle"]; ?></strong></td>
</tr>
<tr>
<td height="57" valign="top"><strong>Message: </strong></td>
<td height="57" valign="top"> <strong><?php echo $rowas["msg"]; ?></strong></td>
</tr>
</table>
<br />
<?php
}
}
?>
<p>
</p>
<div class="rc_btn_02"></div>
<div class="margin_bottom_40"></div>
<div class="cleaner"></div>
</div> <!-- end of content left -->
<div id="templatemo_content_right">
<div class="content_right_section">
<?php
if($_SESSION["login"] == "admin")
{
include("adminsidebar.php");
}
else
{
include("empsidebar.php");
}
?>
<div class="margin_bottom_20"></div>
<a href="http://jigsaw.w3.org/css-validator/check/referer"></a>
</div>
</div> <!-- end of content right -->
<div class="cleaner"></div>
</div>
<?php
include("footer.php");
?>