-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.php
49 lines (41 loc) · 1.14 KB
/
index.php
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
<?php
require_once('./conexao.php');
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Criador Automático de CRUDs</title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css" />
<!-- Include custom CSS. -->
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>
<body>
<?php
if($table == ''){
print '<div class="container"><h1 class="text-center">Antes precisa configurar o banco e indicar a tabela em conexao.php</h1>';
exit;
}
?>
<div id='retrieved-data' style='height:15em;'>
<!--
This is where data will be shown.
-->
<img src="./imagnes/ajax-loader.gif" />
</div>
<script type = "text/javascript" src = "./js/jquery.min.js"></script>
<script type = "text/javascript">
$(function(){
// show the first page
getdata(1);
});
function getdata(pageno){
// source of data
var targetURL = 'busca_resultados.php?page=' + pageno;
// show loading animation
$('#retrieved-data').html('<img src="./imagens/ajax-loader.gif" />');
// load to show new data
$('#retrieved-data').load(targetURL).hide().fadeIn('slow');
}
</script>
</body>
</html>