| Current Path : /home/bolconlineco/public_html/aaaaaa/coordinator/ |
| Current File : /home/bolconlineco/public_html/aaaaaa/coordinator/outbox_serach.php |
<?php include('../includes/connection/func.inc.php');
$name = $_REQUEST['name'];
$sql = "select rollno from student where fname like '%$name%' or lname like '%$name%'";
$result1 = mysql_query($sql);
while($row = mysql_fetch_array($result1)){
$r_no = $row['rollno'];
$sql = "SELECT * FROM emails WHERE sender='1' AND student_id='$r_no'";
$result = mysql_query($sql);
if (!$result) {
die(mysql_error());
}
$email_counter = 1;
while ($rr = mysql_fetch_array($result)) {
$stQuery = mysql_query("select SId, title,fname,lname, rollno from student where rollno = '" . $rr['student_id'] . "'") or die(mysql_error());
$studnet_info = mysql_fetch_array($stQuery);
$id = $studnet_info['SId']; ?>
<tr>
<td>
<a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w">
<strong><?php echo sprintf("%02d", $email_counter); ?></strong></a>
</td>
<td>
<a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w">
<?php echo date('d/m/Y', strtotime($rr['email_date'])); ?></a>
</td>
<td>
<a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w">
<?php echo $studnet_info['title'] . ' ' . $studnet_info['fname'] . ' ' . $studnet_info['lname']; ?></a>
</td>
<td>
<a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w">
<?php echo $rr['subject']; ?></a>
</td>
<td>
<?php if(!empty($rr['attachment'])){ ?><a href="../email_attachments/<?php echo $rr['attachment'] ?>">Download</a> <?php } ?>
</td>
<td>
<?php echo ($rr['status']) ? 'Read' : '<a href="updateemailstatus.php?Id=' . $rr['student_id'] . '&eid=' . $rr['email_id'] . '">UnRead</a>'; ?>
</td>
</tr>
<div class="modal fade" id="myModal<?php echo $email_counter; ?>w" tabindex="1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"><?php echo $rr['subject']; ?></h4>
</div>
<div class="modal-body">
<?php echo $rr['message']; ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<a href="studentInfo.php?Id=<?php echo $id;?>&edit#ui-tabs-13" style="padding: 10px;
background-color: #A2D4AE;
border-radius: 10px;
clear: both;
margin-bottom: 20px;
display: block;
color: #fff;
width: 127px">Create Message</a>
</div>
</div>
</div>
</div>
<?php $email_counter++;
}
}