-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_doc.php
247 lines (209 loc) · 11.3 KB
/
add_doc.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?php
session_start();
include 'header.php';
if(!empty($_SESSION["mode"]))
{}
else
{
$_SESSION["mode"] = "clair";
}
if(isset($_SESSION['id']))
{
if($_SESSION['auteur_doc'] == 1 OR $_SESSION['admin'] == 1)
{ ?>
<!DOCTYPE HTML>
<!--
Editorial by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>DVKBuntu - Ajouter documentation</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<?php include 'wysiwig.html'; ?>
<?php
if($_SESSION['mode'] == "sombre")
{?>
<link rel="stylesheet" href="assets/css/main.css" />
<?php }
else
{ ?>
<link rel="stylesheet" href="assets/css/main_clair.css" />
<?php } ?>
<link rel="icon" type="image/png" href="images/LogoGenerale.png" />
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<!-- Main -->
<div id="main">
<div class="inner">
<!-- Header -->
<header id="header">
<a href="index.php" class="logo"><strong>DVKBuntu</strong></a>
<ul class="icons">
<li><a href="mode.php?id=3" style="color: yellow; background-color: black;">Mode malvoyant : </a> <a href="mode.php" style="color:#000000" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg" id="icone_oeil"></i></a></li>
<li><a href="https://twitter.com/handyopensource" class="icons-header" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a></li>
<li><a href="https://www.facebook.com/Handyopensource" class="icons-header" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a></li>
<li><a href="https://discord.gg/zG7g8cU" class="icons-header" alt="discord"><i class="fab fa-discord fa-lg"></i></a></li>
<li><a href="https://www.forum.dvkbuntu.org/" class="icons-header" alt="Le forum"><i class="far fa-comments fa-lg"></i></a></li>
<li><a href="#contact" class="icons-header" alt="Email"><i class="far fa-envelope fa-lg"></i></a></li>
<li> <a href="donnation.php" class="icons-header" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a></li>
</ul>
</header>
<!-- Content -->
<section>
<header class="main">
<h1>Ajouter une documentation</h1>
<font color="red">
<?php
if(isset($_GET['erreur']) AND $_GET['erreur'] == 1)
{
echo "Erreur !";
}
?>
</font>
</header>
<form method="post" action="preview_doc.php">
<div class="row gtr-uniform">
<div class="col-6 col-12-xsmall">
<input type="text" name="titre" id="titre" value="<?php if(isset($_POST['titre'])) { echo $_POST['texte'];} ?>" placeholder="Votre titre" />
</div>
<hr/>
<div class="col-6 col-12-small">
<textarea name="texte" id="texte" maxlength="5000" rows="9"><?php if(isset($_POST['texte'])) { echo $_POST['texte'];} ?></textarea>
<script>
ClassicEditor
.create( document.querySelector( '#texte' ), {
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json',
},
removePlugins : ['Table'],
} )
.catch( error => {
console.error( error );
} );
</script>
</div>
<!-- Break -->
<div class="col-12">
<ul class="actions">
<li><input type="submit" value="Suivant" class="primary" name="envoi"/></li>
</ul>
</div>
</div>
</form>
</section>
</div>
</div>
<?php include 'sidebar.html'; ?>
</div>
<!--Bottom menu -->
<div class="navbar-bottom">
<a href="mode.php?id=3" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg"></i></a>
 
<a href="https://twitter.com/handyopensource" class="icons" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a>
<a href="https://www.facebook.com/Handyopensource" class="icons" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a>
<a href="https://discord.gg/zG7g8cU" class="icons" alt="discord"><i class="fab fa-discord fa-lg"></i></a>
<a href="https://www.forum.dvkbuntu.org/" class="icons" alt="Le forum"><i class="far fa-comments fa-lg"></i></a>
<a href="contact.php" class="icons" alt="Email"><i class="far fa-envelope fa-lg"></i></a>
<a href="donnation.php" class="icons" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>
<?php
}
else
{ ?>
<!DOCTYPE HTML>
<!--
Editorial by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>DVKBuntu - Ajouter documentation</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
<?php
if($_SESSION['mode'] == "sombre")
{?>
<link rel="stylesheet" href="assets/css/main.css" />
<?php }
else
{ ?>
<link rel="stylesheet" href="assets/css/main_clair.css" />
<?php } ?>
<link rel="icon" type="image/png" href="images/LogoGenerale.png" />
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<!-- Main -->
<div id="main">
<div class="inner">
<!-- Header -->
<header id="header">
<a href="index.php" class="logo"><strong>DVKBuntu</strong></a>
<ul class="icons">
<li><a href="mode.php?id=3" style="color: yellow; background-color: black;">Mode malvoyant : </a> <a href="mode.php" style="color:#000000" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg" id="icone_oeil"></i></a></li>
<li><a href="https://twitter.com/handyopensource" class="icons-header" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a></li>
<li><a href="https://www.facebook.com/Handyopensource" class="icons-header" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a></li>
<li><a href="https://discord.gg/zG7g8cU" class="icons-header" alt="discord"><i class="fab fa-discord fa-lg"></i></a></li>
<li><a href="https://www.forum.dvkbuntu.org/" class="icons-header" alt="Le forum"><i class="far fa-comments fa-lg"></i></a></li>
<li><a href="#contact" class="icons-header" alt="Email"><i class="far fa-envelope fa-lg"></i></a></li>
<li> <a href="donnation.php" class="icons-header" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a></li>
</ul>
</header>
<!-- Content -->
<section>
<header class="main">
<h1>Envie de poster des documentations ? Contactez nous <font color="blue"><a href="#contact">ici</a> </font> pour recevoir une autorisation !</h1>
</header>
</section>
</div>
</div>
<!-- Sidebar -->
<?php include 'sidebar.html'; ?>
</div>
<!--Bottom menu -->
<div class="navbar-bottom">
<a href="mode.php?id=3" alt="Changer les contrastes"><i class="fas fa-low-vision fa-lg"></i></a>
 
<a href="https://twitter.com/handyopensource" class="icons" alt="Twitter"><i class="fab fa-twitter-square fa-lg"></i></a>
<a href="https://www.facebook.com/Handyopensource" class="icons" alt="Facebbok"><i class="fab fa-facebook fa-lg"></i></a>
<a href="https://discord.gg/zG7g8cU" class="icons" alt="discord"><i class="fab fa-discord fa-lg"></i></a>
<a href="https://www.forum.dvkbuntu.org/" class="icons" alt="Le forum"><i class="far fa-comments fa-lg"></i></a>
<a href="contact.php" class="icons" alt="Email"><i class="far fa-envelope fa-lg"></i></a>
<a href="donnation.php" class="icons" alt="Email" class="icons"><i class="fas fa-hand-holding-usd fa-lg"></i></a>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>
<?php }
}
elseif(isset($_COOKIE['id']) AND isset($_COOKIE['email']) AND isset($_COOKIE['confirmcookie']))
{
header('Location: cookie.php');
}
else
{
header('Location: index.php');
}
?>