-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard.php
executable file
·129 lines (113 loc) · 3.65 KB
/
dashboard.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php include("includes/header.php"); ?>
<body class="page-header-fixed">
<?php include("includes/head.php"); ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<?php include("includes/sidebar.php"); ?>
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<div class="row">
<div class="col-md-12">
<!-- BEGIN PAGE TITLE & BREADCRUMB-->
<h3 class="page-title">
<?php echo CMS_TITULO; ?>
</h3>
<ul class="page-breadcrumb breadcrumb">
<li>
<i class="fa fa-dashboard"></i>
<a>Dashboard</a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="dashboard.php">Inicio</a>
</li>
</ul>
<!-- END PAGE TITLE & BREADCRUMB-->
</div>
</div>
<!-- END PAGE HEADER-->
<!-- content -->
<div class="row">
<div class="col-md-12">
<!-- BEGIN SAMPLE TABLE PORTLET-->
<div class="portlet box red">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-th"></i>Tabla ejemplo
</div>
</div>
<div class="portlet-body flip-scroll">
<?php
if(intval($_GET['e']==1)) {
echo crear_alerta("error", "<strong>Error:</strong> de dashboard");
} else if(intval($_GET['e']==2)) {
echo crear_alerta("success", "<strong>Exito:</strong> de dashboard");
} else if(intval($_GET['e']==3)) {
echo crear_alerta("success", "<strong>Exito:</strong> eliminar dashboard");
} else if(intval($_GET['e']==2)) {
echo crear_alerta("success", "<strong>Exito:</strong> editar dashboard");
}
?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Nombre</th>
<th>Otro</th>
<th style="text-align:center">Acciones</th>
</tr>
</thead>
<tbody>
<?php
$sql="SELECT * FROM sample_data";
$database->query($sql);
$rows = $database->resultset();
$count=$database->rowCount();
$pages = new Paginator;
$pages->items_total = $count;
$pages->items_per_page= 2;
$pages->mid_range = 5;
$pages->paginate();
$sql=$sql.$pages->limit;
$database->query($sql);
$rows = $database->resultset();
foreach($rows as &$row) {
echo '<tr>
<td>
<a>'.$row['sample_data_name'].'</a>
</td>
<td>'.$row['sample_data_email'].'</a></td>
<td style="text-align:center">
<a href="posts_edit.php?id='.$row['ID'].'"><img src="images/icons/view.png" title="Mira tus predicciones" /></a>
</td>
</tr>';
}
?>
</tbody>
</table>
<?php
if($count>=$itemspp) {
echo '<div class="row">
<div class="col-xs-7 col-xs-offset-5">
<div class="dataTables_paginate paging_bootstrap">
<ul class="pagination">
'.$pages->display_pages().'
</ul>
</div>
</div>
</div>';
}
?>
</div>
</div>
<!-- END SAMPLE TABLE PORTLET-->
</div>
</div>
<!-- end content -->
</div>
</div>
<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<?php include("includes/footer.php"); ?>