-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
142 lines (126 loc) · 5.62 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
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
133
134
135
136
137
138
139
140
141
142
<?php session_start()?>
<!DOCTYPE html>
<html>
<head>
<title>Vianney MORAIN ECM</title>
<!-- stylsheet -->
<link rel="stylesheet" href="Assets/bootstrap/css/bootstrap.css" >
<link rel="stylesheet" href="Assets/Stylesheet/global.css" />
<link rel="stylesheet" href="Assets/Stylesheet/home.css" />
<meta charset = "utf-8">
</head>
<body>
<header class="header">
<a href = "#" >
<h1>Page perso Vianney MORAIN</h1>
</a>
</header>
<?php
try{
$bdd_perso = new PDO('mysql:host=localhost;dbname=site_perso;charset=utf8', 'root', '');
}
catch (Exception $e){
die('Erreur : '.$e->getMessage());
}
$req_max = $bdd_perso->query("SELECT COUNT(*) AS 'cardinal' FROM `grand-maman`")->fetch();
$id_citation = rand(1, $req_max['cardinal']);
$donnees = $bdd_perso->query("SELECT * FROM `grand-maman` WHERE id_citation=$id_citation")->fetch();
?>
<article class = "container">
<div href='<?php echo $donnees['lien']?>' class = "row">
<blockquote class="col-10 col-lg-8 offset-1 offset-lg-2 blockquote">
<p>
<!--Etudiant à Centrale Marseille, j'ai créé ce site principalement pour m'entrainer à la programmation.
Loin d'être parfait et complet, il a au moins de le mérite de proposer quelques tutoriels interressants. <br />
Si vous vous sentez d'humeur vagabonde, n'hésitez pas à faire un tour sur mon blog, vous pourrez y suivre mes aventures pendant mon année de césure
autour du monde !!-->
<?php
echo $donnees['citation'];
?>
</p>
<footer class="blockquote-footer" style="padding-left:10px;">
<?php
echo $donnees['origine']
?>
<br /> Grand-Maman, carnet n°
<?php
echo $donnees['carnet']
?>
</footer>
</blockquote>
</div>
<div class="row justify-content-between">
<a href="#" class="text_link offset-lg-2 offset-1 col-10 col-lg-8" style="width:100%; text-align:right;">en savoir plus sur les carnets de Grand-Maman</a>
</div>
<?php
if(isset($_SESSION['connected'])){
?>
<div class="row">
<a href="Admin/ajouter-citation.php" class="offset-lg-2 offset-1">
<div class="boutton">
compléter la base de données
</div>
</a>
<a href="Admin/afficher-citations.php">
<div class="boutton">
Afficher toutes les citations
</div>
</a>
</div>
<?php
}
?>
</article>
<article class = "container">
<figure class = "row">
<a href = "Tutos/Tutos.html" id = "tutos" class = "vignette col-4 col-lg-2 offset-2">
<img src = "Assets/Images_site/Ampoule.png" alt ="Projets">
<figcaption>Tutos ECM</figcaption>
</a>
<a href = "Sites-ecm/Sites_utiles.html" id = "sites_utiles" class = "vignette col-4 col-lg-2 offset-0">
<img src = "Assets/Images_site/Projets.jpg" alt ="sites utiles">
<figcaption>Sites utiles ECM</figcaption>
</a>
<a href = "Scouts/vie_scoute.php" id = "blog_voyage" class = "vignette col-4 col-lg-2 offset-2 offset-lg-0">
<img src = "Assets/Images_site/Scouts.jpg" alt ="yoga">
<figcaption>Scoutisme</figcaption>
</a>
<!--<a href = "http://vianney.morain.fr" id = "blog_voyage" class = "vignette col-4 col-lg-2 offset-lg-0">-->
<a href = "http://vianney.morain.fr" id = "blog_voyage" class = "vignette col-4 col-lg-2 offset-lg-0">
<img src = "Assets/Images_site/Yoga.jpg" alt ="yoga">
<figcaption>Blog voyage</figcaption>
</a>
</figure>
</article>
<footer class = "footer index_footer">
<div class = "container-fluid d-lg-flex">
<div class = "row">
<div class = "col-lg-2 col-6 text-left container">
<div class="row">
<a href = "CV.html" class = "text_link col-lg-12 col-7"> Acces à mon CV</a>
<a href = "contact.php" class = "text_link col-5 col-lg-12" style="padding-right : 5px;">Me contacter </a>
</div>
</div>
<figure class = "col-lg-6 container organismes d-none d-lg-flex">
<div class = "row">
<a href = "https://sufstsulpice.free.fr/" title = "SUF saint Sulpice"><img src = "Assets/Images_site/Logos_sans_fonds/Logo_SUF.png" alt ="ISF_Logo"></a>
<a href = "https://phytv.ninja" title = "PhyTV"><img src = "Assets/Images_site/Logos_sans_fonds/Logo_PHY-TV.png" alt ="ISF_Logo"></a>
<a href = "https://centrale-marseille.fr/" title = "Centrale Marseille"><img src = "Assets/Images_site/Logos_sans_fonds/Logo_ECM.png" alt ="ISF_Logo"></a>
<a href = "https://assos.centrale-marseille.fr/isf/accueil" title = "Ingénieur sans frontière"><img src = "Assets/Images_site/Logos_sans_fonds/Logo_ISF.png" alt ="ISF_Logo"></a>
<a href = "https://forum-foceen.centrale-marseille.fr/" title = "forum FOCEEN"><img src = "Assets/Images_site/Logos_sans_fonds/Logo_FOCEEN.png" alt ="ISF_Logo"></a>
</div>
</figure>
<div class = "col-3 col-lg-2 text-right" style="padding-right : 5px;">Me suivre | </div>
<div class = "col-3 col-lg-2 container contact d-flex">
<div class = "row">
<a href="https://www.facebook.com/vianney.mrn/" class = "col-3 text-center"><img src="Assets/Images_site/Facebook.png" alt="Facebook" /></a>
<a href="https://twitter.com/VianneyMorain" class = "col-3 text-center"><img src="Assets/Images_site/Twitter.png" alt="Twitter" /></a>
<a href="https://https://www.instagram.com/vianneymorain/" class = "col-3 text-center"><img src="Assets/Images_site/insta.png" alt="Twitter" /></a>
<a href="https://fr.linkedin.com/in/vianney-morain/" class = "col-3 text-center"><img src="Assets/Images_site/LinkedIn.png" alt="LinkedIn" /></a>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>