-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.php
More file actions
64 lines (42 loc) · 1.52 KB
/
Copy pathcontent.php
File metadata and controls
64 lines (42 loc) · 1.52 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
<div class="container">
<div class="row">
<div class="starter-template">
<h1>Welcome on the <?php echo get_bloginfo( 'name' ); ?> website</h1>
<p class="lead"> Here you can find a small selection of my different theme</p>
</div>
</div>
<div class="row">
<?php
try{
$bdd = new PDO('mysql:host=localhost;dbname=jojocad;charset=utf8', 'root', ''); // change with yours
}
catch(Exception $e){
die('Erreur : '.$e->getMessage());
}
$reponse = $bdd->query('SELECT * FROM theme');
while ($donnees = $reponse->fetch())
{
?>
<div class="col-sm-4 text-center img-responsive">
<h3> <?php echo $donnees['titre']; ?></h3>
<a href= "content/theme/<?php echo $donnees['titre']; ?>.php">
<img src = <?php echo $donnees['photo']?> style="width:200px;height:200px;border-radius:25px;text-align:center;">
<p><?php echo $donnees['description']; ?></p>
</a>
</div>
<?php
}
$reponse->closeCursor();
?>
</div>
<div class="row">
<div class="starter-template">
<h2>latest article : </h3>
</div>
<div class="blog-post">
<h3 class="blog-post-title"><?php the_title(); ?></h2>
<p class="blog-post-meta"><?php the_date(); ?> by <a href="#"><?php the_author(); ?></a></p>
<?php the_content(); ?>
</div>
</div>
</div>