<?php include('header.php');?>

    <main id="dashboard">
        <div class="container">

            <div class="row">

                <div class="col-sm-8 col-md-10">

                    <div class="page-title">
                        <h1><strong> Select Fans Page </strong> </h1>
                    </div>

                </div>
            </div>

            <div class="row">
                <div class="col-sm-12 errors_block">
                </div>
            </div>

            <br>
            <br>

            <div class="row">
                <div class="col-sm-12">

                    <div class="panel panel-fb">

                        <table class="table table-striped">
                            <thead>

                            <tr>
                                <th class="col-xs-8 col-sm-9"></th>
                                <th class="col-xs-4 col-sm-3"></th>
                            </tr>

                            </thead>

                            <tbody>
                            <?php if(!empty($schedule_pages['data'])) { ?>
                            <?php foreach($schedule_pages['data'] as $page) { ?>
                                <tr>
                                    <td class="user-page">
                                        <img alt="" src="https://graph.facebook.com/<?php echo $page['id'];?>/picture" class="user-pic">
                                        <span class="user-name"><?php echo $page['name'];?> </span>
                                            <span class="user-info">
                                                <span class="user-num"><?php echo $page['likes'];?> Fans</span>
                                                <a target="_blank" href="https://facebook.com/<?php echo $page['id'];?>" class="user-link"> <i class="fa fa-facebook"></i>View page </a>
                                            </span>
                                    </td>


                                    <td class="text-right">
                                        <a data-id="<?php echo $page['id'];?>" type="button" class="choose_page btn btn-gray btn-sm">
                                            SELECT PAGE <i class="fa fa-arrow-right"></i>
                                        </a>
                                    </td>
                                </tr>
                            <?php } } ;?>
                            </tbody>
                        </table>


                    </div>

                </div>
            </div>
            <br>
            <br>

            <div class="row">

                <div class="col-sm-8 col-md-10">

                </div>

                <div class="col-md-2 col-sm-4 text-right">
                    <a href="#" id="next_step1" class="btn btn-lg btn-success btn-block">Next <i class="fa fa-hand-o-right"></i> </a>
                </div>
            </div>
        </div>
    </main>

<?php include('footer.php');?>