<?php

session_start();
  if( $_SESSION["admin"]!=true)
  {
    header("location:login.php");
    exit;
  }
include 'header.php';
include './connection.php';
?>
<section style="width: 100%;">
	<section style="width: 35%;float: left;">
		<marquee width="100%" direction="up" height="500px">
                    <?php
                    include 'connection.php';
                    $aquery="SELECT   * FROM `tbl_announcements` WHERE status='1'  ";
                    $aresult=$conn->query($aquery);
                    if (!empty($aresult) && $aresult->num_rows > 0)
                     {
                        $announcement="";
                        $i=1;
                        while( $arow=$aresult->fetch_assoc())
                            {
                                $announcement=$announcement." Announcement No.".$i."<br>  Dated:  ".$arow["adate"]." <br><br> ->  ".$arow["caption"]."&nbsp;&nbsp;&nbsp <br><br>";
                                $i++;
                            }
                       echo '  <h6 style="color: red;">'.$announcement.'</h6>';
                    }

                            ?>
                    </marquee> </section>
                    <section style="width: 65%;float: right;">
                    	
                    </section>

</section>
 
