            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Link Summary</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>

            <form method="get">
                 <div class="row">
                    <div class="col-lg-6">
                    </div>
                    <div class="col-lg-2 col-md-4 col-sm-4">
                        <div class="form-group">
                            <input class="form-control" type="text" id="fromDate" autocomplete="off" placeholder="From Date : " name="fromDate" value="<?php echo $fromDate;?>">
                        </div>
                    </div>
                    <div class="col-lg-2 col-md-4 col-sm-4">
                        <div class="form-group">
                            <input class="form-control" type="text" id="toDate" autocomplete="off" placeholder="To Date : " name="toDate" value="<?php echo $toDate;?>">
                        </div>
                    </div>
                    <div class="col-lg-2 col-md-4 col-sm-4">
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary btn-block" name="search" value="search">Search</button>
                        </div>
                    </div>
                </div>
                <div class="row">
                     <div class="col-lg-6">
                    </div>
                    <div class="col-lg-6">
                        <span <?php echo $shouldRed == 1 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $todayLink;?>';">&nbsp;&nbsp;&nbsp;Today&nbsp;&nbsp;&nbsp;</span>
                        <span <?php echo $shouldRed == 2 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $yesterdayLink;?>';">&nbsp;&nbsp;&nbsp;Yesterday&nbsp;&nbsp;&nbsp;</span>
                        <span <?php echo $shouldRed == 3 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $currentWeekLink;?>';">&nbsp;&nbsp;&nbsp;Current Week&nbsp;&nbsp;&nbsp;</span>
                        <span <?php echo $shouldRed == 4 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $lastWeekLink;?>';">&nbsp;&nbsp;&nbsp;Last Week&nbsp;&nbsp;&nbsp;</span>
                        <span <?php echo $shouldRed == 5 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $currentMonthLink;?>';">&nbsp;&nbsp;&nbsp;Current Month&nbsp;&nbsp;&nbsp;</span>
                        <span <?php echo $shouldRed == 6 ? 'class="red-selector"' : 'class="black-selector"';?> onclick="location.href='<?php echo $lastMonthLink;?>';">&nbsp;&nbsp;&nbsp;Last Month&nbsp;&nbsp;&nbsp;</span>
                    </div>
                </div>
                <div class="row">
                     <div class="col-lg-6">
                        &nbsp;
                    </div>
                    <div class="col-lg-6">
                        &nbsp;
                    </div>
                </div>
            </form>

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <b>Locations</b>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div id="morris-bar-chart"></div>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
            </div>
            <div class="row">
                <div class="col-lg-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <b>Operating Systems</b>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div id="morris-donut-chart"></div>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <div class="col-lg-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <b>Referrers</b>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div id="morris-donut-chart-2"></div>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <b>Link IP</b>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <?php if(isset($summaryResult)) { ?>
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th>#</th>
                                                <th>IP Address</th>
                                                <th>City</th>
                                                <th>OS</th>
                                                <th>Click Count</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php for($x = 0; $x < sizeof($summaryResult); $x++) { ?>
                                                <tr>
                                                    <td><?php echo ($x+1);?></td>
                                                    <td><a href="http://ip-api.com/#<?php echo $summaryResult[$x]->IPAddress;?>" target="blank"><?php echo $summaryResult[$x]->IPAddress;?></a></td>
                                                    <td><?php echo $summaryResult[$x]->City;?></td>    
                                                    <td><?php echo isset($summaryResult[$x]->OperatingSystem) ? $summaryResult[$x]->OperatingSystem : 'Unknown';?></td>
                                                    <td><?php echo $summaryResult[$x]->ClickCount;?></td>
                                                </tr>
                                            <?php } ?>
                                        </tbody>
                                    </table>
                                </div>
                            <?php } else { ?>
                                <div class="well">
                                    <h4>No details yet! Please check back later!</h4>
                                </div>
                            <?php } ?>
                            
                            <?php if(isset($links)):?>
                            <div style="float: right;">
                                <ul class="pagination">
                                    <?php foreach ($links as $link) {
                                        echo "<li>". $link."</li>";
                                    } ?>
                                </ul>
                            </div>
                            <?php endif;?>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
            </div>