Your IP : 10.1.73.149


Current Path : /home/bolconlineco/www/coordinator/
Upload File :
Current File : /home/bolconlineco/www/coordinator/newemails.php

<?php
ob_start();
ob_flush();
session_start();
include('includes/header.php');
require '../emails/PHPMailerAutoload.php';

if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
 {
	header("location:../index.php");
	exit(); 
 }
 //pagination//

 $email_counter = 1;
				  $query="SELECT * FROM emails order by email_id desc";

				  $result=mysql_query($query) or die(mysql_error());
				  $que = "SELECT * FROM emails order by email_id desc";


				  if(mysql_num_rows($result) > 0)
				   {

					?>

<h3 class="page-title">Email Notifications</h3>
<ul class="page-breadcrumb breadcrumb">
    <li><i class="fa fa-home"></i> <a href="dashbord.php"> Home </a> <i class="fa fa-angle-right"></i> </li>
    <li class="active">Email Notifications</li>
</ul>
<div class="row clearfix">

<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-title clearfix">
    <div class="caption"> <i class="fa fa-globe"></i>Email Notifications</div>
</div>

<div class="portlet-body clearfix">

<table class="tablestyle table table-striped table-bordered table-hover" id="sample_2">
    <thead>
        <tr>
            <th>Sr</th>
            <th>Date</th>
            <th>Student</th>
            <th>Message</th>
            <th>Attachment</th>
            <th>View</th>
            <th>Status</th>
        </tr>
    </thead>
    <tbody>
          <?php

            while($rr=mysql_fetch_array($result)) {

                $stQuery = mysql_query("select title,fname,lname from student where rollno = '".$rr['student_id']."'") or die(mysql_error());
                $studnet_info = mysql_fetch_array($stQuery);

                $email_counter++;
                $msg="";
                $string=  $rr['message'] ; ?>

    <tr style="margin-top:20px; vertical-align:text-top; margin-bottom:15px; ">
        <td><strong><?php echo $email_counter; ?></strong></td>
        <td><?php echo $rr['email_date']; ?></td>
        <td><?php echo $studnet_info['title'] . '  '. $studnet_info['fname'] . '  '. $studnet_info['lname']; ?></td>
        <td><?php echo $string; ?></td>
        <td><a href="../email_attachments/<?php echo $rr['attachment'] ?>"><?php echo  $rr['attachment'];  ?></a></td>
        <td><a href="studentInfo.php?Id=<?php echo $rr['student_id']; ?>#ui-tabs-13">View</a></td>
        <td>
            <?php echo ($rr['status'])?'Read':'<a href="updateemailstatus.php?Id='.$rr['student_id'].'&eid='.$rr['email_id'].'">UnRead</a>'; ?>
        </td>
    </tr>

    <?php } ?>
    </tbody>
</table>
<?php

				   } else {
					   echo "No Email Exists";
				   } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
 <?php include('../includes/footer.php');?>