@extends('admin.layouts.app')
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

@section('header-script')
@include('admin.layouts.dashboard-header-script')
@endsection

@section('content')
<script type="text/javascript">
$(document).ready(function() {

    $(document).ready(function() {
        $('#another-element').hide();
    });
    $("#myelement").click(function() {
        $('#another-element').toggle("slide")


    });

    $(document).ready(function() {
        $('#another-element1').hide();
    });
    $("#myelement1").click(function() {
        $('#another-element1').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element2').hide();
    });
    $("#myelement2").click(function() {
        $('#another-element2').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element3').hide();
    });
    $("#myelement3").click(function() {
        $('#another-element3').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element4').hide();
    });
    $("#myelement4").click(function() {
        $('#another-element4').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element5').hide();
    });
    $("#myelement5").click(function() {
        $('#another-element5').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element6').hide();
    });
    $("#myelement6").click(function() {
        $('#another-element6').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element7').hide();
    });
    $("#myelement7").click(function() {
        $('#another-element7').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element8').hide();
    });
    $("#myelement8").click(function() {
        $('#another-element8').toggle("slide")
    });
    $(document).ready(function() {
        $('#another-element9').hide();
    });
    $("#myelement9").click(function() {
        $('#another-element9').toggle("slide")
    });

    $(document).ready(function() {
        $('#another-element10').hide();
    });
    $("#myelement10").click(function() {
        $('#another-element10').toggle("slide")
    });
    $(document).ready(function() {
        $('#another-element11').hide();
    });
    $("#myelement11").click(function() {
        $('#another-element11').toggle("slide")
    });
    $(document).ready(function() {
        $('#another-element12').hide();
    });
    $("#myelement12").click(function() {
        $('#another-element12').toggle("slide")
    });
});
</script>


<!-- Page-Title -->
<div align="center">
    <div class="row">
        <div class="col-sm-12">

            <h4 class="page-title"><span>Welcome</span> <span
                    style="color: #fe6271 ;text-transform: uppercase;">{{ Auth::user()->name }}</span> To <span
                    style="color: red;">Rajtextile</span> <span>School</span></h4>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-3" id="maindiv">
        <div style="width:100%">
            <img class="card-img-top" style="height: 65px; width:100%" src="{{url('/public/images')}}/soty.png"
                alt="image not found">
        </div>
        <div
            style="border-radius: 5px; font-weight:bold; margin-top:10px; width:100%; height:50px; font-size:20px; text-align:center; background-color:red; color:#ffffff;">
            <div style="padding-top:15px;"> রাউন্ডের নাম: {{$episode->section_one}} </div>
        </div>
        <div
            style="border-radius: 5px; font-weight:bold; margin-top:10px; width:100%; height:50px; font-size:18px; text-align:center; background-color:green; color:#ffffff; line-height:40px;">
            <div style="padding:10px;"> পর্বের নাম: {{$episode->section_one}}</div>
        </div>

        @if($episode->section_two)
        <div
            style="border-radius: 5px; font-weight:bold; margin-top:10px; width:100%; height:50px; font-size:18px; text-align:center; background-color:red; color:#ffffff; line-height:40px;">
            <div style="padding:10px;"> পর্বের নাম: {{$episode->section_two}}</div>
        </div>
        @else
        <div
            style="border-radius: 5px; font-weight:bold; margin-top:10px; width:100%; height:50px; font-size:18px; text-align:center; background-color:red; color:red; line-height:40px;">
            <div style="padding:10px;"> এই পর্বের একটি সেশন আছে</div>
        </div>
        @endif

        <div
            style="border-radius: 5px; font-weight:bold; margin-top:10px; width:100%; height:50px; font-size:18px; text-align:center; background-color:green; color:#ffffff; line-height:40px;">
            <div style="padding:10px;"> অংশগ্রহনকারীর সংখ্যা: {{$episode->number}}</div>
        </div>
        <div style="width:100%; margin-top:10px;">
            <img class="card-img-top" style="height: 250px; width:100%"
                src="{{url('/public/images')}}/{{$episode->image_episode}}" alt="image not found">
        </div>

    </div>


    <div class="col-md-7">

        <div id="another-element">
            @if(count($guests) > 0)
            @foreach($guests as $guest)
            <div
                style=" background-color:red; height:60px; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">

                আজকের প্রধান অতিথি
            </div>
            <div class="row">
                <div class="col-md-7">
                    <br><br> <br>
                    <div style="font-size:45px; color:green; text-align:center"> {{$guest->guest_name}} </div>
                    <br><br>
                    <div style="font-size:35px; color:red; text-align:center;"> {{$guest->guest_designation}}</div>
                    <div style="font-size:35px; color:red; text-align:center">{{$guest->guest_address}}</div>
                </div>
                <div class="col-md-5">

                    <img src="{{ URL::to('public/images/' . $guest->guest_image)}}" class="img-circle"
                        alt="Cinque Terre" width="370">
                </div>
            </div> @endforeach @else <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
            </div>
            @endif
        </div>

        <div id="another-element1">
            @if(count($specialguests) > 0)
            @foreach($specialguests as $specialguest)
            <div
                style=" background-color:#00a432; height:60px; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                এই পর্বের বিশেষ অতীথিদের তালিকা
            </div>
            <div class="row">
                <div class="col-md-7">
                    <br><br> <br>
                    <div style="font-size:45px; color:green; text-align:center"> {{$specialguest->specialguest_name}}
                    </div><br><br>
                    <div style="font-size:35px; color:red; text-align:center;">
                        {{$specialguest->specialguest_designation}}
                    </div>
                    <div style="font-size:35px; color:red; text-align:center">{{$specialguest->specialguest_address}}
                    </div>
                </div>
                <div class="col-md-5">

                    <img src="{{ URL::to('public/images/' . $specialguest->specialguest_image)}}" class="img-circle"
                        alt="Cinque Terre" width="370">
                </div>
            </div> @endforeach @else <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
            </div>
            @endif
        </div>


        <div id="another-element2">
            @if(count($judges) > 0)
            @foreach($judges as $judge)
            <div
                style=" background-color:#c700f9; height:40px; color:#ffffff; margin-top:10px; font-size:33px;  text-align:center;">
                এই
                পর্বের বিচারকদের তালিকা
            </div>
            <div class="row">
                <div class="col-md-7">
                    <br><br>
                    <div style="font-size:35px; color:green; text-align:center"> {{$judge->judge_name}}
                    </div>
                    <div style="font-size:25px; color:red; text-align:center;">
                        {{$judge->judge_designation}}
                    </div>
                    <div style="font-size:25px; color:red; text-align:center">{{$judge->judge_address}}
                    </div>
                </div>
                <div class="col-md-5">

                    <img src="{{ URL::to('public/images/' . $judge->judge_image)}}" class="img-circle"
                        alt="Cinque Terre" width="200">
                </div>
            </div> @endforeach @else <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
            </div>
            @endif
        </div>




        <div id="another-element3">
            <div style=" background-color:0094c4; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                এই
                পর্বের অংশগ্রহনকারীর তালিকা
            </div>
            <table class="table table-dark">
                <thead>
                    <tr>
                        <th scope="col">ক্রমিক</th>
                        <th scope="col"> নাম</th>
                        <th scope="col">শ্রেণি</th>
                        <th scope="col">রোল</th>
                        <th scope="col">ছবি</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $i = 0; ?>
                    @if(count($users) > 0)
                    @foreach($users as $user)
                    <tr>
                        <?php $i+=1; ?>
                        <th scope="row" style="font-size:32px;">{{$i}}</th>
                        <td style="font-size:32px;">{{$user->name}}</td>
                        <td style="font-size:32px;">{{$user->class}}</td>
                        <td style="font-size:32px;">{{$user->roll}}</td>

                        <td>
                            <div>

                                <a href="">
                                    <img src="{{ URL::to('public/images/' . $user->picture)}}" height="50" width="50" />
                                </a>
                            </div>
                        </td>
                    </tr>
                    @endforeach
                    @else
                    <tr>
                        <td>
                            <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                            </div>
                        </td>
                    </tr>
                    @endif
                </tbody>
            </table>
        </div>

        <div id="another-element4">
            <div style=" background-color:114816; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                গত পর্বের বিশেষ মুহূর্ত
            </div>

            <div class="row">
                @if(count($specialmeoemnts) > 0)
                @foreach($specialmeoemnts as $specialmeoemnt)
                <div>
                    <img src="{{ URL::to('public/images/' . $specialmeoemnt->picture)}}" height="60%" width="99%" />
                </div>
                <div
                    style=" background-color:#056cad; color:#ffffff; margin-top:10px; margin-bottom:10px; font-size:30px;  text-align:center;">
                    {{$specialmeoemnt->captions}}
                </div>
                @endforeach
                @endif

            </div>
        </div>

        <div id="another-element5">
            <div style="width:100%">
                <div
                    style=" background-color:2500ad; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    এই পর্বের প্রশ্ন ও মানবন্টন
                </div>
                <table class="table table-dark">
                    <thead>
                        <tr>
                            <th scope="col">ক্রমিক</th>
                            <th scope="col"> প্রশ্নের ধরণ</th>
                            <th scope="col">প্রশ্নের সংখ্যা</th>
                            <th scope="col">প্রতিটি প্রশ্নের নম্বর</th>
                            <th scope="col">মোট</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 0; ?>
                        <?php $total =0; ?>
                        @if(count($marksDists) > 0)
                        @foreach($marksDists as $marksDist)
                        <tr>
                            <?php $i+=1; ?>
                            <?php $total+=$marksDist->marks*$marksDist->number; ?>
                            <th scope="row" style="font-size:32px;">{{$i}}</th>
                            <td style="font-size:32px;">{{$marksDist->question_type}}</td>
                            <td style="font-size:32px;">{{$marksDist->number}}</td>
                            <td style="font-size:32px;">{{$marksDist->marks}}</td>
                            <td style="font-size:32px;">{{$marksDist->marks*$marksDist->number }}</td>

                        </tr>
                        @endforeach
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td style="font-size:32px;text-align:right"> সর্বমোটঃ </td>
                            <td style="font-size:32px;text-align:left">{{$total}}</td>
                        </tr>
                        @else

                        <tr>
                            <td>
                                <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                                </div>
                            </td>
                        </tr>
                        @endif
                    </tbody>
                </table>
            </div>
        </div>

        <div id="another-element6">
            <div style="width:100%">
                <div style=" background-color:red; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    প্রতিযোগিতায় প্রাপ্ত নম্বর
                </div>
                <table class="table table-dark">
                    <thead>
                        <tr>
                            <th scope="col">ক্রমিক</th>
                            <th scope="col"> নাম</th>
                            <th scope="col">শ্রেণি</th>
                            <th scope="col">রোল</th>
                            <th scope="col">প্রাপ্ত নম্বর</th>
                            <th scope="col">ছবি</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 0; ?>
                        @if(count($compitionMarks) > 0)
                        @foreach($compitionMarks as $episodeMark)
                        <tr>
                            <?php $i+=1; ?>
                            <th scope="row" style="font-size:32px;">{{$i}}</th>
                            <td style="font-size:32px;">{{$episodeMark->name}}</td>
                            <td style="font-size:32px;">{{$episodeMark->class}}</td>
                            <td style="font-size:32px;">{{$episodeMark->roll}}</td>
                            <td style="font-size:32px;"> {{$episodeMark->totalMark}}
                            <td>
                            <td>
                                <div>

                                    <img src="{{ URL::to('public/images/' . $episodeMark->picture)}}" height="50"
                                        width="50" />
                                    </a>
                                </div>

                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr>
                            <td>
                                <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                                </div>
                            </td>
                        </tr>
                        @endif
                    </tbody>
                </table>
            </div>
        </div>

        <div id="another-element7">
            <div style="width:100%">
                <div
                    style=" background-color:00a432; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    অতিথি/বিচারকের নম্বর
                </div>
                <table class="table table-dark">
                    <thead>
                        <tr>
                            <th scope="col">ক্রমিক</th>
                            <th scope="col"> নাম</th>
                            <th scope="col">শ্রেণি</th>
                            <th scope="col">রোল</th>
                            <th scope="col">প্রাপ্ত নম্বর</th>
                            <th scope="col">ছবি</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 0; ?>
                        @if(count($guestmarks) > 0)
                        @foreach($guestmarks as $episodeMark)
                        <tr>
                            <?php $i+=1; ?>
                            <th scope="row" style="font-size:32px;">{{$i}}</th>
                            <td style="font-size:32px;">{{$episodeMark->name}}</td>
                            <td style="font-size:32px;">{{$episodeMark->class}}</td>
                            <td style="font-size:32px;">{{$episodeMark->roll}}</td>
                            <td style="font-size:32px;"> {{$episodeMark->totalMark}}</td>
                            <td>
                                <div>
                                    <a href="">
                                        <img src="{{ URL::to('public/images/' . $episodeMark->picture)}}" height="50"
                                            width="50" />
                                    </a>
                                </div>
                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr>
                            <td>
                                <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                                </div>
                            </td>
                        </tr>
                        @endif
                    </tbody>
                </table>
            </div>
        </div>
        <div id="another-element8">
            <div style="width:100%">
                <div id="another-element">
                    <div
                        style=" background-color:#c700f9; height:60px; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                        ষ্টুডেন্ট অব দ্যা ডে
                    </div>
                    @if($studentOftheDay)

                    <div class="row">
                        <div class="col-md-7">
                            <br><br> <br>
                            <div style="font-size:45px; color:green; text-align:center">
                                {{$studentOftheDay->name}}, </div>
                            <div style="font-size:35px; color:green; text-align:center;">
                                শ্রেণি: {{$studentOftheDay->class}}, রোল: {{$studentOftheDay->roll}}
                            </div>
                            <br><br>
                            <div style="font-size:55px; color:red; text-align:center">
                                প্রাপ্ত নম্বর: {{$studentOftheDay->totalMark}}
                                <br><br><br> অভিনন্দন তোমাকে....
                            </div>
                        </div>
                        <div class="col-md-5">

                            <img src="{{ URL::to('public/images/' . $studentOftheDay->picture)}}" width="350">
                        </div>
                    </div>
                    @else
                    <div style="font-size:20px; color:red; text-align:center">
                        নির্বাচন প্রক্রিয়া শেষ হযনি।
                        <br>
                    </div>

                    @endif

                </div>
            </div>
        </div>
        <div id="another-element9">
            <div style="width:100%">
                <div
                    style=" background-color:0094c4; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    আজকের ফলাফল
                </div>
                <table class="table table-dark">
                    <thead>
                        <tr>
                            <th scope="col">ক্রমিক</th>
                            <th scope="col"> নাম</th>
                            <th scope="col">শ্রেণি</th>
                            <th scope="col">রোল</th>
                            <th scope="col">প্রাপ্ত নম্বর</th>
                            <th scope="col">ছবি</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 0; ?>
                        @if(count($episodeMarks) > 0)
                        @foreach($episodeMarks as $episodeMark)
                        <tr>
                            <?php $i+=1; ?>
                            <th scope="row" style="font-size:32px;">{{$i}}</th>
                            <td style="font-size:32px;">{{$episodeMark->name}}</td>
                            <td style="font-size:32px;">{{$episodeMark->class}}</td>
                            <td style="font-size:32px;">{{$episodeMark->roll}}</td>
                            <td style="font-size:32px;"> {{$episodeMark->totalMark}}</td>
                            <td>
                                <div>
                                    <a href="{{url('admin/perticipentlist')}}/{{$episodeMark->id}}">
                                        <img src="{{ URL::to('public/images/' . $episodeMark->picture)}}" height="50"
                                            width="50" />
                                    </a>
                                </div>
                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr>
                            <td>
                                <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                                </div>
                            </td>
                        </tr>
                        @endif
                    </tbody>
                </table>
            </div>

        </div>
        <div id="another-element10">
            <div style="width:100%">
                @foreach($winners as $winner)
                <div
                    style=" background-color:#114816; height:60px; color:#ffffff; margin-top:10px; font-size:30px;  text-align:center;">
                    গত দর্শক পর্বের বিজয়ী
                </div>
                <div class="row">
                    <div class="col-md-7">
                        <br><br>
                        <div style="font-size:40px; color:red; text-align:center">
                            {{$winner->winner_name}}, </div>
                        <div style="font-size:28px; color:red; text-align:center;">
                            শ্রেণি: {{$winner->winner_class}}, রোল: {{$winner->winner_roll}}
                        </div>
                        <div style="font-size:40px; color:green; text-align:center">
                            <br>তোমাকে অভিনন্দন....
                        </div>
                    </div>
                    <div class="col-md-5">
                        <img src="{{ URL::to('public/images/' . $winner->picture)}}" width="380">
                    </div>
                </div>
                @endforeach
            </div>
        </div>
        <div id="another-element11">
            <div style="width:100%">
                <div
                    style=" background-color:black; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    দর্শক পর্বের আজকের প্রশ্ন
                </div>
                @if(count($audiences) > 0)
                @foreach($audiences as $audiencesQuestion)
                <div
                    style=" background-color:#0094c4; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:left; padding:20px;">
                    {{$audiencesQuestion->question}}
                </div>


                <div
                    style=" background-color:#0094c4; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:left; padding:20px;">
                    সঠিক উত্তরটি লিখে যথা স্থানে জমা দিন, বিজয়ীদের জন্য আছে আকর্শনীয় পুরস্কার।
                </div>
                @endforeach
                @else
                <div
                    style=" background-color:#0094c4; height:auto; color:#ffffff; margin-top:10px; font-size:23px;  text-align:left; padding:20px;">
                    এখন কোন প্রশ্ন প্রদান করা হয়নি।
                </div>

                @endif
            </div>
        </div>
        <div id="another-element12">
            <div style="width:100%">
                <div
                    style=" background-color:#2500ad; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:center;">
                    গত দর্শক পর্বের প্রশ্ন ও উত্তর

                </div>
                @if(count($audiencesQuestions) > 0)
                @foreach($audiencesQuestions as $audiencesQuestion)
                <div
                    style=" background-color:#ff0000; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:left;padding:20px;">
                    {{$audiencesQuestion->question}}
                </div>
                <div
                    style=" background-color:#0094c4; height:auto; color:#ffffff; margin-top:10px; font-size:43px;  text-align:left;padding:10px;">
                    {{$audiencesQuestion->right_answer}}
                </div>


                @endforeach
                @else
                <tr>
                    <td>
                        <div style="font-size:20px; color:red; text-align:center;"> কোন তথ্য নেই
                        </div>
                    </td>
                </tr>
                @endif
            </div>
        </div>
    </div>
    <div class="col-md-2">
        <div>
            <div>
                <button id="myelement" style="height:45px;color:#ffffff; width:100%; background-color:red;">প্রধান
                    অতিথি</button>
            </div>
            <div>
                <button id="myelement1" style="height:45px;color:#ffffff; width:100%; background-color:#00a432;">
                    বিশেষ
                    অতিথি</button>
            </div>
            <div>
                <button id="myelement2" style="height:45px;color:#ffffff; width:100%; background-color:#c700f9;">
                    বিচারকবৃন্দ</button>
            </div>
            <div>
                <button id="myelement3" style="height:45px;color:#ffffff; width:100%; background-color:#0094c4;">
                    অংশগ্রহনকারী</button>
            </div>
            <div>
                <button id="myelement4" style="height:45px;color:#ffffff; width:100%; background-color:#114816;"> গত
                    পর্বের বিশেষ
                    মুহূর্ত</button>
            </div>
            <div>
                <button id="myelement5" style="height:45px;color:#ffffff; width:100%; background-color:#2500ad;">
                    প্রশ্ন ও মানবন্টন</button>
            </div>

            <div style="margin-top:50px;">
                <button id="myelement6" style="height:45px;color:#ffffff; width:100%; background-color:red;">
                    প্রতিযোগিতায় প্রাপ্ত নম্বর</button>
            </div>

            <div>
                <button id="myelement7" style="height:45px;color:#ffffff; width:100%; background-color:#00a432;">
                    অতিথি/বিচারকের নম্বর</button>
            </div>
            <div>
                <button id="myelement8" style="height:45px;color:#ffffff; width:100%; background-color:#c700f9;">
                    ষ্টুডেন্ট অব দ্যা ডে</button>
            </div>
            <div>
                <button id="myelement9" style="height:45px;color:#ffffff; width:100%; background-color:#0094c4;">
                    আজকের ফলাফল</button>
            </div>
            <div>
                <button id="myelement10" style="height:45px;color:#ffffff; width:100%; background-color:#114816;">
                    গত দর্শক পর্বের বিজয়ী </button>
            </div>
            <div>
                <button id="myelement12" style="height:45px;color:#ffffff; width:100%; background-color:#2500ad;">
                    গত দর্শক পর্বের প্রশ্ন ও উত্তরটি </button>
            </div>
            <div>
                <button id="myelement11" style="height:45px;color:#ffffff; width:100%; background-color:black;">
                    দর্শক পর্বের আজকের প্রশ্ন </button>
            </div>

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



<!-- end row -->




@endsection

@section('footer-script')

@include('admin.layouts.dashboard-footer-script')

@endsection