File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 88 include_once __DIR__ . '/../../auth/oauth/user_infos.php ' ;
99}
1010
11- if (isset ($ GLOBALS ['global_username ' ]) && $ GLOBALS [ ' global_username ' ] != '' ) {
11+ if (! empty ($ GLOBALS ['global_username ' ])) {
1212 $ global_username = $ GLOBALS ['global_username ' ];
1313} else {
1414 $ GLOBALS ['global_username ' ] = '' ;
Original file line number Diff line number Diff line change 11<?php
22
3+ if (!empty ($ GLOBALS ['global_username ' ])) {
4+
5+ if (!isset ($ _COOKIE ['cookie_alert_dismissed1 ' ])) {
6+ echo <<<HTML
7+ <div id="cookie-alert" class="alert alert-dismissible fade show" role="alert">
8+ <div class="d-flex align-items-center justify-content-center text-center fixed-bottom">
9+ <div class="card border-warning m-1">
10+ <div class="w-100 d-flex justify-content-end">
11+ <button type="button" class="btn btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
12+ </div>
13+ <div class="card-body me-5">
14+ <p class="card-text">This website uses cookies to save your username for a better experience.</p>
15+ </div>
16+ <div class="card-footer text-muted">
17+ <button type="button" class="btn btn-sm btn-success" onclick="acceptCookieAlert()" data-bs-dismiss="alert" aria-label="Close">Accept</button>
18+ <button type="button" class="btn btn-sm btn-warning" data-bs-dismiss="alert" aria-label="Close">Dismiss</button>
19+ </div>
20+ </div>
21+ </div>
22+ </div>
23+ HTML ;
24+ }
25+ }
326if (isset ($ GLOBALS ['time_start ' ])) {
427 $ time_start = $ GLOBALS ['time_start ' ];
528 $ time_end = microtime (true );
2245</main>
2346<script src="/Translation_Dashboard/js/c.js"></script>
2447<script>
48+ function acceptCookieAlert() {
49+ document.cookie = "cookie_alert_dismissed1=true; max-age=31536000; path=/; Secure; SameSite=Lax";
50+ }
51+
2552 function copy_target_text(id) {
2653 let textarea = document.getElementById(id);
2754 textarea.select();
Original file line number Diff line number Diff line change 4646 </li>
4747HTML ;
4848//---
49- if (isset ($ GLOBALS ['global_username ' ]) && $ GLOBALS [ ' global_username ' ] != '' ) {
49+ if (! empty ($ GLOBALS ['global_username ' ])) {
5050 $ u_name = $ GLOBALS ['global_username ' ];
5151 $ li_user = <<<HTML
5252 <li class="nav-item col-6 col-lg-auto">
You can’t perform that action at this time.
0 commit comments