<?php
    $schoolsColors = [
        'color1' => '#00a556',
        'color2' => '#ed1b24'
    ];
?>
<aside id="leftsidebar" class="sidebar">
    <!-- User Info -->
    <div style="position: absolute; ">
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="400" height="180" preserveAspectRatio="none" viewBox="0 0 400 180"><g mask="url(&quot;#SvgjsMask1000&quot;)" fill="none"><rect width="400" height="180" x="0" y="0" fill="<?= $couleur ?>"></rect><path d="M7 180L187 0L280 0L100 180z" fill="url(#SvgjsLinearGradient1001)"></path><path d="M141 180L321 0L364.5 0L184.5 180z" fill="url(#SvgjsLinearGradient1001)"></path><path d="M378 180L198 0L78 0L258 180z" fill="url(#SvgjsLinearGradient1002)"></path><path d="M263 180L83 0L24.5 0L204.5 180z" fill="url(#SvgjsLinearGradient1002)"></path><path d="M247.29290729789184 180L400 27.292907297891844L400 180z" fill="url(#SvgjsLinearGradient1001)"></path><path d="M0 180L152.70709270210816 180L 0 27.292907297891844z" fill="url(#SvgjsLinearGradient1002)"></path></g><defs><mask id="SvgjsMask1000"><rect width="400" height="180" fill="#ffffff"></rect></mask><linearGradient x1="0%" y1="100%" x2="100%" y2="0%" id="SvgjsLinearGradient1001"><stop stop-color="rgba(15, 70, 185, 0.2)" offset="0"></stop><stop stop-opacity="0" stop-color="rgba(15, 70, 185, 0.2)" offset="0.66"></stop></linearGradient><linearGradient x1="100%" y1="100%" x2="0%" y2="0%" id="SvgjsLinearGradient1002"><stop stop-color="rgba(15, 70, 185, 0.2)" offset="0"></stop><stop stop-opacity="0" stop-color="rgba(15, 70, 185, 0.2)" offset="0.66"></stop></linearGradient></defs></svg>
    </div>
    <div class="user-info">
        <div class="image">
            <img src="{!!$cheminPhoto!!}" width="48" height="48" alt="User" />
        </div>
        <div class="info-container">
            <div class="name" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><?php echo $prenom; ?> <?php echo $nom; ?></div>
            <div class="email"><?php echo $email1; ?></div>
            <div class="btn-group user-helper-dropdown">
                <i class="material-icons" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">keyboard_arrow_down</i>
                <ul class="dropdown-menu pull-right">
                    <li><a href="javascript:void(0);"><i class="material-icons">person</i>Profile</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="javascript:void(0);"><i class="material-icons">group</i>Followers</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="javascript:void(0);"><i class="material-icons">input</i>Sign Out</a></li>
                </ul>
            </div>
        </div>
    </div>
    <!-- #User Info -->
    <!-- Menu -->
    <div class="menu">
        <ul class="list">
            <li class="header">MAIN NAVIGATION</li>
            <li>
                <a href="">
                    <i class="material-icons">home</i>
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a href="javascript:void(0);" class="menu-toggle">
                    <i class="material-icons">view_list</i>
                    @if ($domain)
                        <span>Modules</span>
                    @else
                        <span>AfricaWebStudent</span>
                    @endif
                </a>
                <ul class="ml-menu">
                    <?php
                        if (in_array($tabIdmodule[0], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Admin/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Admin</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Admin : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[2], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Validation/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Validation</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Validation : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[3], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Resultats/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Résultats</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Résultats : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[8], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/InsertUE/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>InsertUE</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">InsertUE : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[4], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Carte/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Carte</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Carte : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[5], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Releve/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Relevé|Attestation|Scolarité</a></li>';
                        }else{
                            echo '<li><li><a href="javascript:void(0)">Relevé|Attestation|Scolarité : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[11], $array)) {
                            $lien = 'https://gestbook.africawebstudent.org/user/login?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>GestBook</a></li>';
                        }else{
                            echo '<li><li><a href="javascript:void(0)">GestBook : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[12], $array)) {
                            $lien = 'https://geststock.africawebstudent.org/user/login?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>GestStock</a></li>';
                        }else{
                            echo '<li><li><a href="javascript:void(0)">GestStock : Module non activé pour votre établissement.</a></li>';
                        }
                    ?>
                </ul>
            </li>

            <li>
                <a href="javascript:void(0);" class="menu-toggle">
                    <i class="material-icons">view_list</i>
                    @if ($domain)
                        <span>Comptabilité</span>
                    @else
                        <span>AfricaWebStudent Comptabilité</span>
                    @endif
                </a>
                <ul class="ml-menu">
                    <?php
                    //echo $tabIdmodule[6];
                        if (in_array($tabIdmodule[6], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Comptable/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Comptabilité</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Comptabilité : Module non activé pour votre établissement.</a></li>';
                        }
                        if (in_array($tabIdmodule[4], $array)) {
                            $lien = 'https://progiciel.africawebstudent.org/Contrat/home.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Contrat</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Contrat : Module non activé pour votre établissement.</a></li>';
                        }
                    ?>
                </ul>
            </li>

            <li>
                <a href="javascript:void(0);" class="menu-toggle">
                    <i class="material-icons">view_list</i>
                    @if ($domain)
                        <span>NG</span>
                    @else
                        <span>AfricaWebStudent NG</span>
                    @endif
                </a>
                <ul class="ml-menu">
                    <?php
                        if (in_array($tabIdmodule[9], $array)) {
                            $lien = 'https://eval.africawebstudent.org/GS_NG/accueil_admin.php?token='.$token;
                            echo '<li><a href="'.$lien.'" target = _blank>Admin</a></li>';
                        }else{
                            echo '<li><a href="javascript:void(0)">Admin : Module non activé pour votre établissement.</a></li>';
                        }
                    ?>
                </ul>
            </li>

            <li class="header">INFORMATIONS</li>
            @if ($domain)
                <li>
                    <?php
                        $lien = 'https://tutoriel.africawebstudent.org/?token='.$token;
                        echo '<a href="'.$lien.'" target = _blank>
                            <i class="material-icons col-red">donut_large</i>
                            <span>Tuto</span>
                        </a>';
                    ?>
                </li>
                <li>
                    <?php
                        $lien = 'https://forum.africawebstudent.org/?token='.$token;
                        echo '<a href="'.$lien.'" target = _blank>
                            <i class="material-icons col-red">donut_large</i>
                            <span>Forum</span>
                        </a>';
                    ?>
                </li>
                <li>
                    <a href="https://africawebstudent.org/" target = _blank>
                        <i class="material-icons col-light-blue">donut_large</i>
                        <span>Site officel</span>
                    </a>
                </li>
            @else
                <li>
                    <?php
                        $lien = 'https://tutoriel.africawebstudent.org/?token='.$token;
                        echo '<a href="'.$lien.'" target = _blank>
                            <i class="material-icons col-red">donut_large</i>
                            <span>GestTuto</span>
                        </a>';
                    ?>
                </li>
                <li>
                    <?php
                        $lien = 'https://forum.africawebstudent.org/?token='.$token;
                        echo '<a href="'.$lien.'" target = _blank>
                            <i class="material-icons col-red">donut_large</i>
                            <span>GestForum</span>
                        </a>';
                    ?>
                </li>
                <li>
                    <a href="https://africawebstudent.org/" target = _blank>
                        <i class="material-icons col-light-blue">donut_large</i>
                        <span>Site officel AfricaWebStudent</span>
                    </a>
                </li>
            @endif
        </ul>
    </div>
    <!-- #Menu -->
    <!-- Footer -->
    @include('modulegs.partials.footer')
    <!-- #Footer -->
</aside>
