AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 3.145.38.77   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : allssztx ( 535)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/allssztx/public_html/easybuyer/resources/views/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/allssztx/public_html/easybuyer/resources/views/admin/edit_cms.blade.php
<x-admin.header />
<x-admin.sidebar />
<style>
	.input-field .img-upload-btn
	{
		margin: 10px;
	}
	td.col-img
	{
		display: flex;
	}
	td.col-img h6
	{
		position: relative;
		margin: 10px 0px 0px 10px !important;
	}

</style>

<main>
						<div class="main-content">
							<div class="row">
	                           	<div class="col-lg-12 col-12">
	                                <form id="EditCMSForm">
	                                	@csrf
	                                    <div class="login-form form-content">
	                                        <h4>Edit CMS</h4>
	                                        <input class="custom-input" type="hidden" name="cmsId" value="{{$edit->cms_id}}">
	                                        @if($edit->cms_title != null)
	                                        <div class="input-field">
	                                            <label for="">CMS Title</label>
	                                            <div class="input-field">
	                                                <input class="custom-input" type="text" name="UpdtCmsTitle" value="{{$edit->cms_title}}">
	                                            </div>
	                                        </div>
	                                        @endif
	                                        @if($edit->cms_heading != null)
	                                        <div class="input-field">
	                                            <label for="">CMS Heading</label>
	                                            <div class="input-field">
	                                                <input class="custom-input" type="text" name="UpdtCmsHeading" value="{{$edit->cms_heading}}">
	                                            </div>
	                                        </div>
	                                        @endif
	                                        @if($edit->cms_sub_heading != null)
	                                        <div class="input-field">
	                                            <label for="">CMS Sub Heading</label>
	                                            <div class="input-field">
	                                                <input class="custom-input" type="text" name="UpdtCmsSubHeading" value="{{$edit->cms_sub_heading}}">
	                                            </div>
	                                        </div>
	                                        @endif
	                                        @if($edit->cms_description != null)
	                                        <div class="input-field">
	                                            <label for="">CMS Description</label>
	                                            <div class="input-field">
	                                                <textarea class="custom-input ckeditor" type="text" name="UpdtCmsDesc" id="UpdtCmsDesc">
	                                                	{{$edit->cms_description}}
	                                                </textarea>
	                                                
	                                            </div>
	                                        </div>
	                                        @endif
											@if($edit->cms_price != null)
	                                        <div class="input-field">
	                                            <label for="">CMS Price</label>
	                                            <div class="input-field">
												<input class="custom-input" type="text" name="UpdtCmsPrice" value="{{$edit->cms_price}}">
	                                                
	                                            </div>
	                                        </div>
	                                        @endif
	                                        <br>
	                                        @if($edit->cms_image != null)
	                                        <div class="input-field">
                                                <label>CMS Image</label>
                                                <div class="img-upload-wrapper">
                                                    <input class="img-upload" type="file" name="UpdtCmsImg" id="UpdtCmsImg" accept="image/png, image/jpeg">
                                                </div>
                                                <div class="btn-wrapper">
                                                    <label class="btn img-upload-btn" for="UpdtCmsImg">Select
                                                        Image</label>
                                                </div>
                                                <img src="{{ asset('storage/images/'.$edit->cms_image) }}" width="20%">
                                                <input class="custom-input" type="hidden" name="PrevCmsImg" value="{{$edit->cms_image}}">
                                            </div>
                                            @endif
                                            @if($edit->cms_image2 != null)
                                            <div class="input-field">
                                                <label>CMS Second Image</label>
                                                <div class="img-upload-wrapper">
                                                    <input class="img-upload" type="file" name="UpdtCmsImg2" id="UpdtCmsImg2" accept="image/png, image/jpeg">
                                                </div>
                                                <div class="btn-wrapper">
                                                    <label class="btn img-upload-btn" for="UpdtCmsImg2">Select
                                                        Image</label>
                                                </div>
                                                <img src="{{ asset('storage/images/'.$edit->cms_image2) }}" width="20%">
                                                <input class="custom-input" type="hidden" name="PrevCmsImg2" value="{{$edit->cms_image2}}">
                                            </div>
                                            @endif
                                            @if($edit->cms_video != null)
                                            <div class="input-field">
                                                <label>CMS Video</label>
                                                <div class="img-upload-wrapper">
                                                    <input class="img-upload" type="file" name="UpdtCmsVideo" id="UpdtCmsVideo">
                                                </div>
                                                <div class="btn-wrapper">
                                                    <label class="btn img-upload-btn" for="UpdtCmsVideo">Select
                                                    Video</label>
                                                    <video width="320" height="240" controls style="border: 1px solid #fff; border-radius: 10px;">
													  <source src="{{ asset('storage/images/'.$edit->cms_video)}}">
													</video>
													<input class="custom-input" type="hidden" name="PrevCmsVideo" value="{{$edit->cms_video}}">
                                                </div>
                                            </div>
                                            @endif
                                            <div class="input-field">
		                                        <label for="">CMS Status</label>
		                                        <select name="UpdtCmsStatus" class="form-control custom-input" id="UpdtCmsStatus">
		                                        	<option value="1" @if($edit->cms_status == 1) selected @endif >Active</option>
		                                        	<option value="0" @if($edit->cms_status == 0) selected @endif >Un-Active</option>
		                                        </select>
		                                    </div>

	                                        <!-- <h6>* Required Fields</h6> -->
	                                        <div class="form-footer">
	                                            <button type="submit">Update CMS</button>
	                                        </div>
	                                    </div>
	                                </form>
	                            </div>
                            </div>
                        </div>


                        <!-- Insert Banners -->

                        <script>
                        	$(document).ready(function(){
                        		$("#EditCMSForm").on('submit', function(e){
                        			e.preventDefault();

                        			for ( instance in CKEDITOR.instances )
    								CKEDITOR.instances[instance].updateElement();

                        			var data = new FormData(this);

                        			$.ajaxSetup({
									    headers: {
									        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
									    }
									});

									$.ajax({
										url: "update_cms",
										method: "POST",
										data: data,
										datatype: "json",
										cache: false,
										contentType: false,
										processData: false,
										success:function(data)
										{
											if($.isEmptyObject(data.error))
											{
												toastr.success(data.success,"Updated",{timeOut: 1500});
												document.getElementById('EditCMSForm').reset();
												// window.location = "{{ url('cms_home')}}";
												history.go(-1);   // only works when you have previous page
												CKEDITOR.instances.UpdtCmsDesc.setData("");
											}
											else if(data.error.UpdtCmsTitle)
											{
												toastr.error(data.error.UpdtCmsTitle,"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsImg)
											{
												toastr.error(data.error.UpdtCmsImg,"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsImg[1])
											{
												toastr.error(data.error.UpdtCmsImg[1],"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsImg2)
											{
												toastr.error(data.error.UpdtCmsImg2,"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsImg2[1])
											{
												toastr.error(data.error.UpdtCmsImg2[1],"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsVideo)
											{
												toastr.error(data.error.UpdtCmsVideo,"Error",{timeOut: 1500});
												return false;
											}
											else if(data.error.UpdtCmsVideo[1])
											{
												toastr.error(data.error.UpdtCmsVideo[1],"Error",{timeOut: 1500});
												return false;
											}
										},
										error:function()
										{
											toastr.error("SomeThing Went Wrong...","Error");
											return false;
										},
									});
                        		});
                        	});
                        </script>

                        <!-- Insert Banners Ends Here -->

<x-admin.footer />

Anon7 - 2022
AnonSec Team