?>
">
                </form>  -->
                <div class="center">
                    <span class="bold">Output: </span>
                    @if($state_arr[8]==0)
                        <a class="btn btn-default btn-sm" onclick="run_model()">Run Model</a>
                    @elseif($state_arr[8]==1)
                        <span style="color:red">
                            Model in process ...
                        </span>
                    @elseif($state_arr[8]==2)
                        <span style="color:red">Ready</span>
                        <a href="{{ env('PUBLIC_ROOT').'/output/'.$upload->userId.'$'.$upload->output }}" target="_blank">{{ $upload->output }}</a>
                        <?php 
$diff = App\Functions::getDateTimeDifferences($upload->output_at, $now);
?>
                        @if(strtotime($upload->output_at)==0)
                        @elseif($diff['years']>0 || $diff['months']>0)
                            {{ date('F j, Y', strtotime($upload->output_at)) }}
                        @elseif($diff['days']>0)
                            {{ $diff['days'] }}
                            @if($diff['days']==1)
                                day ago
                            @else
                                days ago
                            @endif
                        @elseif($diff['hours']>0)
                            {{ $diff['hours'] }}
                            @if($diff['hours']==1)
                                hour ago
                <div style="text-align: center; color: red; position: relative; top: 20px">{{ $errors->first('minLat') }}</div>
            @elseif($errors->has('minLng'))
                <div style="text-align: center; color: red; position: relative; top: 20px">{{ $errors->first('minLng') }}</div>
            @elseif($errors->has('maxLat'))
                <div style="text-align: center; color: red; position: relative; top: 20px">{{ $errors->first('maxLat') }}</div>
            @elseif($errors->has('maxLng'))
                <div style="text-align: center; color: red; position: relative; top: 20px">{{ $errors->first('maxLng') }}</div>
            @endif
            <h2 class="sub-header">Climate Data</h2>
            <span class="bold">File:</span>
            <a href="{{ env('PUBLIC_ROOT').'/uploads/'.$upload->userId.'$'.$upload->climate_data }}" target="_blank">
                {{ $upload->climate_data }}
            </a>
            <span class="bold">Upload Time:</span>
            <?php 
$diff = App\Functions::getDateTimeDifferences($upload->climate_data_at, $now);
?>
            @if(strtotime($upload->climate_data_at)==0)
            @elseif($diff['years']>0 || $diff['months']>0)
                {{ date('F j, Y', strtotime($upload->climate_data_at)) }}
            @elseif($diff['days']>0)
                {{ $diff['days'] }}
                @if($diff['days']==1)
                    day ago
                @else
                    days ago
                @endif
            @elseif($diff['hours']>0)
                {{ $diff['hours'] }}
                @if($diff['hours']==1)
                    hour ago