Mostrar los datos en dos columnas con Bootstrap
Publicado por angel (36 intervenciones) el 23/04/2018 11:02:47
estoy intentando que me muestre los datos en dos columnas pero solo me muestra una, linea 68.
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
130
131
132
<?php
require_once 'dbconfig.php';
if(isset($_GET['delete_id']))
{
// select image from db to delete
$stmt_select = $DB_con->prepare('SELECT userPic FROM tbl_users WHERE userID =:uid');
$stmt_select->execute(array(':uid'=>$_GET['delete_id']));
$imgRow=$stmt_select->fetch(PDO::FETCH_ASSOC);
unlink("user_images/".$imgRow['userPic']);
// it will delete an actual record from db
$stmt_delete = $DB_con->prepare('DELETE FROM tbl_users WHERE userID =:uid');
$stmt_delete->bindParam(':uid',$_GET['delete_id']);
$stmt_delete->execute();
header("Location: index2.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Partes de trabajo</title>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">
</head>
<body>
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index2.php" title='Usuarios'>Usuarios</a>
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<h1 class="h2">Todos los usuarios / <a class="btn btn-default" href="addnew.php"> <span class="glyphicon glyphicon-plus"></span> add new </a></h1>
</div>
<br />
<div class="container-fluid">
<div class="row">
<?php
//NUEVA CONSULTA angel $stmt = $DB_con->prepare('SELECT userID, userName, userProfession, userPic FROM tbl_users ORDER BY userID DESC');
$stmt = $DB_con->prepare('SELECT userID, userName, userProfession, userPic FROM tbl_users ORDER BY userID DESC');
$stmt->execute();
if($stmt->rowCount() > 0)
{
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
extract($row);
?>
<div class="col-xs-6 col-sm-4 col-lg-6">
<p class="page-header"><?php echo $userName." / ".$userProfession; ?></p>
<img src="user_images/<?php echo $row['userPic']; ?>" class="img-rounded" width="250px" height="250px" />
<p class="page-header">
<span>
<div class="col-6 col-sm-3 col-lg-4 bg-success"><p>col-6 col-sm-9 col-lg-4</p>
<a href="editform.php?edit_id=<?php echo $row['userID']; ?>" class="btn btn-danger btn-block" role="button">Edit user</a>
</div>
<div class="col-6 col-sm-3 col-lg-4 bg-warning"><p>col-6 col-sm-3 col-lg-4</p>
<a href="?delete_id=<?php echo $row['userID']; ?>" class="btn btn-danger btn-block" role="button">Delete user</a>
</div>
<div class="col-6 col-sm-3 col-lg-4 bg-primary"><p>col-6 col-sm-3 col-lg-4</p>
<a href="editformtrabajotodos.php?mostrartrabajos_id=<?php echo $row['userID']; ?>" class="btn btn-danger btn-block" role="button">Add new work</a>
</div>
</span>
</p>
</div><!-- / ROWS -->
</div><!-- / CONTAINER-->
<?php
}
}
else
{
?>
<div class="col-xs-12">
<div class="alert alert-warning">
<span class="glyphicon glyphicon-info-sign"></span> No Data Found ...
</div>
</div>
<?php
}
?>
</div>
<div class="alert alert-info">
<strong>Empresa</strong> <a href="http://www.empresa.com">Empresa</a>!
</div>
</div>
<!-- enlasar archivo JQuery -->
<script src="js/js/jquery-3.3.1.min.js"></script>
<!-- asi es como se hace y se pone primero que el archivo js de javascript -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
Valora esta pregunta
0