<?php
    session_start();
    include "../../db.php";
    date_default_timezone_set('Asia/Kolkata');
    $currentTime = date('M j, Y g:i a');

    if ( !isset($_SESSION['uid']) && !isset($_SESSION['uref']) && !isset($_SESSION['utype']) )
        header("Location: logout.php");
?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Notice Details</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">


    <link href="css/all.min.css" rel="stylesheet" type="text/css">
    <link href="css/sb-admin-2.min.css" rel="stylesheet">
    <link href="css/alltable.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <script src="vendor/ckeditor.js"></script>


</head>

<body>
<br /><br />

<table  cellpadding="0" cellspacing="0" width="90%" bgcolor="#aaddff" border="1" align="center">
<tr>
    <td>
            <table  cellpadding="0" cellspacing="0" width="100%" bgcolor="#FAFAD2" border="0" align="center">
                 <?php
                if ( isset($_GET["n"]) ) 
                {

                        $notice_sql = "SELECT * FROM notice_table WHERE n_sl='$_GET[n]'";
                        $notice_data = mysqli_query($con,$notice_sql);
                        while($notice_rows = mysqli_fetch_array($notice_data))
                        {
                            ?>
                                     <tr>
                                        <td colspan="2" style="background-color:#016797; color:#FFFFFF; font:bold 14px Verdana; text-align:left;padding: 6px 10px;">NOTICE  DETAILS</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2"  height="5" ></td>
                                    </tr>
                                    <tr>
                                        <td width="18%" align="left" class="Heading"><strong>Title:</strong></td>
                                        <td width="82%" class="introlink" style="color:#000000; font-size:18px; line-height:180%;"><?php echo $notice_rows['n_title']; ?> </td>
                                    </tr>
                                                         
                                    <tr>
                                         <td colspan="2"  height="5" ></td>
                                    </tr>                                                                  
                                    
                                    <tr>
                                      <td align="left" class="Heading">&nbsp;</td>
                                      <td class="TabListData">&nbsp;</td>
                                    <tr>
                                         <td colspan="2"  height="5" ></td>
                                    </tr>  
                                    <tr>
                                        <td height="21" align="left"  class="Heading" > <strong>Details:</strong></td>
                                        <td height="21" align="left" class="introlink" style="color:#000000; font-size:14px; line-height:180%;">
                                            <p>&nbsp;
                                                <span style="font-size: 18px;">
                                                    <strong>

                                                        <?php echo $notice_rows['m_notice']; ?>

                                                        <br><br>
                                                        <?php 
                                                        if ( !empty($notice_rows['notice']))
                                                        {
                                                         ?>
                                                         <a href="../upload/noticePdf/<?php echo $notice_rows['notice']; ?>" target="_blank" style="text-decoration:none;">Please Click Here to view the PDF notice ...</a>
                                                         <?php 
                                                         }
                                                          ?>
                                                        
                                                        
                                                    </strong>
                                                </span>
                                            </p>
                                        </td>
                                    </tr>
                                                                                                    
                                    <tr>
                                        <td colspan="2"  height="5" ></td>
                                    </tr>

                                    <tr>
                                      <td  align="right"></td>
                                      <td  align="left"> 

                                        <a href='notice.php' class='m-2 btn btn-warning' title='Click to Back'> <i class="fas fa-backward"></i> BACK </a>
                                        <a href='notice.php?edit_id=<?php echo $notice_rows["n_sl"]; ?>' class='m-2 btn btn-success' title='Click to Edit'> <i class='fas fa-pencil-alt'></i> EDIT </a>
                                      </td>
                                      
                                    </tr>
                                    <tr>
                                        <td colspan="2"  height="5" ></td>
                                    </tr>                           

                  <?php         
                        }
                        
                }                                   
                
                            
             ?>
                
              </table>
                             
   </td>
</tr></table>
</body>
</html>