D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
www
/
resources
/
views
/
manager
/
Filename :
promotions.blade.php
back
Copy
@extends('layouts.manager') @section('styles') @parent <link href="{{ asset('css/manager.css')}}" rel="stylesheet"> @endsection @section('scripts') @parent <script type="text/javascript" src="{{asset('public/js/manager_archive.js')}}"></script> <script src="{{asset('public/ckeditor/ckeditor.js')}}"></script> <script> CKEDITOR.replace('ckeditor'); </script> <script> $(function () { $('.from_to').click(function () { var urlParams = new URLSearchParams(window.location.search); //get all parameters var type_from = $('#type_from').val(); var type_to = $('#type_to').val(); var from = ''; var to = ''; if (type_from) { from = type_from; } else { from = urlParams.get('date_from'); } if (type_to) { to = type_to; } else { to = urlParams.get('date_to'); } var str_link = '?order=desc'; str_link += '&date_from=' + from; str_link += '&date_to=' + to; document.location.href = str_link; }); $('#type_filter').click(function () { var val = $('#type').val(); if (val != '') { document.location.href = '/manager/promotions?type=' + val; } else { document.location.href = '/manager/promotions'; } }); get_checked(); $('.form-check-input').click(function () { get_checked(); }); function get_checked() { var input_checked = 0; $('.form-check-input').each(function () { if ($(this).is(':checked')) { input_checked++; } }); $('#checked_inputs').text(input_checked); } }); </script> @endsection @section('content') <div class="container"> <div class="row"> <div class="col-md-12 bodycon"> <div class="panel-body main_body"> <div class="main_page"> @include('manager.includes.links') <div class="text"> <div class="big_div"> </div> </div> <div class="main_page"> <!-- Nav tabs --> <ul class="nav nav-tabs nav-mama" role="tablist"> <li role="presentation" class="{{(!request()->page?'active':'')}}"><a href="#home" aria-controls="home" role="tab" data-toggle="tab" aria-expanded="true">Send to emails</a></li> <li role="presentation" class=""><a href="#services" aria-controls="calculate" role="tab" data-toggle="tab" id="choose_service" class="all_artists cities" aria-expanded="false">Get emails by contracts</a> </li> <li role="presentation" class=""><a href="#csv" aria-controls="calculate" role="tab" data-toggle="tab" id="choose_csv" class="csv" aria-expanded="false">Get emails by CSV-file</a> </li> <li role="presentation" class="{{(request()->page?'active':'')}}"><a href="/manager/promotions?page=1" id="choose_archive" class="all_archive">Promotions archive</a></li> </ul> <!-- Tab panes --> <div class="tab-content"> <div role="tabpanel" class="tab-pane {{(!request()->page?'active':'')}}" id="home"> <div class="text"> <h3 class="light"> <form class="form-horizontal" method="post" action="{{asset('manager/promotion')}}"> {!! csrf_field() !!} <div class="form-group"> <div class="col-md-12"> <div class="row"> <div class="col-md-10"> <select class="form-control select" id="type" name="type"> <option value="">All</option> <option value="tattoo" @if(isset(request()->type)) {{request()->type == 'tattoo' ? 'selected' : ''}} @endif>Tattoo only </option> <option value="piercing" @if(isset(request()->type)) {{request()->type == 'piercing' ? 'selected' : ''}} @endif>Piercing only </option> <option value="none" @if(isset(request()->type)) {{request()->type == 'none' ? 'selected' : ''}} @endif>None </option> </select> <button type="button" id="type_filter" class="btn btn-warning btn-block"> Filter </button> <table width="100%" class="table table-full btn-sm"> <tr> <th>Input</th> <th>Email</th> <th>Name</th> <th>Type</th> <th>Promo</th> </tr> @foreach($promotions_emails as $promotion_email) <tr align="left"> <td> @php $tt = ''; if($promotion_email->contract){ if($promotion_email->contract->promo == 0){ $tt = 'disabled'; }else{ if($promotion_email->promo == 0){ $tt = 'disabled'; }else{ $tt = 'checked'; } } }else{ if($promotion_email->promo == 0){ $tt = 'disabled'; }else{ $tt = 'checked'; } } if($tt != 'disabled'){ if(isset(request()->type)){ if($promotion_email->contract){ if($promotion_email->contract->type == request()->type){ $tt = 'checked'; }else{ $tt = ''; } } } } @endphp <input class="form-check-input" {{$tt}} type="checkbox" name="promotions[]" id="prom_{{$promotion_email->id}}" value="{{$promotion_email->id}}"/> </td> <td>{{$promotion_email->email}}</td> <td> @if($promotion_email->name) {{$promotion_email->name}} @else @if($promotion_email->contract) {{$promotion_email->contract->name}} @endif @endif </td> <td> @if($promotion_email->contract) {{$promotion_email->contract->type}} @else {{$promotion_email->status}} @endif </td> <td>{{$promotion_email->promo}} @if($promotion_email->contract) {{$promotion_email->contract->promo}} @endif </td> </tr> @endforeach <tr> <th colspan="5" align="left"> <b id="checked_inputs"></b> <a class="btn btn-danger" href="/manager/promotions_clear" id="clear"> Clear </a> <a class="btn btn-success" href="/manager/promotions?cleared=true" id="clear"> Cleared </a> </th> </tr> </table> <div class="" align="left"> </div> </div> <div class="col-md-2"> <!-- <label class="col-md-3 control-label">Date</label> <input class="date form-control" type="date" name="type_from" id="type_from" value="{{(request()->date_from)?request()->date_from:date('Y-m-d')}}" checked> <label class="form-check-label btn-sm" for="type_from"> From {{(request()->date_from)?request()->date_from:date('Y-m-d')}} </label><br/> <input class="form-check-input form-control" type="date" name="type_to" id="type_to" value="{{(request()->date_to)?request()->date_to:date('Y-m-d')}}"> <label class="form-check-label btn-sm" for="type_to"> To {{(request()->date_to)?request()->date_to:date('Y-m-d')}} </label> <br/> <a class="btn btn-link btn-sm from_to" id="to"> Change </a> --> </div> </div> </div> </div> <!-- <div class="form-group"> <label class="col-md-3 control-label">Type</label> <div class="col-md-9"> <div class="form-check form-check-inline"> <input class="form-check-input" type="checkbox" name="type_tatoo" id="type_tatoo" value="Tattoo" checked> <label class="form-check-label" for="type_tatoo"> Tattoo </label> <input class="form-check-input" type="checkbox" name="type_piercing" id="type_piercing" value="Piercing"> <label class="form-check-label" for="type_piercing"> Piercing </label> </div> </div> </div> --> <div class="form-group"> <label class="col-md-3 control-label">Subject</label> <div class="col-md-9"> <input type="text" name="thema" class="form-control"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label">Picture</label> <div class="col-md-9"> <input type="file" name="picture" class=""> </div> </div> <div class="form-group"> <label class="col-md-3 control-label">Message</label> <div class="col-md-9"> <textarea required="" class="form-control ckeditor fon" name="body" rowspace="6" id="ckeditor"><table align="center" bgcolor="#FFFBE0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan=2> <img src="https://tattooscalculator.com/img/banner.jpg" width="100%"> </td> </tr> <tr> <td colspan=2> <p align="center"> C’est bientôt les soldes d’été chez American Body Art ! </p> <p align="center"> Du 9 au 30 juin, tous nos salons à Paris vous proposent une remise de 20% sur les produits et services. </p> <p> C’est le moment de réaliser vos projets ! Nos artistes tatoueurs et perceurs vous attendent pour vous conseiller et vous offrir la meilleure prestation. </p> <ul> <li><a href='https://www.google.fr/maps/place/American+Body+Art/@48.8607263,2.2671244,12z/data=!3m1!5s0x47e66e1eb0384b0d:0x8f19a5d85466d937!4m6!3m5!1s0x47e66e1eed64d403:0xfb9917d06133c158!8m2!3d48.8606428!4d2.3496984!16s%2Fg%2F1vg4j2xk?entry=tts&g_ep=EgoyMDI1MDUyOC4wIPu8ASoASAFQAw%3D%3D&skid=b9bed283-ac91-4b1a-8589-900570f54ee5'>24 boulevard de Sébastopol, 75004, Paris</a> </li> <li><a href='https://www.google.fr/maps/place/American+Body+Art+-+tattoo+piercing+shop/@48.86022,2.3457185,18z/data=!4m7!3m6!1s0x47e66e1eed64d403:0x393a773520d5b8b8!8m2!3d48.8603718!4d2.347757!15sChFhbWVyaWNhbiBib2R5IGFydCIDiAEBWhMiEWFtZXJpY2FuIGJvZHkgYXJ0kgEYdGF0dG9vX2FuZF9waWVyY2luZ19zaG9wqgFgCg0vZy8xMWg4ZHZzczlxEAEqFSIRYW1lcmljYW4gYm9keSBhcnQoBDIfEAEiG75OGO4wALxdLOjaNOzKJ5DNBTpbJY6Uc-68hzIVEAIiEWFtZXJpY2FuIGJvZHkgYXJ04AEA!16s%2Fg%2F1hc2hk6bx?entry=tts&g_ep=EgoyMDI1MDUyOC4wIPu8ASoASAFQAw%3D%3D&skid=f1c6fb3f-d87a-41bf-bb34-52a0bb3fee70'>7 rue des Innocents, 75001, Paris</a> </li> <li><a href='https://www.google.fr/maps/place/American+Body+Art/@48.8750664,2.3300417,18z/data=!4m7!3m6!1s0x47e66e37ad6601bb:0xb0adf9752cc38d2b!8m2!3d48.874703!4d2.3320802!15sChFhbWVyaWNhbiBib2R5IGFydCIDiAEBWhMiEWFtZXJpY2FuIGJvZHkgYXJ0kgEYdGF0dG9vX2FuZF9waWVyY2luZ19zaG9wqgFgCg0vZy8xMWg4ZHZzczlxEAEqFSIRYW1lcmljYW4gYm9keSBhcnQoBDIfEAEiG75OGO4wALxdLOjaNOzKJ5DNBTpbJY6Uc-68hzIVEAIiEWFtZXJpY2FuIGJvZHkgYXJ04AEA!16s%2Fg%2F11btlxzmzs?entry=tts&g_ep=EgoyMDI1MDUyOC4wIPu8ASoASAFQAw%3D%3D&skid=23ca0ed9-3ddc-463e-a82d-7d8358ccfc99'>4 rue Joubert, 75009, Paris</a> </li> <li><a href='https://www.google.fr/maps/place/American+Body+Art/@48.8496051,2.340398,18z/data=!4m7!3m6!1s0x47e671d711be05b3:0x9dbd7726b77acddd!8m2!3d48.8496051!4d2.3424579!15sChFhbWVyaWNhbiBib2R5IGFydCIDiAEBWhMiEWFtZXJpY2FuIGJvZHkgYXJ0kgEYdGF0dG9vX2FuZF9waWVyY2luZ19zaG9wqgFgCg0vZy8xMWg4ZHZzczlxEAEqFSIRYW1lcmljYW4gYm9keSBhcnQoBDIfEAEiG75OGO4wALxdLOjaNOzKJ5DNBTpbJY6Uc-68hzIVEAIiEWFtZXJpY2FuIGJvZHkgYXJ04AEA!16s%2Fg%2F11w85nbgpc?entry=tts&g_ep=EgoyMDI1MDUyOC4wIPu8ASoASAFQAw%3D%3D&skid=b62cd21b-af7a-4959-b85e-6adcbf4d3453'>35 boulevard Saint-Michel, 75005, Paris</a> </li> </ul> </td> </tr> <tr> <td width="50%" style="text-align:center"> <p style="text-align:center"> <a style="padding:2px; color:white; background:black" href="https://www.americanbodyarttatouage.com/book-online?category=be84179d-4e66-46ce-b07b-36b6f230dd19">RESERVATION TATOUAGE</a> </p> </td> <td style="text-align:center"> <p style="text-align:center"> <a style="padding:2px; color:white; background:black" href="https://www.americanbodyarttatouage.com/book-online?category=2c89e218-453c-45a2-8ff8-79c415b85d81">RESERVATION PIERCING</a> </a> </td> </tr> </table> </textarea> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"> </label> <div class="col-md-9"> <button type="submit" class="btn btn-warning btn-block"> Send </button> </div> </div> </form> </h3> <br style="clear: both;"> </div> </div> <div role="tabpanel" class="tab-pane" id="services"> <br style="clear: both;"> <div class="text text-center"> <br/> To find email from contracts choose date contracts coming. <form class="form-horizontal" method="get" action="{{asset('manager/promotion/contracts')}}"> {!! csrf_field() !!} <div class="form-group"> <label class="col-md-3 control-label">Contracts date from</label> <div class="col-md-9"> <input type="date" value="{{$promotion_email_last->created_at->format('Y-m-d')}}" name="contract_date_from" max="{{date('Y-m-d',strtotime("-1 days"))}}" class="form-check-input form-control"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"> Contracts date to </label> <div class="col-md-9"> <input type="date" value="{{date('Y-m-d',strtotime("-1 days"))}}" name="contract_date_to" max="{{date('Y-m-d',strtotime("-1 days"))}}" class="form-check-input form-control"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"> </label> <div class="col-md-9"> <button type="submit" class="btn btn-warning btn-block"> Find emails by contract </button> </div> </div> </form> </div> </div> <div role="tabpanel" class="tab-pane" id="csv"> <br style="clear: both;"> <form class="form-horizontal" method="post" action="{{asset('manager/promotion/csv')}}" enctype="multipart/form-data"> {!! csrf_field() !!} <div class="form-group"> <label class="col-md-3 control-label">.CSV-file </label> <div class="col-md-9"> <input type="file" name="csv" class="form-check-input form-control"> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"> </label> <div class="col-md-9"> <button type="submit" class="btn btn-warning btn-block"> Upload </button> </div> </div> </form> </div> <div role="tabpanel" class="tab-pane {{(request()->page?'active':'')}}" id="archive"> <br style="clear: both;"> <div class="text"> <div class="tab-content index"> <table width="100%" class="table archive_table"> <tr> <th>#</th> <th> Message </th> <th> Count </th> <th> Salon </th> <th> Date </th> </tr> @foreach($promotions as $one) <tr> <td>{{$one->id}}</td> <td> <a href="#" class="btn btn-link" data-toggle="modal" data-target="#exam{{$one->id}}"> {!! $one->thema !!} </a> <div class="modal fade" id="exam{{$one->id}}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-white"> <div class="modal-header"> <button type="button" class="close close-close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> <h5 class="modal-title" id="exampleModalLabel">{{$one->thema}}</h5> </div> <div class="modal-body"> {!! $one->body !!} </div> </div> </div> </div> </td> <td> {{($one->counts)?:'-'}} </td> <td>{{(isset($one->saloons))?$one->saloons->name:''}}</td> <td>{{$one->created_at->format('d-m-Y H:i:s')}}</td> </tr> @endforeach </table> <p align="center"> {!! $promotions->links() !!} </p> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> @endsection