403Webshell
Server IP : 54.233.248.239  /  Your IP : 172.28.20.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/storage/framework/views/a1ac32f10cfc8d83dcd3403c8de68a83c125634b.php
<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			<?php echo (isset($transportadora)) ? 'Editar' : 'Criar'; ?>
			<small>Informações Transportadora</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="<?php echo e(url('/admin')); ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
			<li><a href="<?php echo e(url('/admin/transportadora')); ?>">Transportadora</a></li>
			<li class="active"><?php echo (isset($transportadora)) ? 'Editar' : 'Criar'; ?></li>
		</ol>
	</section>
	<section class="content">
		<div class="row">
			<div class="col-lg-12">
				<div class="box">
					<div class="box-header">

					</div>
					<!-- /.box-header -->
					<div class="box-body">
						<ul class="nav nav-pills nav-justified">
							<li class="active"><a data-toggle="pill" href="#info-tab">Informações</a></li>
							<?php if(isset($transportadora)): ?>
							<li class="<?php echo (isset($_GET['mes']) ? 'active' : '');?>"><a data-toggle="pill" href="#tabela-tab">Tabela</a></li>
							<?php endif; ?>
							<?php if($modulo->imagem){ ?>
								<li><a data-toggle="pill" href="#image-tab">Imagem</a></li>
							<?php } ?>
							<?php /*<li><a data-toggle="pill" href="#image2-tab">Imagem Secundária</a></li><?php */ ?>
							<?php if($modulo->galeria){ ?>
								<li><a data-toggle="pill" href="#imagens-tab">Galeria</a></li>
							<?php } ?>
							<?php /* ?><li><a data-toggle="pill" href="#seo-tab">SEO</a></li><?php */ ?>
						</ul>
						<div class="spacer"></div>
						<div class="tab-content">

								<div id="info-tab" class="tab-pane fade in active">

									<form id="mainForm" class="form-horizontal" role="form" method="POST" action="<?php echo e(url('/admin/transportadora/save')); ?>">

									<?php echo e(csrf_field()); ?>

									<?php if($modulo->imagem){ ?>
										<input type="hidden" name="thumbnail_principal" value="<?php echo (isset($transportadora)) ? $transportadora->thumbnail_principal : ''; ?>">
									<?php } ?>
									<?php if(isset($transportadora)){ ?>
										<input type="hidden" name="id" value="<?php echo $transportadora->id; ?>"/>
									<?php } ?>
									<?php foreach($fields as $field){ ?>
										<?php if(get_class($field) == 'App\CampoModulo'){ ?>
											<?php $campo = $field->nome; ?>
											<div class="form-group">
												<label for="<?php echo $field->nome; ?>" class="col-md-3 control-label"><?php echo $field->label; ?> <?php echo ($field->required) ? '*' : ''; ?></label>
												<?php if($field->tipo_campo == 'INT'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="number" step="1" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'I'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="text" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'N'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="text" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'T'){ ?>
													<div class="col-md-7">
														<textarea id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> class="form-control tinymce" name="<?php echo $field->nome; ?>"><?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?></textarea>
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'D'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="date" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'DT'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="datetime-local" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? str_replace(' ','T',$transportadora->$campo) : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'TIME'){ ?>
													<div class="col-md-7">
														<input id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> type="time" class="form-control" value="<?php echo (old($campo)) ? old($campo) : ((isset($transportadora)) ? $transportadora->$campo : $field->valor_padrao); ?>" name="<?php echo $field->nome; ?>" />
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'S'){ ?>
													<div class="col-md-7">
														<select id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> class="form-control" name="<?php echo $field->nome; ?>">
															<option <?php echo (isset($transportadora) && $transportadora->$campo == 1) ? 'selected' : ''; ?> value="1">Sim</option>
															<option <?php echo (isset($transportadora) && $transportadora->$campo == 0) ? 'selected' : ''; ?> value="0">Não</option>
														</select>
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'E'){ ?>
													<div class="col-md-7">
														<select id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> class="form-control" name="<?php echo $field->nome; ?>">
															<?php foreach ($field->options as $campoOption): ?>
																<option <?php echo (isset($transportadora) && $transportadora->$campo == $campoOption->chave) ? 'selected' : ''; ?> value="<?php echo $campoOption->chave; ?>"><?php echo $campoOption->valor; ?></option>
															<?php endforeach; ?>
														</select>
													</div>
												<?php } ?>
												<?php if($field->tipo_campo == 'SI'){ ?>
													<div class="col-md-5">
														<?php $icons = explode(',',file_get_contents('fonts/icons-font-awesome.txt')); ?>
														<select id="<?php echo $field->nome; ?>" <?php echo ($field->required) ? 'required' : ''; ?> class="form-control select2 select-icone" name="<?php echo $field->nome; ?>">
															<?php foreach ($icons as $icone): ?>
																<option <?php echo (isset($transportadora) && $icone == $transportadora->$campo) ? 'selected' : ''; ?> value="<?php echo $icone; ?>"><?php echo $icone; ?></option>
															<?php endforeach; ?>
														</select>
													</div>
													<div class="icone-viewer">
														<i class="fa fa-3x"></i>
													</div>
												<?php } ?>
											</div>
										<?php }else{ ?>
											<?php $campo = $field->nome; ?>
											<div class="form-group">
												<label for="<?php echo $field->nome; ?>" class="col-md-3 control-label"><?php echo $field->label; ?> *</label>
												<div class="col-md-7">
													<select id="<?php echo $field->nome; ?>" required class="form-control select2" name="<?php echo $field->nome; ?>">
														<?php $nomeVariavel = 'array_'.$field->nome; ?>
														<?php foreach ($$nomeVariavel as $option): ?>
															<?php $campoNome = $field->campoRelacionado->nome; ?>
															<option <?php echo (isset($transportadora) && $transportadora->$campo == $option->id) ? 'selected' : ''; ?> value="<?php echo $option->id; ?>"><?php echo $option->$campoNome; ?></option>
														<?php endforeach; ?>
													</select>
												</div>
											</div>
										<?php } ?>
									<?php } ?>

									<?php if(isset($transportadora) && $current_role->hasAccess($current_module->nome_tabela.'.update') || !isset($transportadora) && $current_role->hasAccess($current_module->nome_tabela.'.create')){ ?>
										<div class="row">
											<div class="col-md-12">	
												<div class="text-center">
													<button type="submit" class="btn btn-primary">
														<i class="fa fa-btn fa-pencil-alt"></i> Salvar
													</button>
												</div>
											</div>
										</div>

										<br>

									<?php } ?>

									</form>

								</div>
								
							<?php if(isset($transportadora)){ ?>
							<div id="tabela-tab" class="tab-pane fade <?php echo (isset($_GET['mes']) ? 'in active' : '');?>">

								<div class="row">
	                                <div class="col-md-2">
	                                    <div class="row">
	                                        <div class="col-md-12">
	                                            <h5>Estado:</h5>
	                                            <select id="filtro_estado" required class="form-control select2" name="filtro_estado">
	                                            	<option value="">Todos</option>
													<?php foreach($estados as $estado):?>
														<option value="<?php echo e($estado->id); ?>"><?php echo e($estado->sigla); ?></option>
													<?php endforeach;?>
												</select>
	                                        </div>
	                                    </div>
	                                </div>
	                                <div class="col-md-2">
	                                    <div class="row">
	                                        <div class="col-md-12">
	                                            <h5>Peso:</h5>
	                                            <input type="number" class="form-control" name="filtro_peso" id="filtro_peso" value="">
	                                        </div>
	                                    </div>
	                                </div>
			                		<div class="col-md-2">
	                                    <div class="row">
	                                        <div class="col-md-6">
	                                            <button type="button" id="btn-filtrar-tabela" class="btn btn-block btn-primary" style="margin-top: 35px;">Filtrar</button>
	                                        </div>
	                                        <div class="col-md-6">
												<button type="button" id="btn-incluir-tabela" class="btn btn-block btn-success" style="margin-top: 35px;"><i class="fa fa-plus"></i> &nbsp;Incluir</button>
	                                        </div>
	                                    </div>
	                                </div>
			                	</div>

								<br><br>

								<table class="table table-bordered" id="table-transportadora-tabela">
								<thead>
									<tr>
										<th width="30%" class="text-center">Estado</th>
										<th width="30%" class="text-center">Peso</th>
										<th width="30%" class="text-right">Valor</th>
										<th width="10%" class="text-center">Ação</th>
									</tr>
								</thead>
								<tbody>
									<?php if (count($tabelas) > 0): ?>
									<?php foreach ($tabelas as $tabela): ?>
										<tr>
											<td class="text-center"><?php echo $tabela->estado->sigla; ?></td>
											<td class="text-center"><?php echo $tabela->peso . ($tabela->peso == 0 ? ' (Kg Adicional)' : ''); ?></td>
											<td class="text-right">
												R$ <?php echo number_format($tabela->valor, 2,',','.'); ?>
											</td>
											<td width="10%" class="text-center">
												<button type="button" data-id="<?php echo $tabela->id; ?>" class="btn btn-primary btn-edit-tabela"><i class="fa fa-pencil-alt"></i></button>
												<button type="button" data-id="<?php echo $tabela->id; ?>" class="btn btn-danger btn-delete-tabela"><i class="fa fa-trash"></i></button>
											</td>
										</tr>
									<?php endforeach ?>
									<?php else: ?>
										<tr>
											<td colspan="4" class="text-center">
												<p>Nenhum registro para ser exibido!</p>
											</td>
										</tr>
									<?php endif ?>
								</tbody>
								</table>

							</div>
							<?php } ?>

							<?php if($modulo->imagem){ ?>
								<div id="image-tab" class="tab-pane fade">
									<script type="text/javascript">
										var image_campo = 'thumbnail_principal';
									</script>
									<div class="form-horizontal">
										<div class="form-group">
											<label for="image" class="col-md-3 control-label">Imagem</label>
											<div class="col-md-7">
												<form action="<?php echo e(url('admin/transportadora/upload')); ?>" method="post" class="form single-dropzone" id="my-dropzone" enctype="multipart/form-data">
													<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
													<div id="img-thumb-preview">
														<img id="img-thumb" class="user size-lg img-thumbnail img-responsive" src="<?php echo (isset($transportadora) && $transportadora->thumbnail_principal != '') ? url('/uploads/transportadora/'.$transportadora->thumbnail_principal) : 'http://placehold.it/300x100'; ?>">
													</div>
													<button type="button" style="display:none;" id="crop-image" class="btn btn-success">Salvar Corte</button>
													<button id="upload-submit" class="btn btn-default margin-t-5"><i class="fa fa-upload"></i> Upload Picture</button>
												</form>
												<form class="hidden" action="<?php echo e(url('admin/transportadora/crop')); ?>" id="cropForm" method="POST">
													<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
													<input type="hidden" name="data_crop">
													<input type="hidden" name="file_name">
												</form>
											</div>
										</div>
									</div>
								</div>
							<?php } ?>

							<?php if($modulo->galeria){ ?>

								<div id="imagens-tab" class="tab-pane fade">
									<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 lista-galeria">
										<?php if(isset($transportadora) && count($transportadora->imagens)){?>
											<?php foreach ($transportadora->imagens as $image){?>
												<div id="item_<?php echo $image->id; ?>" class="item imagem-galeria-<?php echo $image->id; ?>">
													<div style="background-image: url(<?php echo "/uploads/transportadora/$image->thumbnail_principal";?>);" class="thumb"></div>
													<span data="<?php echo $image->id; ?>" data-modulo="transportadora" class="icon delete-image" aria-hidden="true"><i class="fa fa-trash"></i></span>
												</div>
											<?php }?>
										<?php }?>
									</div>
									<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
										<form class="dropzone" id="galeria-dropzone" method="POST" action="<?php echo (isset($transportadora)) ? url('/admin/transportadora/upload_galeria/'.$transportadora->id) : url('/admin/transportadora/upload_galeria/'.$nextId); ?> " enctype="multipart/form-data">
											<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>" />
											<div class="fallback">
												<input name="file" type="file" multiple />
											</div>
										<form>
									</div>
								</div>
							<?php } ?>
						</div>
					</div>
					<!-- /.box-body -->
					<div class="box-footer">
						
					</div>
				</div>
					<!-- /.box -->
			</div>
		</div>
	</section>
</div>

<div id="modal-evento" class="modal fade">
    <form method="/" id="formEvento" type="POST">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 id="time-label"></h4>
            </div>
            <div class="modal-body" id="conteudo-modal-evento"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
            </div>
        </div>
    </div>
    </form>
</div>

<script type="text/javascript">

	function refreshListenerTabela(){
		
		$('.btn-edit-tabela').click(function(){
	    	var tabela_id = $(this).data('id');
	    	editTabela(tabela_id);
	    });

	    $('.btn-delete-tabela').click(function(){
			var tabela_id = $(this).data('id');
			var tr       = $(this).closest('tr');
	    	deleteTabela(tabela_id, tr);
	    });

	}

	function editTabela(id){
		$.ajax({
            url: '/admin/transportadora-tabela/edit/' + id,
            type: 'GET',
            beforeSend:function(){
                $('.carregando').fadeIn();
            },
            success:function(data){
                $('.carregando').fadeOut();
                $('#conteudo-modal-evento').html(data);
                $('#modal-evento').modal('show');
            }
        });
	}

	function deleteTabela(id, tr){
		if(confirm('Você tem certeza disso?')){
            $.ajax({
                url: '/admin/transportadora-tabela/delete/' + id,
                type: 'GET',
                dataType: 'JSON',
                success: function(data) {
                    if (data.status) {
                        alertUtil.alertSuccess(data.message);
                        tr.remove();
                    } else {
                        alertUtil.alertError(data.message);
                    }
                }
            });
        }
	}

	function filtrarTabelas(){

		var estado = $('#filtro_estado').val();
		var peso   = $('#filtro_peso').val();
		
    	$.ajax({
            url: 'admin/transportadora/filtrar-tabelas',
            type: 'POST',
            data : {transportadora_id : '<?php echo (isset($transportadora) ? $transportadora->id : '');?>', estado : estado, peso : peso},
            beforeSend:function(){
                $('.carregando').fadeIn();
            },
            success:function(data){
                $('.carregando').fadeOut();
                if(data.status){
                    $('#table-transportadora-tabela tbody').html(data.html);
                    refreshListenerTabela();
                }else{
                    alertUtil.alertError(data.message);
                }
            }
        });

	}

	$(document).ready(function(){

		refreshListenerTabela();

		$(document).on('click', '#btn-incluir-tabela', function(e){
	    	e.preventDefault();
	        $.ajax({
	            url: 'admin/transportadora-tabela/add?transportadora_id=<?php echo (isset($transportadora) ? $transportadora->id : '');?>',
	            type: 'GET',
	            beforeSend:function(){
	                $('.carregando').fadeIn();
	            },
	            success:function(data){
	                $('.carregando').fadeOut();
	                $('#conteudo-modal-evento').html(data);
	            }
	        });

	        $('#modal-evento').modal('show');

	    });

	    $('#btn-filtrar-tabela').click(function(){
			filtrarTabelas();
	    });

	});

</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make($current_template, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit