<ul class="buttons">
                <li>
                    <a href="#" class="link_bcPopupList"><span class="icon-user"></span><span class="text">Users list</span></a>

                    <div id="bcPopupList" class="popup">
                        <div class="head clearfix">
                            <div class="arrow"></div>
                            <span class="isw-users"></span>
                            <span class="name">List users</span>
                            
                        </div>
                        <div class="body-fluid users">

                       <?php 
					   $sql=mysql_query("SELECT * FROM user ORDER BY `user`.`post` ASC");
					   while($rows=mysql_fetch_array($sql))
					   {
						  
					   $post=$rows['post'];
					   $user_post=$_SESSION['post'];
					   
					    ?>
                            <div class="item clearfix">
                                <div class="info">
                                    <a href="#" class="name"><?php echo $rows['name']; ?></a>&nbsp;&nbsp;&nbsp;&nbsp;  (<?php if($post==4) { echo 'Admin'; } else if($post==2) { echo 'Operator'; } ?>)                                  
                                  <?php if($user_post==4) { ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Delete </span> <?php } else { ?>  </span> <?php } ?> 
                                </div>
                                
                               
                                
                                
                            </div>
                              <?php } ?>
                                      

                        </div>
                        <div class="footer">
                         <?php if($user_post==4) { ?>   <a href="home.php?page=add_user"><button class="btn" type="button">Add new</button></a> <?php } ?>
                            <button class="btn btn-danger link_bcPopupList" type="button">Close</button>
                        </div>
                    </div>                    
                    
                </li>                
                
            </ul>