403Webshell
Server IP : 138.197.107.151  /  Your IP : 216.73.217.7
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux BloxBy-Builder 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : wpbetasites_mrakzqskir ( 1022)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/shark-admin/resources/views/websites/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/shark-admin/resources/views/websites/overview.blade.php
@extends('layouts.app')
@section('content')
<div class="main-content" id="result">
    <div class="page-content overview">
        <div class="container-fluid">
             @if($website->plan && $website->plan->type!=="one-time" && $website->is_cancellation_requested==1)
            <div class="mt-5 text-center verify-mail-error">
                Subscription ends at: {{ \Carbon\Carbon::parse($website->subscription_end)->format('d M Y, h:i A') }}
            </div>
            @endif
            <div class="row">
                <div class="top-flex pb-4">
                    {{-- @include("partials.messages.messages") --}}
                    <div>
                          <a href="{{route('users.websites.list',['id'=>$website->user->id])}}" class="mb-0 font-size-18 page-inner-title back-link-site">&lt; Back to Websites</a>
                    </div>
                    <div class="btn-group-overvw">
                            @if(!$website->plan)
                            <form  action="{{ route('website.remove',['id'=>$website->id]) }}" method="POST">
                                @csrf
                                @method('DELETE')
                                <button type="submit" class="btn btn-outline-primary button-text cyan mx-1 remove_website show_confirm_message" data-confirm-msg="Are you sure you want to delete this website?&lt;div class='mt-3'&gt;Note: Please note that once deleted, this cannot be restored.&lt;/div&gt;" data-bs-toggle="tooltip" data-bs-placement="top" note="" title="" data-bs-original-title="">
                                   <img src="{{ asset('assets/images/delete.svg') }}" height="18" alt="icon"> Delete 
                                </button>
                            </form>
                                
                            @endif
                            
                            @php
                                $signature = @hash_hmac('sha256', "site_id_".$website->id."|email_id_info@site.com", env('WP_SSO_KEY'));


                            @endphp
                            
                            <a class="btn btn-outline-primary button-text cyan mx-1" href="{{$website->domain && $website->domain_status=='completed' ? 'https://'.$website->domain.'/index.php/wp-json/wp/v1/autologin?payload='.$signature : 'https://'.@$server_meta['domain'].'.bloxby.io/index.php/wp-json/wp/v1/autologin?payload='.$signature.'&email=info@site.com'}}" target="_blank" class="btn btn-outline-primary button-text">
                                <img src="{{ asset('assets/images/wp.svg') }}" alt="icon"> WP Admin
                            </a>
                            
                            
                    </div>
                </div>
                <div class="col-12">
                    <div class="page-title-box d-flex align-items-center gap-3 pb-2">
                    <h4 class="mb-0  page-inner-title">{{$website->title}} <span>{{$website->plan ? $website->plan->title : "" }}</span></h4>
                    <?php /*<a href="#" target="_blank" class="btn btn-outline-primary button-text edit"><img src="/assets/images/edit.svg" alt="icon"> Edit</a>*/ ?>
                </div>
                <div>
                    <a href="{{$website->domain && $website->domain_status=='completed'  ? 'https://'.$website->domain : 'https://'.@$server_meta['domain'].'.bloxby.io'}}" class="site-link" target="_blank">
                        {{$website->domain && $website->domain_status=='completed'  ? $website->domain : @$server_meta['domain'].'.bloxby.io'}}
                    </a>
                </div>
                    <div class="mt-2">
                        @if($website->status === 'inprogress' || $website->status === 'pending')
                        Under construction
                        @elseif($website->status === 'error')
                        Error
                        @elseif($website->status === 'completed')
                        <!-- Completed -->
                        @endif
                    </div>
                </div>

                <div class="web-details top-flex w-50 pt-4">
                    <div>
                        <span>Environment</span>
                        
                        <p>{{$website->domain ? "Live" : "Sandbox"}}</p>
                    </div>
                      <div>
                        <span>IPV4 address</span>
                        <p>{{env("SERVER_IP")}}</p>
                    </div>
                      <div>
                        <span>SSL</span>
                        <p><img  class="active-icon" src="/assets/images/active.svg" alt="icon"> Active SSL<p>
                    </div>
                </div>

            </div>


            
            <div class="card mt-3 bg-transparent shadow-none">
                <div class="card-body m-0 p-0">
                    @php
                        $server_meta = @json_decode($website->server_meta, true);

                        $show_drop_down = true;

                        $download_zip_request = null;
                        
                        $menu_options = [
                            "ftp"=>true,
                            "domain"=>false,
                            "remove_domain"=>false,
                            "zip"=>false,
                            "download_zip"=>false
                        ];

                        if(!$website->plan){
                            $show_drop_down = false;
                        }
                        
                        if($website->plan){
                            if($website->plan->type!=="one-time"){
                                $menu_options["ftp"] = true;

                                if($website->domain==null){
                                    $menu_options["domain"] = true;
                                    $menu_options["remove_domain"] = false;
                                } else {
                                    $menu_options["domain"] = false;
                                    $menu_options["remove_domain"] = true;
                                }
                                $menu_options["zip"] = false;

                                $menu_options["download_zip"] = false;
                            } else {
                                $menu_options["ftp"] = true;

                                $menu_options["domain"] = false;
                                $menu_options["remove_domain"] = false;

                                $menu_options["zip"] = true;

                                $download_zip_request = $website->latestCompleteWebsiteArchiveRequest($website->id);

                                if($download_zip_request){
                                    $menu_options["download_zip"] = true;
                                }
                            }
                        } 
                        
                    @endphp
                    <div id="tabs">
                        <ul class="nav nav-tabs nav-tabs-custom fs-4">
                            <li class="nav-item"><a data-bs-toggle="tab" class="nav-link bg-transparent active" href="#tab-overview">Site Information</a></li>
                            @if($menu_options["ftp"])
                            <li class="nav-item"><a data-bs-toggle="tab" class="nav-link bg-transparent" href="#tab-ftp">FTP Information</a></li>
                            @endif
                            @if( $menu_options["domain"] || $menu_options["remove_domain"])
                            <li  class="nav-item"><a data-bs-toggle="tab" class="nav-link bg-transparent" href="#tab-domain">Domains</a></li>
                            
                            @endif
                            @if($menu_options["zip"] || $menu_options["download_zip"])
                             <li  class="nav-item"><a data-bs-toggle="tab" class="nav-link bg-transparent" href="#tab-backup">Backup</a></li>
                            @endif
                            
                        </ul>
                        <style>
                            .fa-spinner {
                                animation: 5s linear infinite fa-spinner;
                            }
                            @keyframes fa-spinner {
                              to { transform: rotate(360deg) }
                            }
                        </style>
                        <div class="tab-content py-5">
                            <div class="tab-pane active" id="tab-overview">
                                <div class="cards-wrapper">
                                    <div class="dash-card pagescore-card card p-4 shadow-sm border-1 border-dark text-black">
                                        <div class="dash-card-head d-flex align-items-start justify-content-between">
                                            <div>
                                                <h3 class="title fs-4 text-black">PageSpeed Score</h3>
                                                <div class="date fs-5 text-muted" id="analyzedDate">Last Analyzed: ...</div>
                                            </div>
                                            <button class="btn btn-primary rounded-3" id="refreshPageSpeed"><i class="fas fa-redo-alt fa-spinner"></i>   Reanalyze</button>
                                        </div>

                                        <div class="pagescore-result-grid mt-4">
                                          <div class="pagescore-result-wrap">
                                            <div class="circle-wrap-bg">
                                                <div class="circle" id="desktopScore">
                                                    <img src="/assets/images/spinner-dots.svg" width="40px" height="40px">
                                                </div>
                                            </div>
                                            <div class="pagescore-result-score">
                                                <div class="label fs-6 text-muted mb-1">Desktop Score</div>
                                                <div class="load-time fs-5" id="desktopLoad">Load Time: --</div>
                                            </div>
                                            
                                          </div>
                                          <div class="pagescore-result-wrap">
                                            <div class="circle-wrap-bg">
                                                <div class="circle" id="mobileScore">
                                                    <img src="/assets/images/spinner-dots.svg" width="40px" height="40px">
                                                </div>
                                            </div>
                                            <div class="pagescore-result-score">
                                                <div class="label fs-6 text-muted mb-1">Mobile Score</div>
                                                <div class="load-time fs-5" id="mobileLoad">Load Time: --</div>
                                            </div>
                                          </div>
                                        </div>

                                        <div class="pagescore-note p-2 rounded-3 bg-light mt-4 text-center">🚀 Boost your website performance and security with Bloxby Hosting.</div>
                                    </div>
                                    <div class="d-flex w-100 gap-4 pagescore-block">

                                        <div class="dash-card  pagescore-card card p-5 shadow-sm border-1 border-dark text-black w-100 align-items-center justify-content-center">
                                            <!--<h4 class="text-black text-center">Plugins & Updates</h4>
                                            <p class="text-center text-muted">Always up to date for top performance and security.</p>-->
                                            <p class="card-text text-muted text-center"><strong>Generated on:</strong> {{ $website->created_at ? $website->created_at->setTimezone(env('TIMEZONE_USER'))->format('d F Y, h:i A'):"NA" }}</p>
                                <p class="card-text text-muted "><strong>Size:</strong> <span class="<?php if ($website->usage > 400) {
                                                                                                            echo 'text-danger';
                                                                                                        } ?>">{{ $website->usage ? round($website->usage,2)." mb":"Calculating.." }}</span></p>
                                <?php if ($website->usage > 400) {  ?><span class="<?php if ($website->usage > 400) {
                                                                                        echo 'text-danger';
                                                                                    } ?>">Your website usage has been exceeded 400mb</span><?php } ?>
                                        </div>

                                        <div class="dash-card coming-soon pagescore-card pagescore-card-inner card p-5 shadow-sm border-1 border-dark w-100 text-black align-items-center justify-content-center">
                                             <div class="dropdown d-inline-block dropdown-inner">
                                                <button type="button" class="btn  waves-effect disable" id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                    <span class="d-none d-xl-inline-block ms-1" key="t-henry">Last 7 Days</span>
                                                    <i class="mdi mdi-chevron-down d-none d-xl-inline-block"></i>
                                                </button>
                                                <div class="dropdown-menu dropdown-menu-end">
                                                    <a class="dropdown-item" href="#">
                                                        <span >One Month</span></a>
                                                    <div class="dropdown-divider"></div>
                                                     <a class="dropdown-item" href="#">
                                                        <span >One Month</span></a>
                                                </div>
                                            </div>

                                            <h4 class="text-black text-center">Site Visits</h4>
                                             <p class="text-center text-muted">This section will display your Bloxby site’s traffic data as soon as visitors start arriving.</p>
                                        </div>
                                    </div>
                                </div>
                                
                               
                               
                            </div>
                            @if($menu_options["ftp"])
                            <div class="tab-pane" id="tab-ftp">
                                <div class="ftp-details web-details p-4 shadow-sm border-1 border-dark">
                                <div><span>Host:</span> <p id="sftpHost">{{$sftp_ip}}</p></div>
                                <div><span>Port:</span> <p id="sftpPort">22</p></div>
                                <div><span>Username:</span> <p id="sftpUser">{{$sftp_user}}</p></div>
                                <div><span>Password:</span> <p id="sftpPass">{{$sftp_pass}}</p></div>
                                </div>
                            </div>
                            @endif
                            @if($menu_options["domain"] || $menu_options["remove_domain"])
                            <div class="tab-pane" id="tab-domain">
                                @if(!$website->domain)
                                <div class="domain-sec">
                                      No domains attached
                                    
                                    <a  data-website="{{$website->id}}" data-action="{{$website->plan ? 'attach-domain' : 'view-plans'}}" href="{{route('website.domain.add',[$website->id])}}" target="_blank" class="btn btn-outline-primary button-text attach-domain">
                                        Attach a Domain
                                    </a>
                                </div>
                              
                                @else
                                <table class="table w-100 table-domain">
                                    <tr>
                                        
                                        <th>Domain</th>
                                        <th>DNS status</th>
                                        <th>SSL</th>
                                        <th>Status</th>
                                        <th></th>
                                    </tr>
                                    <tr>
                                        <td>{{$website->domain}}</td>
                                        
                                        <td>
                                            @if($dns_status)
                                            <img width="24" src="{{ asset('assets/images/icons/check-green.png') }}" />
                                            @else
                                            <img width="20" src="{{ asset('assets/images/icons/remove-red.png') }}" />
                                            @endif
                                        </td>
                                        <td>
                                            @if($website->domain_status=="completed")
                                            <img width="24" src="{{ asset('assets/images/icons/check-green.png') }}" />
                                            @else
                                            <img width="20" src="{{ asset('assets/images/icons/remove-red.png') }}" />
                                            @endif
                                        </td>
                                        <td>
                                            @if($website->domain_status=="pending")
                                            Pending
                                            @endif
                                            @if($website->domain_status=="completed")
                                            Pointed
                                            @endif
                                            @if($website->domain_status=="inprogress")
                                            In progress
                                            @endif
                                            @if($website->domain_status=="error")
                                            Error
                                            @endif
                                        </td>
                                        <td class="text-end">
                                            <a href="javascript:;" target="_blank" class="btn btn-outline-primary button-text dns-instructions-btn">
                                                View DNS Instructions
                                            </a>
                                             @if($website->domain_status=="completed")
                                            <a href="{{route('website.domain.remove',[$website->id])}}" class="btn btn-outline-primary button-text">
                                                Unattach Domain
                                            </a>
                                            @endif
                                             @if($website->domain_status=="pending")
                                             <form style="display:inline-block;" method="GET" action="{{route('website.domain.delete',[$website->id])}}">
                                            <a href="{{route('website.domain.delete',[$website->id])}}" class="btn btn-outline-primary button-text show_confirm_message" data-confirm-title="Delete Domain" data-confirm-msg="Are you sure you want to delete this domain?">
                                                Delete Domain
                                            </a>
                                                                                </form>
                                            @endif
                                        </td>
                                    </tr>
                                </table>
                                @endif
                                                                
                            </div>
                            @endif
                            <div class="tab-pane" id="tab-backup">
                                @php
                                    $download_zip_request = null;
                        
                        
                        
                                    if($website->plan){
                                        if($website->plan->type=="one-time"){
                                            $download_zip_request = $website->latestCompleteWebsiteArchiveRequest($website->id);
                                        } 
                                    }   
                                @endphp
                                @if($download_zip_request)
                                <table class="table table-domain cards-wrapper">   
                                    <tr>
                                        
                                        <th>Date Time</th>
                                        <th>Description</th>
                                        
                                        <th></th>
                                    </tr>
                                    <tr>
                                        <td>{{$download_zip_request->created_at->format('d M. Y h:i A')}}</td>
                                        
                                        <td>
                                           Website backup
                                        </td>
                                        
                                        <td class="text-end">
                                            <a href="https://backups.bloxby.io/{{env('ENVIRONMENT')}}/{{$download_zip_request->backup_file}}" target="_blank" class="btn btn-outline-primary button-text dns-instructions-btn">
                                                Download Now
                                            </a>
                                             
                                        </td>
                                    </tr>
                                </table>
                                @else
                                No downloads are ready
                                @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    @include('partials.modals.confirm_modal',['title'=>"Delete website"])
    @include('partials.modals.sftp_modal',['title'=>"SFTP credentials"])
    @include('partials.modals.attach_domain_modal',['title'=>"Add domain"])
     @include('partials.modals.dns_instructions_modal',['title'=>"DNS instructions"])
</div>
<div class="modal fade" id="pricingPlansModal" tabindex="-1" aria-labelledby="pricingPlansModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-body">
                <div class="text-end">
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div id="pricingPlansContainer">
                    <p class="loading-text">Loading...</p>
                </div>
            </div>
        </div>
    </div>
</div>

@endsection
@push('scripts')
<script>
    var clicked_confirm_action = null;

    $(".show_confirm_message").click(function(e) {
        e.preventDefault();

        clicked_confirm_action = $(this);

        $("#confirmModal").find(".modal-body").html($(this).attr("data-confirm-msg"));

        if($(this).attr("data-confirm-title")){
            $("#confirmModal").find(".modal-title").html($(this).attr("data-confirm-title"));
        }
        $("#confirmModal").modal("show");



    })
    $("#confirmYesBtn").click(function() {
        clicked_confirm_action.closest("form").submit();
    })
    $(".show_cancel_confirm_message").click(function(e) {
        e.preventDefault();

        clicked_confirm_action = $(this);

        $("#confirmModal").find(".modal-body").html($(this).attr("data-confirm-msg"));

        $("#confirmModal").modal("show");

        $("#confirmModalLabel").html("Cancel plan");


    })
    $(".attach-domain").click(function(e) {
        e.preventDefault();

        //if($(this).attr("data-action")=="attach-domain"){
            $("#domainForm").attr("action", $(this).attr("href"));
            $("#attachDomainModal").modal("show");
        /*} else {
            loadPricingPlans($(this).attr("data-website"))
        }*/
    });
    $(".dns-instructions-btn").click(function(e) {
        e.preventDefault();

        
            $("#dnsInstructionsModal").modal("show");
        
    });
</script>
<script>
    function loadPricingPlans(websiteId) {
        $('#pricingPlansModal').modal('show');
        $('#pricingPlansContainer').html('<div class="loader"><img src="/loader.svg"></div>');

        $.ajax({
            url: `/pricing-plans/website/${websiteId}/list`,
            method: 'GET',
            success: function(response) {
                $('#pricingPlansContainer').html(response);
            },
            error: function() {
                $('#pricingPlansContainer').html('<p class="text-danger">Failed to load plans.</p>');
            }
        });
    }
    $(".vew_sftp_credentials").on("click", function() {

        $("#sftpModal").modal("show");

        $.ajax({
            url: "/websites/sftp", // your backend PHP route
            type: "GET",
            data: {
                website_id: $(this).attr("data_website_id")
            },
            dataType: "HTML",
            success: function(response) {
                $("#sftpModal").find(".modal-body").html(response);
            },
            error: function() {
                alert("Error fetching SFTP credentials.");
            }
        });
    });
    /*$(".remove_website").click(function(e){
        e.preventDefault();
        if(confirm("Are you sure?")){
           $(this).closest('form').submit();
        }   
    })*/
</script>
<script src="{{ asset('assets/validate/jquery.validate.min.js')}}"></script>
<script type="text/javascript">
    $(function() {

        $.validator.addMethod("domain", function(value, element) {
            return this.optional(element) || /^(?!:\/\/)([a-zA-Z0-9-_]+\.)+[a-zA-Z]{2,}$/.test(value);
        }, "Please enter a valid domain name (e.g., example.com)");

        $("#domainForm").validate({
            submitHandler: function(form) {
                // Disable button to prevent duplicate submissions
                $("#submitDomainBtn").prop("disabled", true);

                form.submit(); // submit the form after disabling
            },
            rules: {
                domain: {
                    required: true,
                    domain: true
                }

            },
            messages: {
                domain: {
                    required: "Domain name is required",
                    domain: "Domain must be valid (e.g., example.com, my-site.org)."
                }
            },
            errorPlacement: function(error, element) {
                error.insertAfter(element); // Default placement
            }
        })
    });
    $(document).on("change", "#recurringPlanToggle", function() {
        if ($(this).prop('checked')) {
            var plan_id = $(this).attr("data_plan_id");

            $("#price-row-" + plan_id).html($(this).attr("data_attr_yearly_price"));

            $("#plan_row_" + plan_id).html($(this).attr("data_yearly_plan_id"));
        } else {
            var plan_id = $(this).attr("data_plan_id");


            $("#price-row-" + plan_id).html($(this).attr("data_attr_monthly_price"));

            $("#plan_row_" + plan_id).html($(this).attr("data_monthly_plan_id"));
        }
    })
    $(document).on("click", ".plan-switch", function() {
        var plan = $(this).attr("data_plan");

        if(plan=="yearly"){
            $(".yearlyplan").hide();
            $(".monthlyplan").show();
        } else {
            $(".yearlyplan").show();
            $(".monthlyplan").hide();
        }
    })
    // store the currently selected tab in the hash value
    $("ul.nav-tabs > li > a").on("shown.bs.tab", function(e) {
        e.preventDefault();
        var id = $(e.target).attr("href").substr(1);
        history.replaceState(null, null, '#' + id);
    });

    // on load of the page: switch to the currently selected tab
    var hash = window.location.hash;
    let triggerEl = document.querySelector('.nav-tabs a[href="' + hash + '"]');

    if (triggerEl) {
        let tab = new bootstrap.Tab(triggerEl);
        tab.show();
    }


    /**
     * Page Speed API
     * */
    function getScoreClass(score) {
      if (score < 50) return "fail";
      if (score < 90) return "average";
      return "pass";
    }
    function fetchPageSpeed(websiteId, live = false) {
        $.ajax({
          url: "{{url('websites/pagespeed')}}",
          type: "POST",
          contentType: "application/json",
          headers: {
            "X-CSRF-TOKEN": '{{ csrf_token() }}'
          },
          data: JSON.stringify({ website_id: websiteId, refresh: live }),
          success: function(response) {
            console.log("PageSpeed Data:", response);

            // Update analyzed date
            $("#analyzedDate").text(
              "Last Analyzed: " + (new Date(response.last_analysed_at).toLocaleString() || new Date().toLocaleString())
            );

            // Desktop score
            let desktop_score = response.results.desktop_score * 100;
            $("#desktopScore")
              .text(desktop_score)
              .removeClass("fail average pass")
              .addClass(getScoreClass(desktop_score));
            $("#desktopLoad").text("Load Time: " + response.results.desktop_interactive);

            // Mobile score
            let mobile_score = response.results.mobile_score * 100;
            $("#mobileScore")
              .text(mobile_score)
              .removeClass("fail average pass")
              .addClass(getScoreClass(mobile_score));
            $("#mobileLoad").text("Load Time: " + response.results.mobile_interactive);
            $("#refreshPageSpeed .fa-spinner").removeClass("fa-spinner");
          },
          error: function(xhr, status, error) {
            console.error("Error fetching PageSpeed data:", error);
            $("#refreshPageSpeed .fa-spinner").removeClass("fa-spinner");
          }
        });
    }
    fetchPageSpeed({{$website->id}});

    $("#refreshPageSpeed").click(function() {
        //Reset Elements
        $(this).find("i").addClass("fa-spinner");
        $("#desktopLoad, #mobileLoad").text("Load Time: --");
        $("#desktopLoad, #mobileLoad").text("Load Time: --");
        $(".pagescore-result-wrap .circle").removeClass("pass fail average");
        $("#desktopScore, #mobileScore").html('<img src="/assets/images/spinner-dots.svg" width="40px" height="40px">');


        fetchPageSpeed({{$website->id}}, true);
    })
</script>
@endpush

Youez - 2016 - github.com/yon3zu
LinuXploit