Browse Source

Show a warning to users when database is encrypted

spaghetti 7 years ago
parent
commit
23fe809fe6
3 changed files with 25 additions and 3 deletions
  1. 5
    2
      design/privateheader.php
  2. 1
    1
      sections/inbox/conversation.php
  3. 19
    0
      static/styles/global.css

+ 5
- 2
design/privateheader.php View File

292
 
292
 
293
   if (G::$LoggedUser['FLTokens'] > 0) { ?>
293
   if (G::$LoggedUser['FLTokens'] > 0) { ?>
294
           <li id="fl_tokens">
294
           <li id="fl_tokens">
295
-            <a href="wiki.php?action=article&amp;id=7">Tokens</a>:
295
+            <a href="wiki.php?action=article&amp;name=tokens">Tokens</a>:
296
             <span class="stat">
296
             <span class="stat">
297
               <a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
297
               <a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
298
             </span>
298
             </span>
300
 <?  }
300
 <?  }
301
 ?>
301
 ?>
302
           <li id="bonus_points">
302
           <li id="bonus_points">
303
-            <a href="wiki.php?action=article&amp;id=8"><?=BONUS_POINTS?></a>:
303
+            <a href="wiki.php?action=article&amp;name=bonuspoints"><?=BONUS_POINTS?></a>:
304
             <span class="stat">
304
             <span class="stat">
305
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
305
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
306
             </span>
306
             </span>
316
 ?>
316
 ?>
317
         </ul>
317
         </ul>
318
       </div>
318
       </div>
319
+<? if (!apcu_exists('DBKEY')) { ?>
320
+      <a id="dbcrypt" class="tooltip" href="wiki.php?action=article&amp;name=databaseencryption" title="Database is not fully decrypted. Site functionality will be reduced until staff can provide the decryption key. Click to learn more."></a>
321
+<? } ?>
319
     </div>
322
     </div>
320
 <?
323
 <?
321
 //Start handling alert bars
324
 //Start handling alert bars

+ 1
- 1
sections/inbox/conversation.php View File

83
 <?
83
 <?
84
 
84
 
85
 while (list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) {
85
 while (list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) {
86
-  $Body = apcu_exists('DBKEY') ? Crypto::decrypt($Body) : '[Encrypted]';
86
+  $Body = apcu_exists('DBKEY') ? Crypto::decrypt($Body) : '[url=https://'.SITE_DOMAIN.'/wiki.php?action=article&name=databaseencryption][Encrypted][/url]';
87
 ?>
87
 ?>
88
   <div class="box vertical_space">
88
   <div class="box vertical_space">
89
     <div class="head" style="overflow: hidden;">
89
     <div class="head" style="overflow: hidden;">

+ 19
- 0
static/styles/global.css View File

934
 form.edit_form[name=screenshots_form] input[type=text], form.edit_form[name=screenshots_form] img {
934
 form.edit_form[name=screenshots_form] input[type=text], form.edit_form[name=screenshots_form] img {
935
   width: 400px;
935
   width: 400px;
936
 }
936
 }
937
+
938
+#dbcrypt {
939
+  position: fixed;
940
+  top: 10px;
941
+  right: 10px;
942
+}
943
+#dbcrypt:after {
944
+  content: "!";
945
+  display: block;
946
+  width: 20px;
947
+  height: 20px;
948
+  text-align: center;
949
+  line-height: 20px;
950
+  font-size: 20px;
951
+  font-weight: 600;
952
+  color: black;
953
+  background: red;
954
+  border-radius: 100px;
955
+}

Loading…
Cancel
Save