-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsgfromadmin.php
117 lines (95 loc) · 3.7 KB
/
msgfromadmin.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
<?php
require_once "header.php";
require_once "dbcon.php";
?>
<section class="content-header">
<h1>
Recieved Notifications
<small>
<?php
$sql="SELECT COUNT(id) AS msg FROM notification WHERE salesrep ='$id'";
$sql= mysqli_query($con,"SELECT COUNT(id) AS msg FROM notification WHERE salesrep ='$id'");
$total= mysqli_fetch_array($sql);
echo $total['msg'];
?>
Message Notifications</small>
</h1>
<ol class="breadcrumb">
<li><a href="home"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Inbox</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- /.col -->
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Inbox</h3>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="table-responsive mailbox-messages">
<table class="table table-hover table-striped" id="example2">
<thead>
<tr>
<th>Date Sent</th>
<th>Sender</th>
<th>Lead </th>
<th>Message</th>
<th>Reply</th>
</tr>
</thead>
<tbody>
<?php
$q=mysqli_query($con,"SELECT * FROM notification WHERE salesrep= '$id'");
while($qr=mysqli_fetch_array($q)){
$sender = $qr['sender'];
$msg= $qr['message'];
$leadref= $qr['ref'];
$date= $qr['date'];
//lead details
$qqr= mysqli_query($con, "SELECT name, company, designation FROM lead WHERE id = '$leadref' ");
$qqr= mysqli_fetch_array($qqr);
$name=$qqr['name'];
$company=$qqr['company'];
$role=$qqr['designation'];
//sender detial
$qqe= mysqli_query($con, "SELECT name FROM salesrep WHERE id = '$sender' ");
$qqe= mysqli_fetch_array($qqe);
$sendername=$qqe['name'];
echo'
<tr>
<td><input type="checkbox">'.$date.'</td>
<td class="mailbox-name"><a href="#">'.$sendername.'</i></a></td>
<td class=""><b>'.$name.'</b> <br> '.$role.' of '.$company.' </td>
<td class="mailbox-subject">'.$msg.'</td>
<td class="Reply">
<a href="reply?leadid='.$leadref.'& adminid='.$sender.'" title=" Reply Sender">Reply</a>
</td>
</tr>';
}
?>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
<div class="box-footer no-padding">
</div>
</div>
<!-- /. box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<?php
require_once "footer.php";
?>