<?php
use App\Classes\jDate;
$jDate	= new jDate();
$persian = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
$english = [ 0 ,  1 ,  2 ,  3 ,  4 ,  5 ,  6 ,  7 ,  8 ,  9 ];
$today = str_replace($persian,$english , $jDate::forge(time())->format('Y-m-d'));
?>
@php(error_reporting(1))
<header id="page-topbar">
    <div class="navbar-header">
        <div class="container-fluid">
            <div class="float-right">

                <div class="dropdown d-inline-block d-lg-none ml-2">
                    <button type="button" class="btn header-item noti-icon waves-effect" id="page-header-search-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="mdi mdi-magnify"></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right p-0" aria-labelledby="page-header-search-dropdown">

                        <form class="p-3">
                            <div class="form-group m-0">
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="جستجو ..." aria-label="Recipient's username">
                                    <div class="input-group-append">
                                        <button class="btn btn-primary" type="submit"><i class="mdi mdi-magnify"></i></button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>




                <div class="dropdown d-none d-lg-inline-block ml-1">
                    <button type="button" class="btn header-item noti-icon waves-effect" data-toggle="fullscreen">
                        <i class="mdi mdi-fullscreen"></i>
                    </button>
                </div>

                <div class="dropdown d-inline-block">
                    <button type="button" class="btn header-item noti-icon waves-effect" id="page-header-notifications-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="mdi mdi-bell-outline"></i>
                        <span class="badge badge-danger badge-pill">3</span>
                    </button>
                    <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right p-0" aria-labelledby="page-header-notifications-dropdown">
                        <div class="p-3">
                            <div class="row align-items-center">
                                <div class="col">
                                    <h6 class="m-0"> اعلان ها </h6>
                                </div>
                                <div class="col-auto">
                                    <a href="#!" class="small"> مشاهده همه</a>
                                </div>
                            </div>
                        </div>
                        <div data-simplebar style="max-height: 230px;">
                            <a href="" class="text-reset notification-item">
                                <div class="media">
                                    <div class="avatar-xs mr-3">
                                                    <span class="avatar-title bg-primary rounded-circle font-size-16">
                                                        <i class="bx bx-cart"></i>
                                                    </span>
                                    </div>
                                    <div class="media-body">
                                        <h6 class="mt-0 mb-1 primary-font">سفارش شما ثبت شد</h6>
                                        <div class="font-size-12 text-muted">
                                            <p class="mb-1">لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم</p>
                                            <p class="mb-0"><i class="mdi mdi-clock-outline"></i> 3 دقیقه پیش</p>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <a href="" class="text-reset notification-item">
                                <div class="media">
                                    <img src="assets/images/users/avatar-3.jpg" class="mr-3 rounded-circle avatar-xs" alt="user-pic">
                                    <div class="media-body">
                                        <h6 class="mt-0 mb-1 primary-font">تونی استارک</h6>
                                        <div class="font-size-12 text-muted">
                                            <p class="mb-1">لورم ایپسوم متن ساختگی با تولید سادگی</p>
                                            <p class="mb-0"><i class="mdi mdi-clock-outline"></i> 1 ساعت پیش</p>
                                        </div>
                                    </div>
                                </div>
                            </a>
                            <a href="" class="text-reset notification-item">
                                <div class="media">
                                    <div class="avatar-xs mr-3">
                                                    <span class="avatar-title bg-success rounded-circle font-size-16">
                                                        <i class="bx bx-badge-check"></i>
                                                    </span>
                                    </div>
                                    <div class="media-body">
                                        <h6 class="mt-0 mb-1 primary-font">محصول شما ارسال شد</h6>
                                        <div class="font-size-12 text-muted">
                                            <p class="mb-1">لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم</p>
                                            <p class="mb-0"><i class="mdi mdi-clock-outline"></i> 3 دقیقه پیش</p>
                                        </div>
                                    </div>
                                </div>
                            </a>

                            <a href="" class="text-reset notification-item">
                                <div class="media">
                                    <img src="assets/images/users/avatar-4.jpg" class="mr-3 rounded-circle avatar-xs" alt="user-pic">
                                    <div class="media-body">
                                        <h6 class="mt-0 mb-1 primary-font">استیو راجرز</h6>
                                        <div class="font-size-12 text-muted">
                                            <p class="mb-1">لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت</p>
                                            <p class="mb-0"><i class="mdi mdi-clock-outline"></i> 1 ساعت پیش</p>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </div>
                        <div class="p-2 border-top">
                            <a class="btn btn-sm btn-link font-size-14 btn-block text-center" href="javascript:void(0)">
                                <i class="mdi mdi-arrow-right-circle mr-1"></i> مشاهده بیشتر ...
                            </a>
                        </div>
                    </div>
                </div>

                <div class="dropdown d-inline-block">
                    <button type="button" class="btn header-item waves-effect" id="page-header-user-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <img class="rounded-circle header-profile-user" src="https://admin.borjeweb.com/accounts/{{$_COOKIE['admin'].$_COOKIE['number']}}/{{$_COOKIE['admin'].$_COOKIE['number']}}.JPG" onerror=" src='{{url('assets/images/users/avatar-2.jpg')}}'" alt="">
                        <span class="d-none d-xl-inline-block ml-1">جان</span>
                        <i class="mdi mdi-chevron-down d-none d-xl-inline-block"></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-right">
                        <!-- item-->
                        <a class="dropdown-item" href="#"><i class="bx bx-user font-size-16 align-middle mr-1"></i> پروفایل</a>
                        <a class="dropdown-item" href="#"><i class="bx bx-wallet font-size-16 align-middle mr-1"></i>
                            <form action="saveprofilepic" method="post" enctype="multipart/form-data">@csrf<br>
                                <hr style=" margin: 0px;color: black"><label style="padding: 0px">select your image</label><br>
                                <h6 style="color: red;"> حد اکثر حجم تصاویر (2) مگابایت میباشد </h6>
                                <a href="https://imagecompressor.com/" >برای کم کردن حجم تصاویر<label style="color: blue ">کلیک</label> کنید</a>

                                <input style="padding-left: 20%" type="file" name="image" id="image" value="upload">
                                <input type="hidden" name="imagename" value="{{$_COOKIE['admin'].$_COOKIE['number']}}">
                                <br>
                                <input class="btn btn-success" type="submit" value="upload image">
                                <hr style=" margin: 0px;color: black">
                            </form>
                        </a>
                        <a class="dropdown-item d-block" href="#"><span class="badge badge-success float-right">11</span><i class="bx bx-wrench font-size-16 align-middle mr-1"></i> تنظیمات</a>
                        <a class="dropdown-item" href="#"><i class="bx bx-lock-open font-size-16 align-middle mr-1"></i> قفل صفحه</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item text-danger" href="{{url('logOutMy')}}"><i class="bx bx-power-off font-size-16 align-middle mr-1 text-danger"></i> خروج</a>
                    </div>
                </div>

                <div class="dropdown d-inline-block">
                    <button type="button" class="btn header-item noti-icon right-bar-toggle waves-effect">
                        <i class="mdi mdi-settings-outline"></i>
                    </button>
                </div>

            </div>
            <div>
                <!-- LOGO -->
                <div class="navbar-brand-box">
                    <a href="index.html" class="logo logo-dark">
                                    <span class="logo-sm">
                                        <img src="assets/images/logo-sm.png" alt="" height="20">
                                    </span>
                        <span class="logo-lg">
                                        <img src="assets/images/logo-dark.png" alt="" height="17">
                                    </span>
                    </a>

                    <a href="index.html" class="logo logo-light">
                                    <span class="logo-sm">
                                        <img src="assets/images/logo-sm.png" alt="" height="20">
                                    </span>
                        <span class="logo-lg">
                                        <img src="assets/images/logo-light.png" alt="" height="19">
                                    </span>
                    </a>
                </div>

                <button type="button" class="btn btn-sm px-3 font-size-16 header-item toggle-btn waves-effect" id="vertical-menu-btn">
                    <i class="fa fa-fw fa-bars"></i>
                </button>

                <!-- App Search-->
                <form class="app-search d-none d-lg-inline-block">
                    <div class="position-relative">
                        <input type="text" class="form-control" placeholder="جستجو ...">
                        <span class="bx bx-search-alt"></span>
                    </div>
                </form>
{{--                <div class="position-relative"style="color: #fff !important;">
                    {{$jDate::forge(time())->format('امروز l dام ماه M')}}
                    {{$jDate::forge(time())->format('امروز l ')}}
                </div>--}}
            </div>

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


<!-- ========== Left Sidebar Start ========== -->
<div class="vertical-menu">

    <div class="h-100">

        <div class="user-wid text-center py-4">
            <div class="user-img">
                <img  src="https://admin.borjeweb.com/accounts/{{$_COOKIE['admin'].$_COOKIE['number']}}/{{$_COOKIE['admin'].$_COOKIE['number']}}.JPG" onerror=" src='{{url('assets/images/users/avatar-2.jpg')}}'" alt="" class="avatar-md mx-auto rounded-circle">
            </div>

            <div class="mt-3">

                <a href="#" class="text-dark font-weight-medium font-size-16 line-height-h">@if($Admin->name){{$Admin->name}}@else{{$_COOKIE['admin']}}@endif</a>
                <p class="text-body mt-1 mb-0 font-size-13">{{$_COOKIE['premisesFarsi']}}</p>

            </div>
        </div>

        <!--- Sidemenu -->
        <div id="sidebar-menu">
            <!-- Left Menu Start -->
            <form action="" method="post" id="sidebar">@csrf
                @if($_COOKIE['premises'] or  $_COOKIE['premisesFarsi'])
                    <ul class="metismenu list-unstyled" id="side-menu">
                        <li class="menu-title">

                            <a  class=" waves-effect">
                                <i class="mdi mdi-airplay"></i>
                                <span>Borje Web</span>

                            </a>
                        </li>


                        <li>
                            <a href="https://admin.borjeweb.com/" class=" waves-effect">
                                <i class="mdi mdi-airplay"></i>
                                <span>داشبورد </span>
                            </a>

                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="" onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/ticket'" onmouseup="document.getElementById('sidebar').submit()">
                                <i class="mdi mdi-flip-horizontal"  ></i>
                                <span>تیکت </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">


                            </ul>
                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span>وظایف </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/task'" onmouseup="document.getElementById('sidebar').submit()">
                                        وظیفه ها  </a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/addTask'" onmouseup="document.getElementById('sidebar').submit()">
                                        ایجاد وظیفه  </a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span>یاد داشت ها </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/note'" onmouseup="document.getElementById('sidebar').submit()">
                                        لیست یاداشت های من  </a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/addNote'" onmouseup="document.getElementById('sidebar').submit()">
                                        ایجاد یادداشت  </a></li>
                            </ul>
                        </li>

                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span> پروژه ها  </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/project'" onmouseup="document.getElementById('sidebar').submit()">
                                        لیست پروژه ها  </a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/addProject '" onmouseup="document.getElementById('sidebar').submit()">
                                        ایجاد پروژه</a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/projectInfo'" onmouseup="document.getElementById('sidebar').submit()">
                                        اطلاعات پروژه ها  </a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span> ادمین ها  </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/admins'" onmouseup="document.getElementById('sidebar').submit()">
                                        ادمین ها</a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/addadmins'" onmouseup="document.getElementById('sidebar').submit()">
                                        ایجاد ادمین  </a></li>

                            </ul>
                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span> مشتری ها  </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/users'" onmouseup="document.getElementById('sidebar').submit()">
                                        مشتری ها</a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/adduser'" onmouseup="document.getElementById('sidebar').submit()">
                                        ایجاد مشتری  </a></li>

                            </ul>

                        </li>

                        <li>
                            <a href="javascript:%20void(0);" class="has-arrow waves-effect">
                                <i class="mdi mdi-flip-horizontal"></i>
                                <span> تقویم </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/adminCalendarByDey/0'" onmouseup="document.getElementById('sidebar').submit()">
                                        روزانه </a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/adminCalendarByWeek/0 '" onmouseup="document.getElementById('sidebar').submit()">
                                        هفتگی</a></li>
                                <li><a onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/adminCalendarByMonth/0'" onmouseup="document.getElementById('sidebar').submit()">
                                        ماهانه </a></li>
                            </ul>
                        </li>


                    </ul>
                @else
                    <ul class="metismenu list-unstyled" id="side-menu">
                        <li class="menu-title">

                            <a  class=" waves-effect">
                                <i class="mdi mdi-airplay"></i>
                                <span>Borje Web</span>

                            </a>
                        </li>


                        <li>
                            <a href="https://admin.borjeweb.com/" class=" waves-effect">
                                <i class="mdi mdi-airplay"></i>
                                <span>داشبورد </span>
                            </a>

                        </li>
                        <li>
                            <a href="javascript:%20void(0);" class="" onmousedown="document.getElementById('sidebar').action = 'https://admin.borjeweb.com/ticket'" onmouseup="document.getElementById('sidebar').submit()">
                                <i class="mdi mdi-flip-horizontal"  ></i>
                                <span>تیکت </span>
                            </a>
                            <ul class="sub-menu" aria-expanded="false">


                            </ul>
                        </li>
     

                    </ul>
                @endif



            </form>
        </div>
        <!-- Sidebar -->
    </div>
</div>