-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
587 lines (522 loc) · 28.3 KB
/
main.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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
<?php
if( !isset( $_SESSION ) ) {
session_start();
}
include 'database/connect.php';
include 'functions.php';
include 'langCheck.php';
protect();
user_counter();
// get user
$query = $con->prepare( "SELECT user_id FROM users WHERE username = ?" );
$query->bind_param( "s", $_SESSION['user'] );
$query->execute();
$query->bind_result($user_id);
$query->fetch();
$query->close();
// get user settings
$query = $con->prepare( "SELECT line_nums, font, size FROM users WHERE user_id = ?" );
$query->bind_param( "s", $user_id);
$query->execute();
$query->bind_result($value, $font, $size);
$query->fetch();
$query->close();
// Get current tags
$availableTags = array();
$query = $con->prepare( "SELECT DISTINCT tags FROM tags_snippets WHERE user_id = ?" );
$query->bind_param( "s", $user_id);
$query->execute();
$query->bind_result($tags);
while($query->fetch()){
$availableTags[] = "'" . $tags . "'";
}
$query->close();
// get Groups
$gNames = array();
$gIds = array();
$query = $con->prepare( "SELECT id, name FROM groups WHERE user_id = ?" );
$query->bind_param( "s", $user_id);
$query->execute();
$query->bind_result($i, $n);
while($query->fetch()){
array_push($gIds, $i);
array_push($gNames, $n);
}
$query->close();
// if lang cookie is set / TODO: if nothing set, compare browser lang and set if possible
if( isset( $_COOKIE['lang'] ) ) {
$_SESSION['lang'] = $_COOKIE['lang'];
}
$isLangDE = ( $_SESSION['lang'] == 'de' ) ? 'active' : '';
$isLangEN = ( $_SESSION['lang'] == 'de' ) ? '' : 'active';
?>
<!DOCTYPE html>
<html lang="<?php if(isset($_SESSION['lang'])) { echo $_SESSION['lang']; } else { echo 'en'; }?>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?=$lang['pageTitle']?></title>
<link rel="icon" href="favicon.ico">
<link rel="icon" href="favicon.svg" type="image/svg+xml" sizes="any">
<link rel="stylesheet" href="lib/jquery/jquery-ui.rawsta.min.css">
<link rel="stylesheet" href="lib/jquery/jquery.tagit.css">
<link rel="stylesheet" href="lib/line-awesome/line-awesome.min.css">
<link rel="stylesheet" href="lib/sweetalert2/borderless.css">
<link rel="stylesheet" href="lib/prism/prism.css">
<link rel="stylesheet" href="assets/css/fonts.css">
<link rel="stylesheet" href="assets/css/main.css">
<script src="lib/jquery/jquery-3.6.0.min.js"></script>
<script src="lib/jquery/jquery.form.min.js"></script>
<script src="lib/jquery/jquery-ui.min.js"></script>
<script src="lib/jquery/tag-it.js"></script>
<script src="lib/sweetalert2/sweetalert2.min.js"></script>
<script src="lib/prism/prism.js"></script>
<script src="lib/clipboard.min.js"></script>
<script src="assets/js/script.js"></script>
<!-- set as meta and :root / TODO: add light mode - content="dark light" -->
<meta name="color-scheme" content="dark">
<!-- TODO: add manifest -->
<meta name="theme-color" content="#830000">
<!-- TODO: replace TagIt? -->
<script>
$(function(){
$('#myTags').tagit({
availableTags: [<?php echo implode( ", ", $availableTags); ?>],
placeholderText : "<?=$lang['snippetTags']?>"
});
});
</script>
</head>
<body class="my-little-snippet-storage">
<!-- MAIN CONTENT starts here -->
<div class="container">
<div id="blur" class="blur full modal-exit"></div>
<!-- HEADER BAR -->
<header class="title-area">
<a href="<?=$pageRoot?>" class="home-link">
<img src="assets/svg/RawSnippets.svg" alt="<?=$lang['pageTitle']?>" class="logo">
<!-- <h1 class="appTitle"><i class="lar la-file-code"></i> < ?=$lang['pageTitle']?></h1> -->
</a>
<div class="header-options">
<input type="search" class="search-bar" id="search-input" placeholder="<?=$lang['search']?>" aria-label="<?=$lang['search']?>">
<button type="reset" class="search-button" id="search-button" aria-label="Submit Search"></button>
</div>
<nav class="header-actions" aria-label="Mainmenu">
<span class="user-options">
<a class="username" href="#"><i class="lar la-user la-lg la-fw"></i> <?=$lang['welcome'] .', '. $_SESSION['user']; ?></a>
<a class="signout" href="logout.php"><i class="las la-sign-out-alt la-lg la-fw"></i> <?=$lang['signOut']; ?></a>
</span>
<a class="menu-icon"><span></span></a>
<ul class="user-nav">
<li id="export-label" class="option-labels has-sub "><i class="las la-file-export la-lg la-fw"></i><a href="#"> <?=$lang['exportAll']?></a>
<ul class="export-options">
<li id="export-all-sublime" title="<?=$lang['exportAllSublime']?>"><a href="export-sublime.php">Sublime text</a></li>
<li id="export-all-json" title="<?=$lang['exportAllJson']?>"><a href="export-json.php">JSON</a></li>
<li id="export-all-plain" title="<?=$lang['exportPlain']?>"><a href="export-plain.php"><?=$lang['plainText']?></a></li>
</ul>
</li>
<li id="import-label" class="option-labels"><i class="las la-file-import la-lg la-fw"></i><a href="#"> <?=$lang['import']?></a></li>
<li class="option-labels" data-modal="settings"><a href="#" data-modal="settings"><i class="las la-cog la-lg la-fw"></i> <?=$lang['settings']?></a></li>
<li class="option-labels"><a class="signout" href="logout.php"><i class="las la-sign-out-alt la-lg la-fw"></i> <?=$lang['signOut']?></a></li>
</ul>
</nav>
</header>
<!-- Sidebar -->
<aside class="sidebar" aria-label="SnippetSelection">
<div class="upperOptions">
<span id="groupsTrigger" onclick="showGroups();" class="upperOptionsActive"><i class="lar la-file-code la-lg"></i> <?=$lang['groups']; ?></span>
<span id="tagsTrigger" onclick="showTags();"><i class="las la-tags la-lg"></i> <?=$lang["tags"]; ?></span>
</div>
<div class="tag-list" style="display:none;">
<?php
$tagsArray = array();
$query = $con->prepare( "SELECT DISTINCT tags FROM tags_snippets WHERE user_id = '$user_id' ORDER BY tags" );
$query->execute();
$query->bind_result($tag);
while($query->fetch()) {
$tagsArray[] = $tag;
}
$query->close();
$countArray = array();
$countSnippet = $con->prepare( "SELECT COUNT(*) FROM tags_snippets WHERE tags = ? AND user_id = ?" );
foreach($tagsArray as $tag1){
$countSnippet->bind_param( "ss", $tag1, $user_id);
$countSnippet->execute();
$countSnippet->bind_result($count);
$countSnippet->fetch();
$countArray[] = $count;
}
$countSnippet->close();
for($i = 0; $i < sizeof($tagsArray); $i++){ ?>
<div class="tag1" onclick="findSnippets('<?php echo $tagsArray[$i]; ?>', 0);">
<span># <?php echo $tagsArray[$i]; ?></span><span class="count-tag"><?php echo $countArray[$i]; ?></span>
</div>
<?php } ?>
</div>
<div class="snippets" style="display: none;">
</div>
<div class="groups">
<?php
$groupsArray = array();
$groupIds = array();
$query = $con->prepare( "SELECT id, name FROM groups WHERE user_id = ?" );
$query->bind_param( "s", $user_id);
$query->execute();
$query->bind_result($ids, $groupNames);
while( $query->fetch() ){
array_push( $groupIds, $ids );
array_push( $groupsArray, $groupNames );
}
$query->close();
$countGroups = array();
$query = $con->prepare( "SELECT * FROM snippets WHERE group_id in (SELECT id FROM groups WHERE name = ?)" );
for( $i = 0; $i < sizeof($groupsArray); $i++ ) {
$query->bind_param( "s", $groupsArray[$i]);
$query->execute();
$query->store_result();
$n = $query->num_rows;
array_push( $countGroups, $n );
}
$query->close();
for( $i = 0; $i < sizeof( $groupsArray); $i++ ) {
?>
<div class="group" onclick="findSnippetsFromGroups('<?php echo $groupIds[$i]; ?>', 0);">
<span class="groupName"><i class="lar la-folder-open"></i> <?php echo $groupsArray[$i]; ?></span>
<i data-id="<?php echo $groupIds[$i]; ?>" class="lar la-trash-alt trash-over group-delete"></i>
<span class="count-tag-group"><?php echo $countGroups[$i]; ?></span>
</div>
<?php } ?>
</div>
<div class="bottom-options">
<span data-modal="addsnip" title="<?=$lang['addNewSnippet']; ?>" class="bottom-button bottom-add-snippet"><i class="las la-file la-2x"></i></span>
<span data-modal="addgroup" title="<?=$lang['addGroup']; ?>" class="bottom-button bottom-add-group"><i class="lar la-folder-open la-2x"></i></span>
</div>
</aside>
<!-- MAIN WINDOW / CODE STUFF && FOOTER-->
<main class="window">
<!-- Snippet details -->
<section class="details-window-top" style="display: none">
<!-- TODO: position reltive? has to push content down -->
<h3 class="detail-title"></h3>
<span id="date-label"></span>
<span id="details-button" class="chevron down" title="<?=$lang['showMoreDetails']; ?>"></span>
</section>
<section class="details-window-under">
<h4><?=$lang['description']; ?></h4>
<p class="detail-desc"></p>
<span id="detail-tags"></span>
</section>
<!-- Code/Snippets -->
<?php $linenumbers = 'update-when-loaded'; if( $value === 1 ) { $linenumbers = 'line-numbers'; } else { $linenumbers = 'no-line-numbers'; }?>
<pre class="pre-code <?=$linenumbers?> rainbow-braces" style="font-family: <?=$font?>; font-size: 0.<?=$size?>em;"><code id="codeBlock" class="l"></code></pre>
<pre hidden class="raw-code"></pre>
<!-- FOOTER -->
<footer class="code-footer">
<div class="footer-options">
<span class="copyright"><a href="https://github.com/rawsta/RawSnippets" class="link-to-rawsta" >©2022 | RawSnippets™</a></span>
<!-- SNIPPET OPTIONS lower right on snippet view -->
<nav id="snippetOptions" class="snippet-options invisible" aria-label="Options">
<!-- TODO: change to svg -->
<div class="fancy" tabindex="-1">
<div class="balken"></div>
<div class="balken"></div>
<div class="balken"></div>
</div>
<ul class="snippet-option-wrap">
<li style="--animation-order: 4;" class="option-item" id="share-label" data-modal="sharing" title="<?=$lang['snippetPrivate'] ?>"><span><?=$lang['private']; ?></span> <i class="las la-share-square la-lg la-fw"></i></li>
<li style="--animation-order: 3;" class="option-item" id="sublime-label" title="<?=$lang['exportAsSublime'] ?>"><span>Sublime Text</span> <i class="las la-file-code la-lg la-fw"></i></li>
<li style="--animation-order: 2;" class="option-item" id="code-label" title="<?=$lang['rawCode']; ?>"><span></<?=$lang['code']; ?>></span> <i class="las la-file-alt la-lg la-fw"></i></li>
<li style="--animation-order: 1;" class="option-item" id="copy-label" data-clipboard-target=".raw-code" title="<?=$lang['copyClipboard']; ?>"><span><?=$lang['copy']; ?></span> <i class="las la-copy la-lg la-fw"></i></li>
</ul>
</nav>
</div>
</footer>
</main>
<!-- ---//--- MODALS AND STUFF ---//--- -->
<!-- ADD NEW SNIPPET -->
<section id="addsnip" class="add-snippet-window">
<div class="form-wrapper">
<form action="#" class="addsnipform" autocomplete="off">
<!-- TODO: Strings in lang.php auslagern! -->
<h3 class="modal-title"><?=$lang['addNewSnippet']?></h3>
<div class="input-group-wrap">
<div class="wrap-half">
<label for="name">Titel des neuen Snippets <abbr title="required" aria-label="required">*</abbr></label>
<input type="text" placeholder="<?=$lang['name']?>" name="name" id="name" required>
</div>
<div class="wrap-half">
<!-- TODO: Fix this dropdown -->
<label data-id="" id="groupSelect"><?=$lang['selectGroup']?></label>
<ul class="groupDropDown">
<?php for( $i=0; $i<sizeof( $gNames ); $i++ ) { ?>
<li id="<?=$gIds[$i]?>"><?=$gNames[$i]?></li>
<?php } ?>
</ul>
</div>
</div>
<div class="input-group-wrap">
<div class="wrap-half">
<label for="syntax">Syntax:</label>
<input list="available-syntax" id="syntax" name="syntax" type="text" placeholder="Snippet language"/>
<!-- DataList for kind of autocomplete for input -->
<datalist id="available-syntax">
<option value = "none">
<option value = "plain">
<option value = "plaintext">
<option value = "text">
<option value = "html">
<option value = "xml">
<option value = "svg">
<option value = "txt">
<option value = "js">
<option value = "g4">
<option value = "ino">
<option value = "arm-asm">
<option value = "art">
<option value = "avs">
<option value = "avdl">
<option value = "gawk">
<option value = "shell">
<option value = "shortcode">
<option value = "rbnf">
<option value = "oscript">
<option value = "clike">
<option value = "css">
<option value = "cpp">
<option value = "csp">
<option value = "csv">
<option value = "coffee">
<option value = "csharp">
<option value = "dotnet">
<option value = "django">
<option value = "javascript">
<option value = "jinja2">
<option value = "dns-zone">
<option value = "dockerfile">
<option value = "less">
<option value = "xlsx">
<option value = "xls">
<option value = "php">
<option value = "po">
<option value = "graphql">
<option value = "latex">
<option value = "go">
<option value = "gcode">
<option value = "hbs">
<option value = "mustache">
<option value = "hs">
<option value = "idr">
<option value = "gitignore">
<option value = "lolcode">
<option value = "npmignore">
<option value = "webmanifest">
<option value = "kt">
<option value = "kts">
<option value = "markdown">
<option value = "md">
<option value = "tex">
<option value = "scala">
<option value = "emacs">
<option value = "elisp">
<option value = "markup">
<option value = "vim">
<option value = "twig">
<option value = "dotnet">
<option value = "log">
<option value = "objc">
<option value = "qasm">
<option value = "objectpascal">
<option value = "px">
<option value = "pcode">
<option value = "json">
<option value = "pq">
<option value = "gettext">
<option value = "powershell">
<option value = "java">
<option value = "python">
<option value = "py">
<option value = "smarty">
<option value = "http">
<option value = "mongodb">
<option value = "rpy">
<option value = "res">
<option value = "po">
<option value = "rb">
<option value = "ruby">
<option value = "sql">
<option value = "nginx">
<option value = "yaml">
<option value = "sass">
<option value = "scss">
<option value = "qml">
<option value = "t4">
<option value = "jsx">
<option value = "trig">
<option value = "ts">
<option value = "tsx">
<option value = "tsconfig">
<option value = "typescript">
<option value = "uscript">
<option value = "uc">
<option value = "url">
<option value = "vb">
<option value = "vba">
<option value = "wiki">
<option value = "matlab">
<option value = "pug">
<option value = "wl">
<option value = "apacheconf">
<option value = "yml">
</datalist>
</div>
<div class="wrap-half">
<span class="info-text">Ohne angabe der Syntax wird das Snippet als einfacher Text angezeigt.</span>
</div>
</div>
<!-- TODO: Links erkennen und verlinken -->
<div class="input-wrap">
<label for="description">Kurze Beschreibung des Snippets <small>(Optional)</small></label>
<textarea placeholder="<?=$lang['description']?>" name="description" id="description" spellcheck="false"></textarea>
</div>
<div class="input-wrap">
<label for="snippetArea">Snippet einfügen <abbr title="required" aria-label="required">*</abbr></label>
<textarea placeholder="<?=$lang['snippet']?>" name="snippet" id="snippetArea" spellcheck="false" rows="10" required></textarea>
</div>
<div class="input-wrap">
<label for="myTags">Tags <abbr title="mindestens 1 Tag angeben" aria-label="required">*</abbr> <small>(mit autocomplete)</small></label>
<input type="text" name="tags" id="myTags">
<label for="myTags"><small>(erleichtern die Suche und helfen bei der Übersicht)</small></label>
</div>
<div class="button-wrap">
<button class="accept" id="save-snippet"><?=$lang['save']?></button>
<button class="cancel" id="snippet-cancel"><?=$lang['cancel']?></button>
</div>
<span hidden data-type="save" class="check-label"></span>
<span hidden class="id-holder"></span>
<span id="snippet-error"></span>
</form>
</div>
</section>
<!-- SUBLIME SNIPPET EXPORT -->
<form class="sublime-snippet-window" method="post" action="sublime-snippet.php" style="display:none;">
<input type="text" name="tabTrigger" id="sublime-snippet-input" placeholder="<?=$lang['tabTrigger']; ?>">
<input type="submit" id="submit-sublime-snippet" value="<?=$lang['download']; ?>">
<button id="sublime-snippet-cancel"><?=$lang['cancel']; ?></button>
<p id="sublime-instructions"><span style="font-weight: bold;"><?=$lang['instructions']; ?>: </span><?=$lang['smallInstructions']; ?></p>
<textarea id="sublime-code" type="text" name="code" hidden></textarea>
<input id="sublime-title" type="text" name="title" hidden>
</form>
<!-- SHARE WINDOW -->
<div id="sharing" class="share-window" style="display:none;">
<p><?=$lang['wantShareSnippet'] ?> <span id="share-option" style="background-color: #27AE60"><?=$lang['yes']; ?></span></p>
<label id="share-close">X</label>
<input type="text" id="share-link">
</div>
<!-- IMPORT/UPLOAD -->
<form id="upload-form" method="post" action="import.php" enctype="multipart/form-data" style="display:none;">
<p id="upload-message"><?=$lang['selectJson']; ?></p>
<input type="file" name="file">
<button id="upload-cancel"><?=$lang['cancel']; ?></button>
<input type="submit" value="<?=$lang['import']; ?>" id="upload-import">
</form>
<!-- ADD NEW GROUP -->
<div id="addgroup" class="add-group">
<form id="addGroupForm" action="add-group.php" method="post">
<label for="group-name"><?=$lang['addGroup']?></label>
<input type="text" id="group-name" name="name" placeholder="<?=$lang['groupName']?>">
<input id="addGroupSubmit" type="submit" value="<?=$lang['save']?>">
<button id="addGroupCancel"><?=$lang['cancel']?></button>
</form>
<span id="addGroupError"></span>
</div>
<!-- SETTINGS FORM -->
<article id="settings" class="settings-form">
<aside class="settings-sidebar" aria-label="setting-areas">
<ul>
<li class="setting-active"><?=$lang['mainSettings']?></li>
<li><?=$lang['email']?></li>
<li><?=$lang['password']?></li>
</ul>
</aside>
<section class="main-settings">
<h3><?=$lang['settings']?></h3>
<div class="language-wrap">
<label for="language-wrap"><?=$lang['language']?></label>
<span class="row-full-flex">
<button id="de" class="button <?=$isLangDE?>" title="<?=$lang['langDeLong']?>"><i class="las la-beer la-lg la-fw"></i> <?=$lang['langDeLong']; ?></button>
<button id="en" class="button <?=$isLangEN?>" title="<?=$lang['langEnLong']?>"><i class="las la-glass-whiskey la-lg la-fw"></i> <?=$lang['langEnLong']; ?></button>
</span>
</div>
<div class="line-numbers">
<label for="line-numbers"><?=$lang['lineNumbers']?></label>
<?php if( $value == 1 ){ ?>
<span style="background-color: var(--raw-color_success)" id="line-num-span" data-value="1"><?=$lang['enabled']?></span>
<?php } else { ?>
<span style="background-color: var(--raw-color_error)" id="line-num-span" data-value="0"><?=$lang['disabled']?></span>
<?php } ?>
</div>
<label for="choose-font"><?=$lang['fontFamily']?></label>
<div class="font-chooser" id="choose-font">
<span class="current-font" data-font="<?=$font?>"><?=$font?></span>
<ul style="display: none">
<li style="font-family: 'JetBrains Mono'">JetBrains Mono</li>
<li style="font-family: 'Courier Sans'">Courier Sans</li>
<li style="font-family: 'monospace'">monospace</li>
</ul>
</div>
<label for="font-size"><?=$lang['fontSize']?></label>
<div class="font-size" name="font-size" data-size="<?=$size?>">
<?php if( $size === '70' ) { ?>
<span class="active-size"><?=$lang['small']?></span>
<span><?=$lang['medium']?></span>
<span><?=$lang['large']?></span>
<?php } else if( $size === '80' ) { ?>
<span><?=$lang['small']?></span>
<span class="active-size"><?=$lang['medium']?></span>
<span><?=$lang['large']?></span>
<?php } else if( $size === '90' ) {?>
<span><?=$lang['small']?></span>
<span><?=$lang['medium']?></span>
<span class="active-size"><?=$lang['large']?></span>
<?php } ?>
</div>
</section>
<section class="mail-settings" style="display: none;">
<h3><?=$lang['changeEmail']?></h3>
<div class="input-wrap">
<label for="s-new-email"><?=$lang['newEmail']?></label>
<input type="email" name="new-email" id="s-new-email" placeholder="<?=$lang['newEmail']?>" autocomplete="off">
</div>
<div class="input-wrap">
<label for="s-rep-email"><?=$lang['repeatEmail']?></label>
<input type="email" name="rep-email" id="s-rep-email" placeholder="<?=$lang['repeatEmail']?>" autocomplete="off">
</div>
<span id="s-notification"></span>
</section>
<section class="password-settings" style="display: none;">
<h3><?=$lang['changePassword']?></h3>
<div class="input-wrap">
<label for="s-old-pass"><?=$lang['oldPassword']?></label>
<input type="password" name="old-pass" id="s-old-pass" placeholder="<?=$lang['oldPassword']?>" autocomplete="current-password">
</div>
<div class="input-wrap">
<label for="s-new-pass"><?=$lang['newPassword']?></label>
<input type="password" name="new-pass" id="s-new-pass" placeholder="<?=$lang['newPassword']?>" autocomplete="new-password">
</div>
<div class="input-wrap">
<label for="s-rep-pass"><?=$lang['repeatPassword']?></label>
<input type="password" name="rep-pass" id="s-rep-pass" placeholder="<?=$lang['repeatPassword']?>" autocomplete="new-password">
</div>
<span id="s-notification-pass"></span>
</section>
<div class="main-setting-buttons">
<button class="accept setting-ok tiny" data-current="main"><?=$lang['apply']; ?></button>
<button class="cancel setting-close tiny modal-exit"><?=$lang['close']; ?></button>
</div>
</article>
</div><!-- /div container -->
<!-- TODO: Is this still needed? only used in sharing? -->
<var id="sitePath-holder" hidden><?=$pageRoot?></var>
</body>
</html>