-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
99 lines (67 loc) · 2 KB
/
dashboard.php
File metadata and controls
99 lines (67 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?session_start();
if(!isset($_SESSION['usu_id'])) header('Location: index.php');
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Biblioteca</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<body>
<h1>Libros Reservados</h1>
<div id="app" class="container">
<table border="1" class="table table-striped">
<thead>
<th></th>
<th>Id</th>
<th>Nombre</th>
<th>Review</th>
<th>Autor</th>
<th>editorial</th>
</thead>
<tr v-for="data in all_data ">
<td><button v-on:click="remover(data.lib_id)">remover</button></td>
<td>{{data.lib_id}}</td>
<td>{{data.lib_nombre}}</td>
<td>{{data.lib_review}}</td>
<td>{{data.lib_autor}}</td>
<td>{{data.lib_editorial}}</td>
</tr>
</ul>
<a href="reservar.php">RESERVAR</a>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
all_data:[]
},
created:function(){
console.log("Iniciando...");
this.get_contacts();
},
methods:{
get_contacts: function(){
fetch("core/libss.php")
.then(response=>response.json())
.then(json=>{this.all_data=json.libros2})
},
addl: function(index){
alert("g");
}
}
});
function remover(i){
$.post("core/remover.php",{lib_id:i},function(data){
location.reload();
},'html');
}
///////
</script>
</body>
</html>