@extends('user.master')
@section('content')
<div class="col-md-12">
    <!-- Poll Page -->
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>

    <div class="clearfix">&nbsp;</div>
    <div class="clearfix">&nbsp;</div>
    <div class="row">
        <div class="col-md-1"></div>
        <div class="col-md-10">
            <div class="col-md-9">
                @if(Session::get('message'))
                <div class="alert alert-danger animated bounce" role="alert">
                    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                    <span class="sr-only">Error:</span>
                    {{Session::get('message')}}
                </div>
                @endif
                <div class="col-md-12 animated fadeIn bg-default poll-content">
                    <h1><i class="fa fa-lightbulb-o"></i> Guess the number : </h1>
                    <hr class="hr-navy">
                    <div class="clearfix load-content">
                        <b> Tries : {{$tries }} </b>
                        <hr class="hr-orange">
                        <div class="row">
                            <div class="col-md-5 text-center">

                                @if($status==1)
                                <img class="animated flipInX" src="{{asset('/public/img/check.png')}}" style="-moz-animation-delay:0.1s">
                                @elseif($status==2)
                                <img class="animated flipInX" src="{{asset('/public/img/close.png')}}">
                                @else
                                <img class="animated flipInX" src="{{asset('/public/img/light.png')}}">
                                @endif
                            </div>
                            <div class="col-md-1"></div>
                            <div class="col-md-6">

                                <div  class="alert alert-info animated flipInY"><h4>  {{$msg}}  </h4></div>

                            </div>
                        </div>
                        <div>&nbsp;</div>
                        <form action="/guess-number" method="GET">
                            <div class="row">
                                <div class="col-md-5">
                                    <input name="guess" class="form-control input-lg" required onkeydown="return isNumber(event)">
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-3">
                                    @if(isset(Auth::user()->fbid))
                                    <button class="btn btn-lg btn-facebook btn-block" type="submit"><i class="fa fa-lightbulb-o"></i> Guess</button>
                                    @else
                                    <button class="btn btn-lg btn-facebook btn-block login-first" type="button"><i class="fa fa-lightbulb-o"></i> Guess</button>
                                    @endif
                                </div>
                                <div class="col-md-3">
                                    <a href="/guess-number?action=reset" class="btn btn-lg btn-default btn-block" type="submit"><i class="fa fa-lightbulb-o"></i> Play Again ! </a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <br> <br>
                    <i class="fa fa-bullhorn"></i> System will take a random number and try your best to find the number !
                    <br> <br>
                    <button class="btn btn-facebook btn-lg btn-block share" short_url="{{URL::current()}}"><i class="fa fa-facebook"></i> Share Facebook </button>

                    <div class="clearfix load-content">&nbsp;</div>

                </div>

            </div>

            <div class="col-md-3 bg-default">
                @include('user.rightbar')
            </div>
        </div>
        <div class="col-md-1"></div>
    </div>
    <!-- // Poll Page -->
</div>
@stop
