<?php
    	if($stmt = $mysqli -> prepare("SELECT FolloweID FROM Twitter WHERE uid = ?")){
        	$stmt -> bind_param("i", $userid);
        	$stmt -> execute();
        	$stmt -> bind_result($FollowerID);
        	$stmt -> fetch();
        	$stmt -> close();
        }
?>

<div class="col-lg-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>Twitter Integratie</h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-wrench"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="twitter.php?i=configuration">New follower</a></li>
                </ul>
                <a class="close-link">
                    <i class="fa fa-times"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
           <table class="table table-striped">
                <thead>
                    <tr>
                        <th>Follower</th>
                    </tr>
                </thead>
				 <tbody>
                    <?php 
                    	if($stmt = $mysqli -> prepare("SELECT FollowerID FROM Twitter WHERE uid=?")){
                        	$stmt -> bind_param('i', $userid);
                        	$stmt -> execute();
                        	$stmt -> bind_result($FollowerID);
                        	while($result = $stmt -> fetch()){
                        	    print '
                        	        <tr>
                        	            <td>'.$FollowerID.'</td>
                        	            <td style="width: 100px !important" class="text-center valign-middle" >
							                <a href="twitter.php?i=wijzigen&FollowerID='.$FollowerID.'"><button class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i></button></a>
							                 &nbsp;
							                <a href="twitter.php?i=verwijderen&FollowerID='.$FollowerID.'"><button class="btn btn-xs btn-danger"><i class="fa fa-times"></i></button></a>
						                </td>
                        	        </tr>
                        	    ';
                        	};
                        	$stmt -> close();
                        }
                    ?>
                </tbody>
            </table>
        </div>
    </div>
</div>