| Current Path : /home/bolconlineco/public_html/aaaaaa/student/ |
| Current File : /home/bolconlineco/public_html/aaaaaa/student/student_outbox_email.php |
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="ui-tabs-5"><ul class="thumbs">
<?php
$query = "SELECT * FROM emails where student_id='$id' AND sender = 0 order by email_id desc";
$result=mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result) > 0){ ?>
<table class="tablestyle table table-striped table-bordered table-hover" id="sample_2">
<thead>
<tr>
<th>Sr</th>
<th>Date</th>
<th>Subject</th>
<th>Attachment</th>
</tr>
</thead>
<tbody>
<?php while($rr=mysql_fetch_array($result)) {
$email_counter++;
$all=explode(' ',$rr['edittime']);
$date=$all[0];
$time=@$all[1];
$msg="";
if($rr['role']==1) {
$msg="Admin";
} elseif($rr['role']==2) {
$msg=$rr['name']."(Coordinator)";
}elseif($rr['role']==3) {
$msg=$rr['name']."(Tutor)";
}
$string= $rr['subject'] ; ?>
<tr>
<td><a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w" style="display: block; width: 100%; color: #4B8DF8;">
<?php echo $email_counter; ?></a></td>
<td><a href="#" data-toggle="modal" data-target="#myModal<?php echo $email_counter; ?>w" style="display: block; width: 100%; color: #4B8DF8;">
<?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" style="display: block; width: 100%; color: #4B8DF8;"><?php echo $string; ?></a></td>
<td><a href="../email_attachments/<?php echo $rr['attachment'] ?>"><?php echo $rr['attachment']; ?></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 $string; ?></h4>
</div>
<div class="modal-body">
<?php echo preg_replace("/(<br\s*\/?>\s*)+/", '<br />', $rr['message']) ; ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<?php } ?>
</tbody>
</table>
<?php
}else{
echo "No Topic exists";
}
?>
</ul>
</div>