<?php

echo "

<div class='col-sm-3 col-md-2'>

            <a href='compose.php' class='btn btn-success btn-sm btn-block' role='button'>COMPOSE</a>

            <hr />

            <ul class='nav nav-pills nav-stacked'>";



                include("../core/connect.php");

                        $rolenumber=$_SESSION["rolenumber"];

                        $result_unread=$dbh->query("select * from message where recepient like '%$rolenumber%' and dateread not like '%$rolenumber%' and deleters not like '%$rolenumber%'");

                        $count_unread=$result_unread->rowCount();





                        $result_inbox=$dbh->query("select * from message where recepient like '%$rolenumber%' and deleters not like '%$rolenumber%'");

                        $count_inbox=$result_inbox->rowCount();



                        $result_deleted=$dbh->query("select * from message where recepient like '%$rolenumber%' and deleters like '%$rolenumber%'");

                        $count_deleted=$result_deleted->rowCount();



              echo "

               <li class='active'><a href='message.php?msgt=unr'><span class='badge pull-right'>".$count_unread."</span> Unread </a>

                </li>

                <li class='active'><a href='message.php?msgt=inb'><span class='badge pull-right'>".$count_inbox."</span> Inbox </a>

                </li>

                <li class='active'><a href='message.php?msgt=tra'><span class='badge pull-right'>".$count_deleted."</span> Trash </a>

                </li>

                <br>

                <a href='#'><input type='submit' class='btn btn-danger btn-sm btn-block' name='delete_mess' role='button' value='Delete'>

            

                

            </ul>

        </div>";

?>