Skip to content

Commit

Permalink
Primera versión funcional del Sistema de Gestión Hotelera
Browse files Browse the repository at this point in the history
  • Loading branch information
configuroweb committed Feb 15, 2022
0 parents commit 9963bb9
Show file tree
Hide file tree
Showing 2,532 changed files with 699,939 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<IfModule mod_rewrite.c>
Header set Access-Control-Allow-Origin "*"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$2/?page=$1 [L]
</IfModule>
8 changes: 8 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="error-content">
<h3><i class="fas fa-exclamation-triangle text-danger"></i> Oops! Page not found.</h3>

<p>
We could not find the page you were looking for.
</p>

</div>
32 changes: 32 additions & 0 deletions about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div class="col-12">
<div class="row my-5 ">
<div class="col-md-5">
<div class="card card-outline card-navy rounded-0 shadow">
<div class="card-header">
<h4 class="card-title">Contacto</h4>
</div>
<div class="card-body rounded-0">
<dl>
<dt class="text-muted"><i class="fa fa-envelope"></i> Correo</dt>
<dd class="pl-4"><?= $_settings->info('email') ?></dd>
<dt class="text-muted"><i class="fab fa-whatsapp"></i><a href="https://configuroweb.com/WhatsappMessenger" target="_blank"> Whatsapp</a></dt>
<dd class="pl-4"><a href="https://configuroweb.com/WhatsappMessenger" target="_blank"><?= $_settings->info('contact') ?></a></dd>
<dt class="text-muted"><i class="fa fa-map-marked-alt"></i> Dirección</dt>
<dd class="pl-4"><?= $_settings->info('address') ?></dd>
</dl>
</div>
</div>
</div>
<div class="col-md-7">
<div class="card rounded-0 card-outline card-navy shadow" >
<div class="card-body rounded-0">
<h2 class="text-center">Nosotros</h2>
<center><hr class="bg-navy border-navy w-25 border-2"></center>
<div>
<?= file_get_contents("about_us.html") ?>
</div>
</div>
</div>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions about_us.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions about_us.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h3 class="text-center">About Us</h3>
<hr>
<div>
<?php include("about_us.html") ?>
</div>
62 changes: 62 additions & 0 deletions activities.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<style>
.activity-holder{
width:20vw;
}
.activity-img{
object-fit: cover;
object-position:center center;
transition: transform .3s ease;
}
.activity-item:hover .activity-img{
transform:scale(1.2);
}
a.activity-item.card.rounded-0.shadow.flex-row.text-decoration-none.text-dark {
background: #8080801c;
}
</style>
<div class="content py-5">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card card-outline card-primary rounded-0 shadow">
<div class="card-body">
<div class="row row-cols-sm-1 row-cols-md-2 row-cols-xl-2 gx-2 py-3" id="activity-list">
<?php
$activitys = $conn->query("SELECT * FROM `activity_list` where delete_flag =0 and `status` = 1 order by `name` asc");
while($row = $activitys->fetch_assoc()):
$row['description'] = strip_tags(html_entity_decode($row['description']));
?>
<div class="col">
<a href="javascript:void(0)" data-id="<?= $row['id'] ?>" class="activity-item card rounded-0 shadow flex-row text-decoration-none text-dark p-0">
<div class="col-auto p-0">
<div class="activity-holder overflow-hidden">
<img src="<?= validate_image($row['image_path']) ?>" class="img-top rounded-0 activity-img" alt="<?= $row['name'] ?> Image">
</div>
</div>
<div class="card-body">
<div class="container-fluid p-1 m-0 h-100 d-flex flex-column justify-content-center">
<h3 class="text-navy mb-0"><b><?= $row['name'] ?></b></h3>
<div class="truncate-5">
<?= html_entity_decode($row['description']) ?>
</div>
</div>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
$('#filter-schedule').submit(function(e){
e.preventDefault();
location.href = "./?page=schedules&"+$(this).serialize();
})
$('.activity-item').click(function(){
uni_modal("Atracción",'view_activity.php?id='+$(this).attr('data-id'),'mid-large')
})
})
</script>
7 changes: 7 additions & 0 deletions admin/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<IfModule mod_rewrite.c>

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$2/?page=$1 [L]
</IfModule>
9 changes: 9 additions & 0 deletions admin/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="error-content">
<h3><i class="fas fa-exclamation-triangle text-danger"></i> Oops! Page not found.</h3>

<p>
We could not find the page you were looking for.
Meanwhile, you may <a href="./">return to dashboard</a> or try using the search form.
</p>

</div>
126 changes: 126 additions & 0 deletions admin/activities/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<style>
.img-thumb-path{
width:100px;
height:80px;
object-fit:scale-down;
object-position:center center;
}
</style>
<div class="card card-outline card-primary rounded-0 shadow">
<div class="card-header">
<h3 class="card-title">Atracciones</h3>
<div class="card-tools">
<a href="javascript:void(0)" id="create_new" class="btn btn-flat btn-sm btn-primary"><span class="fas fa-plus"></span> Agregar Nueva Atracción</a>
</div>
</div>
<div class="card-body">
<div class="container-fluid">
<div class="container-fluid">
<table class="table table-bordered table-hover table-striped">
<colgroup>
<col width="5%">
<col width="20%">
<col width="25%">
<col width="30%">
<col width="10%">
<col width="10%">
</colgroup>
<thead>
<tr class="bg-gradient-primary text-light">
<th>#</th>
<th>Fecha de Creación</th>
<th>Nombre</th>
<th>Descripción</th>
<th>Estado</th>
<th>Acción</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$qry = $conn->query("SELECT * from `activity_list` where delete_flag = 0 order by `name` asc ");
while($row = $qry->fetch_assoc()):
$row['description'] = strip_tags(html_entity_decode($row['description']));
?>
<tr>
<td class="text-center"><?php echo $i++; ?></td>
<td class=""><?php echo date("Y-m-d H:i",strtotime($row['date_created'])) ?></td>
<td class=""><p class="m-0 truncate-1"><?php echo $row['name'] ?></p></td>
<td class=""><p class="m-0 truncate-1"><?php echo $row['description'] ?></p></td>
<td class="text-center">
<?php
switch ($row['status']){
case 0:
echo '<span class="rounded-pill badge badge-danger col-6">Inactiva</span>';
break;
case 1:
echo '<span class="rounded-pill badge badge-success col-6">Activa</span>';
break;
}
?>
</td>
<td align="center">
<button type="button" class="btn btn-flat btn-default btn-sm dropdown-toggle dropdown-icon" data-toggle="dropdown">
Acción
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="./?page=activities/view_activity&id=<?= $row['id'] ?>" data-id ="<?php echo $row['id'] ?>"><span class="fa fa-eye text-dark"></span> Ver</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item edit_data" href="javascript:void(0)" data-id ="<?php echo $row['id'] ?>"><span class="fa fa-edit text-primary"></span> Editar</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item delete_data" href="javascript:void(0)" data-id="<?php echo $row['id'] ?>"><span class="fa fa-trash text-danger"></span> Eliminar</a>
</div>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('#create_new').click(function(){
uni_modal("Agregar Nueva Atracción","activities/manage_activity.php",'mid-large')
})
$('.edit_data').click(function(){
uni_modal("Actualizar Información de Atracción","activities/manage_activity.php?id="+$(this).attr('data-id'),'mid-large')
})
$('.delete_data').click(function(){
_conf("¿Estás segur@ de eliminar esta actracción de forma permanente?","delete_activity",[$(this).attr('data-id')])
})
$('.view_data').click(function(){
uni_modal("Atracción","activities/view_activity.php?id="+$(this).attr('data-id'))
})
$('.table td, .table th').addClass('py-1 px-2 align-middle')
$('.table').dataTable({
columnDefs: [
{ orderable: false, targets: 5 }
],
});
})
function delete_activity($id){
start_loader();
$.ajax({
url:_base_url_+"classes/Master.php?f=delete_activity",
method:"POST",
data:{id: $id},
dataType:"json",
error:err=>{
console.log(err)
alert_toast("Ocurrió un error.",'error');
end_loader();
},
success:function(resp){
if(typeof resp== 'object' && resp.status == 'success'){
location.reload();
}else{
alert_toast("Ocurrió un error.",'error');
end_loader();
}
}
})
}
</script>
Loading

0 comments on commit 9963bb9

Please sign in to comment.