bootstrap5.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. <?php declare(strict_types=1);
  2. use PrivateBin\I18n;
  3. ?><!DOCTYPE html>
  4. <html lang="<?php echo I18n::getLanguage(); ?>"<?php echo I18n::isRtl() ? ' dir="rtl"' : ''; ?> class="h-100">
  5. <head>
  6. <meta charset="utf-8" />
  7. <meta http-equiv="Content-Security-Policy" content="<?php echo I18n::encode($CSPHEADER); ?>">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. <meta name="robots" content="noindex" />
  11. <meta name="google" content="notranslate">
  12. <title><?php echo I18n::_($NAME); ?></title>
  13. <link type="text/css" rel="stylesheet" href="css/bootstrap5/bootstrap<?php echo I18n::isRtl() ? '.rtl' : ''; ?>-5.3.8.css" />
  14. <link type="text/css" rel="stylesheet" href="css/bootstrap5/privatebin.css?<?php echo rawurlencode($VERSION); ?>" />
  15. <?php
  16. if ($SYNTAXHIGHLIGHTING) :
  17. ?>
  18. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" />
  19. <?php
  20. if (!empty($SYNTAXHIGHLIGHTINGTHEME)) :
  21. ?>
  22. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" />
  23. <?php
  24. endif;
  25. endif;
  26. ?>
  27. <noscript><link type="text/css" rel="stylesheet" href="css/noscript.css" /></noscript>
  28. <?php $this->_linkTag('js/zlib-1.3.2.js'); ?>
  29. <?php $this->_scriptTag('js/jquery-3.7.1.js', 'defer'); ?>
  30. <?php
  31. if ($QRCODE) :
  32. ?>
  33. <?php $this->_scriptTag('js/kjua-0.10.0.js', 'defer'); ?>
  34. <?php
  35. endif;
  36. ?>
  37. <?php $this->_scriptTag('js/zlib.js', 'defer'); ?>
  38. <?php $this->_scriptTag('js/base-x-5.0.1.js', 'defer'); ?>
  39. <?php $this->_scriptTag('js/bootstrap-5.3.8.js', 'defer'); ?>
  40. <?php $this->_scriptTag('js/dark-mode-switch.js', 'defer'); ?>
  41. <?php
  42. if ($SYNTAXHIGHLIGHTING) :
  43. ?>
  44. <?php $this->_scriptTag('js/prettify.js', 'defer'); ?>
  45. <?php
  46. endif;
  47. if ($MARKDOWN) :
  48. ?>
  49. <?php $this->_scriptTag('js/showdown-2.1.0.js', 'defer'); ?>
  50. <?php
  51. endif;
  52. ?>
  53. <?php $this->_scriptTag('js/purify-3.4.1.js', 'defer'); ?>
  54. <?php $this->_scriptTag('js/legacy.js', 'defer'); ?>
  55. <?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
  56. <!-- icon -->
  57. <link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
  58. <link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
  59. <link rel="icon" type="image/png" href="img/favicon-16x16.png" sizes="16x16" />
  60. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  61. <link rel="mask-icon" href="img/safari-pinned-tab.svg" color="#ffcc00" />
  62. <link rel="shortcut icon" href="img/favicon.ico">
  63. <meta name="msapplication-config" content="browserconfig.xml">
  64. <meta name="theme-color" content="#ffe57e" />
  65. <!-- Twitter/social media cards -->
  66. <meta name="twitter:card" content="summary" />
  67. <meta name="twitter:title" content="<?php echo I18n::_('Encrypted note on %s', I18n::_($NAME)) ?>" />
  68. <meta name="twitter:description" content="<?php echo I18n::_('Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.') ?>" />
  69. <meta name="twitter:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  70. <meta property="og:title" content="<?php echo I18n::_($NAME); ?>" />
  71. <meta property="og:site_name" content="<?php echo I18n::_($NAME); ?>" />
  72. <meta property="og:description" content="<?php echo I18n::_('Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.') ?>" />
  73. <meta property="og:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  74. <meta property="og:image:type" content="image/png" />
  75. <meta property="og:image:width" content="180" />
  76. <meta property="og:image:height" content="180" />
  77. </head>
  78. <body role="document" data-compression="<?php echo rawurlencode($COMPRESSION); ?>" class="d-flex flex-column h-100">
  79. <div id="passwordmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  80. <div class="modal-dialog" role="document">
  81. <div class="modal-content">
  82. <div class="modal-body">
  83. <form id="passwordform" role="form">
  84. <div class="mb-3">
  85. <label for="passworddecrypt"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg> <?php echo I18n::_('Please enter the password for this document:') ?></label>
  86. <div class="input-group">
  87. <input id="passworddecrypt" type="password" class="form-control input-password" placeholder="<?php echo I18n::_('Enter password') ?>" required="required" />
  88. <button class="btn btn-outline-secondary toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
  89. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg>
  90. </button>
  91. </div>
  92. </div>
  93. <button type="submit" class="btn btn-success btn-block"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#power" /></svg> <?php echo I18n::_('Decrypt') ?></button>
  94. </form>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div id="loadconfirmmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  100. <div class="modal-dialog" role="document">
  101. <div class="modal-content">
  102. <div class="modal-header">
  103. <h5 class="modal-title"><?php echo I18n::_('This secret message can only be displayed once. Would you like to see it now?') ?></h5>
  104. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"></button>
  105. </div>
  106. <div class="modal-body text-center">
  107. <button id="loadconfirm-open-now" type="button" class="btn btn-success" data-bs-dismiss="modal"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#cloud-download" /></svg> <?php echo I18n::_('Yes, see it') ?></button>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <?php
  113. if ($QRCODE) :
  114. ?>
  115. <div id="qrcodemodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  116. <div class="modal-dialog" role="document">
  117. <div class="modal-content">
  118. <div class="modal-header">
  119. <h5 class="modal-title"><?php echo I18n::_('QR code') ?></h5>
  120. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"></button>
  121. </div>
  122. <div class="modal-body">
  123. <div class="mx-auto" id="qrcode-display"></div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <?php
  129. endif;
  130. if ($EMAIL) :
  131. ?>
  132. <div id="emailconfirmmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  133. <div class="modal-dialog" role="document">
  134. <div class="modal-content">
  135. <div class="modal-header">
  136. <h5 class="modal-title"><?php echo I18n::_('Recipient may become aware of your timezone, convert time to UTC?') ?></h5>
  137. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"></button>
  138. </div>
  139. <div class="modal-body row">
  140. <div class="col-xs-12 col-md-6">
  141. <button id="emailconfirm-timezone-current" type="button" class="btn btn-danger"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#clock" /></svg> <?php echo I18n::_('Use Current Timezone') ?></button>
  142. </div>
  143. <div class="col-xs-12 col-md-6 text-right">
  144. <button id="emailconfirm-timezone-utc" type="button" class="btn btn-success"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#globe" /></svg> <?php echo I18n::_('Convert To UTC') ?></button>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. <?php
  151. endif;
  152. ?>
  153. <nav class="navbar navbar-expand-lg bg-body-tertiary text-nowrap mb-3">
  154. <div class="container-fluid">
  155. <a class="reloadlink navbar-brand" href="">
  156. <img alt="<?php echo I18n::_($NAME); ?>" src="img/icon.svg" height="38" />
  157. </a>
  158. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="<?php echo I18n::_('Toggle navigation'); ?>">
  159. <span class="navbar-toggler-icon"></span>
  160. </button>
  161. <div id="navbar" class="collapse navbar-collapse">
  162. <ul class="navbar-nav me-auto gap-2 align-items-lg-center align-items-stretch">
  163. <li id="loadingindicator" class="navbar-text hidden me-auto">
  164. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#clock" /></svg>
  165. <?php echo I18n::_('Loading…'), PHP_EOL; ?>
  166. </li>
  167. <li class="nav-item d-flex flex-lg-row flex-column">
  168. <button id="retrybutton" type="button" class="reloadlink hidden btn btn-primary d-flex justify-content-center align-items-center gap-1">
  169. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#repeat" /></svg> <?php echo I18n::_('Retry'), PHP_EOL; ?>
  170. </button>
  171. </li>
  172. <li class="nav-item d-flex flex-lg-row flex-column gap-2">
  173. <button id="newbutton" type="button" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  174. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#file-earmark" /></svg> <?php echo I18n::_('New'), PHP_EOL; ?>
  175. </button>
  176. <button id="clonebutton" type="button" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  177. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg> <?php echo I18n::_('Clone'), PHP_EOL; ?>
  178. </button>
  179. <button id="rawtextbutton" type="button" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  180. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#filetype-txt" /></svg> <?php echo I18n::_('Raw text'), PHP_EOL; ?>
  181. </button>
  182. <button id="downloadtextbutton" type="button" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  183. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#download" /></svg> <?php echo I18n::_('Save document'), PHP_EOL; ?>
  184. </button>
  185. <?php
  186. if ($EMAIL) :
  187. ?>
  188. <button id="emaillink" type="button" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  189. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#envelope" /></svg> <?php echo I18n::_('Email'), PHP_EOL; ?>
  190. </button>
  191. <?php
  192. endif;
  193. if ($QRCODE) :
  194. ?>
  195. <button id="qrcodelink" type="button" data-bs-toggle="modal" data-bs-target="#qrcodemodal" class="hidden btn btn-secondary flex-fill d-flex justify-content-center align-items-center gap-1">
  196. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#qr-code" /></svg> <?php echo I18n::_('QR code'), PHP_EOL; ?>
  197. </button>
  198. <?php
  199. endif;
  200. ?>
  201. </li>
  202. <li id="expiration" class="nav-item d-flex hidden">
  203. <label for="pasteExpiration" class="form-label my-auto me-1"><?php echo I18n::_('Expires'); ?>:</label>
  204. <select id="pasteExpiration" name="pasteExpiration" class="form-select">
  205. <?php
  206. foreach ($EXPIRE as $key => $value) :
  207. ?>
  208. <option value="<?php echo $key; ?>"<?php
  209. if ($key === $EXPIREDEFAULT) :
  210. ?> selected="selected"<?php
  211. endif;
  212. ?>><?php echo $value; ?></option>
  213. <?php
  214. endforeach;
  215. ?>
  216. </select>
  217. </li>
  218. <li class="nav-item">
  219. <div id="burnafterreadingoption" class="navbar-text form-check hidden">
  220. <input class="form-check-input" type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  221. if ($BURNAFTERREADINGSELECTED) :
  222. ?> checked="checked"<?php
  223. endif;
  224. ?> />
  225. <label class="form-check-label" for="burnafterreading">
  226. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  227. </label>
  228. </div>
  229. </li>
  230. <?php
  231. if ($DISCUSSION) :
  232. ?>
  233. <li class="nav-item">
  234. <div id="opendiscussionoption" class="navbar-text form-check hidden">
  235. <input class="form-check-input" type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  236. if ($OPENDISCUSSION) :
  237. ?> checked="checked"<?php
  238. endif;
  239. ?> />
  240. <label class="form-check-label" for="opendiscussion">
  241. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  242. </label>
  243. </div>
  244. </li>
  245. <?php
  246. endif;
  247. if ($PASSWORD) :
  248. ?>
  249. <li class="nav-item">
  250. <div id="password" class="navbar-form hidden">
  251. <div class="input-group">
  252. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" aria-label="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control input-password" size="23" />
  253. <button class="btn btn-outline-secondary toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
  254. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg>
  255. </button>
  256. </div>
  257. </div>
  258. </li>
  259. <?php
  260. endif;
  261. if ($FILEUPLOAD) :
  262. ?>
  263. <li id="attach" class="nav-item hidden dropdown">
  264. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false"><?php echo I18n::_('Attach a file'); ?></a>
  265. <ul class="dropdown-menu px-2">
  266. <li id="filewrap">
  267. <div>
  268. <input type="file" id="file" name="file" class="form-control" multiple />
  269. </div>
  270. <div id="dragAndDropFileName" class="dragAndDropFile"><?php echo I18n::_('alternatively drag & drop a file or paste an image from the clipboard'); ?></div>
  271. </li>
  272. <li id="customattachment" class="hidden d-flex flex-column px-3"></li>
  273. <li>
  274. <a id="fileremovebutton" href="#" class="dropdown-item">
  275. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  276. </a>
  277. </li>
  278. </ul>
  279. </li>
  280. <?php
  281. endif;
  282. ?>
  283. <li id="formatter" class="nav-item d-flex hidden">
  284. <label for="pasteFormatter" class="form-label my-auto me-1"><?php echo I18n::_('Format'); ?>:</label>
  285. <select id="pasteFormatter" name="pasteFormatter" class="form-select">
  286. <?php
  287. foreach ($FORMATTER as $key => $value) :
  288. ?>
  289. <option value="<?php echo $key; ?>"<?php
  290. if ($key === $FORMATTERDEFAULT) :
  291. ?> selected="selected"<?php
  292. endif;
  293. ?>><?php echo $value; ?></option>
  294. <?php
  295. endforeach;
  296. ?>
  297. </select>
  298. </li>
  299. </ul>
  300. <ul class="navbar-nav gap-2">
  301. <li class="nav-item">
  302. <div class="form-check form-switch navbar-text">
  303. <input id="bd-theme" type="checkbox" class="form-check-input" />
  304. <label for="bd-theme" class="form-check-label"><?php echo I18n::_('Dark Mode'); ?></label>
  305. </div>
  306. </li>
  307. <?php
  308. if (!empty($LANGUAGESELECTION)) :
  309. ?>
  310. <li id="language" class="nav-item dropdown">
  311. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false">
  312. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#flag" /></svg> <?php echo $LANGUAGES[$LANGUAGESELECTION][0], PHP_EOL; ?>
  313. </a>
  314. <ul class="dropdown-menu dropdown-menu-end" role="menu">
  315. <?php
  316. foreach ($LANGUAGES as $key => $value) :
  317. ?>
  318. <li>
  319. <a href="#" class="dropdown-item" data-lang="<?php echo $key; ?>">
  320. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  321. </a>
  322. </li>
  323. <?php
  324. endforeach;
  325. ?>
  326. </ul>
  327. </li>
  328. <?php
  329. endif;
  330. ?>
  331. <?php
  332. if (!empty($TEMPLATESELECTION)) :
  333. ?>
  334. <li id="template" class="nav-item dropdown">
  335. <a href="#" class="nav-link dropdown-toggle d-flex align-items-center gap-1" data-bs-toggle="dropdown" role="button" aria-expanded="false">
  336. <?php echo I18n::_('Theme'); ?>: <?php echo $TEMPLATESELECTION, PHP_EOL; ?>
  337. </a>
  338. <ul class="dropdown-menu dropdown-menu-end" role="menu">
  339. <?php
  340. foreach ($TEMPLATES as $value) :
  341. ?>
  342. <li>
  343. <a href="#" class="dropdown-item" data-template="<?php echo $value; ?>">
  344. <?php echo $value; ?>
  345. </a>
  346. </li>
  347. <?php
  348. endforeach;
  349. ?>
  350. </ul>
  351. </li>
  352. <?php
  353. endif;
  354. ?>
  355. </ul>
  356. </div>
  357. </div>
  358. </nav>
  359. <main>
  360. <section class="container-fluid mt-2">
  361. <?php
  362. if (!empty($NOTICE)) :
  363. ?>
  364. <div role="alert" class="alert alert-info">
  365. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#info-circle" /></svg>
  366. <?php echo I18n::encode($NOTICE), PHP_EOL; ?>
  367. </div>
  368. <?php
  369. endif;
  370. ?>
  371. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  372. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#fire" /></svg>
  373. </div>
  374. <?php
  375. if ($FILEUPLOAD) :
  376. ?>
  377. <div id="attachment" class="hidden"></div>
  378. <?php
  379. endif;
  380. ?>
  381. <div id="status" role="alert" class="d-flex align-items-center gap-2 alert alert-<?php echo $ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
  382. <div>
  383. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#info-circle" /></svg>
  384. <?php echo I18n::encode($STATUS), PHP_EOL; ?>
  385. </div>
  386. <?php
  387. if ($ISDELETED) :
  388. ?>
  389. <button type="button" class="btn btn-secondary d-flex justify-content-center align-items-center gap-1 ms-auto" id="new-from-alert">
  390. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#repeat" /></svg>
  391. <?php echo I18n::_('Start over'), PHP_EOL; ?>
  392. </button>
  393. <?php
  394. endif;
  395. ?>
  396. </div>
  397. <div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
  398. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-triangle" /></svg>
  399. <?php echo I18n::encode($ERROR), PHP_EOL; ?>
  400. </div>
  401. <noscript>
  402. <div id="noscript" role="alert" class="alert alert-warning">
  403. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-circle" /></svg>
  404. <?php echo I18n::_('JavaScript is required for %s to work. Sorry for the inconvenience.', I18n::_($NAME)), PHP_EOL; ?>
  405. </div>
  406. </noscript>
  407. <div id="oldnotice" role="alert" class="hidden alert alert-danger">
  408. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-triangle" /></svg>
  409. <?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)), PHP_EOL; ?>
  410. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  411. <a href="https://www.opera.com/">Opera</a>,
  412. <a href="https://www.google.com/chrome">Chrome</a>…<br />
  413. <span class="small"><?php echo I18n::_('For more information <a href="%s">see this FAQ entry</a>.', 'https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-it-show-me-the-error-privatebin-requires-a-modern-browser-to-work'); ?></span>
  414. </div>
  415. <?php
  416. if ($HTTPWARNING) :
  417. ?>
  418. <div id="httpnotice" role="alert" class="hidden alert alert-danger">
  419. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-triangle" /></svg>
  420. <?php echo I18n::_('This website is using an insecure connection! Please only use it for testing.'); ?><br />
  421. <span class="small"><?php echo I18n::_('For more information <a href="%s">see this FAQ entry</a>.', 'https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-it-show-me-an-error-about-an-insecure-connection'); ?></span>
  422. </div>
  423. <div id="insecurecontextnotice" role="alert" class="hidden alert alert-danger">
  424. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-triangle" /></svg>
  425. <?php echo I18n::_('Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href="%s">switching to HTTPS</a>.', $HTTPSLINK), PHP_EOL; ?>
  426. </div>
  427. <?php
  428. endif;
  429. ?>
  430. <div id="pastesuccess" class="hidden">
  431. <div class="nav justify-content-between mb-2">
  432. <button id="copyLink" type="button" class="btn btn-secondary d-flex justify-content-center align-items-center gap-1">
  433. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#copy" /></svg> <?php echo I18n::_('Copy link') ?>
  434. </button>
  435. <a href="#" id="deletelink" class="btn btn-secondary d-flex justify-content-center align-items-center gap-1">
  436. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#trash" /></svg>
  437. <span></span>
  438. </a>
  439. </div>
  440. <div role="alert" class="alert alert-success">
  441. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#check" /></svg>
  442. <div id="pastelink"></div>
  443. </div>
  444. <?php
  445. if (!empty($URLSHORTENER)) :
  446. ?>
  447. <p>
  448. <button id="shortenbutton" data-shortener="<?php echo I18n::encode($URLSHORTENER); ?>"
  449. <?php if ($SHORTENBYDEFAULT) : ?>
  450. data-autoshorten="true"
  451. <?php endif; ?>
  452. type="button" class="btn btn-primary btn-block d-flex justify-content-center align-items-center gap-1"
  453. >
  454. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#send" /></svg> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  455. </button>
  456. </p>
  457. <div role="alert" class="alert alert-danger">
  458. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-circle" /></svg>
  459. <?php if ($SHORTENBYDEFAULT) : ?>
  460. <?php echo I18n::_('URL shortener is enabled by default.'), PHP_EOL; ?>
  461. <?php endif; ?>
  462. <?php echo I18n::_('URL shortener may expose your decrypt key in URL.'), PHP_EOL; ?>
  463. </div>
  464. <?php
  465. endif;
  466. ?>
  467. </div>
  468. <ul id="editorTabs" class="nav nav-tabs hidden">
  469. <li role="presentation" class="nav-item me-1"><a class="nav-link active" role="tab" id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  470. <li role="presentation" class="nav-item me-1"><a class="nav-link" role="tab" id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  471. <li role="presentation" class="nav-item ms-auto">
  472. <button id="sendbutton" type="button" tabindex="2" class="hidden btn btn-primary d-flex justify-content-center align-items-center gap-1">
  473. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#cloud-upload" /></svg> <?php echo I18n::_('Create'), PHP_EOL; ?>
  474. </button>
  475. </li>
  476. </ul>
  477. </section>
  478. <section class="container-fluid">
  479. <article>
  480. <div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no document text +++'); ?></div>
  481. <div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
  482. <h6 id="copyShortcutHint" class="col-md-12 nav justify-content-between align-items-center mb-2 hidden">
  483. <small id="copyShortcutHintText">
  484. <?php echo I18n::_("To copy document press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>") ?>
  485. </small>
  486. <button type="button" id="copyShortcutHintBtn" class="btn btn-secondary"><?php echo I18n::_('Copy'); ?></button>
  487. </h6>
  488. <div id="prettymessage" class="card col-md-12 hidden">
  489. <pre id="prettyprint" class="card-body col-md-12 prettyprint linenums:1"></pre>
  490. </div>
  491. <div id="plaintext" class="col-md-12 hidden"></div>
  492. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" aria-label="<?php echo I18n::_('Document text'); ?>" tabindex="1" class="form-control hidden"></textarea></p>
  493. <p class="col-md-12 form-check form-switch">
  494. <input id="messagetab" type="checkbox" tabindex="3" class="form-check-input" checked="checked" />
  495. <label for="messagetab" class="form-check-label">
  496. <?php echo I18n::_('Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)'), PHP_EOL; ?>
  497. </label>
  498. </p>
  499. </article>
  500. </section>
  501. <section class="container-fluid">
  502. <div id="discussion" class="hidden">
  503. <h4><?php echo I18n::_('Discussion'); ?></h4>
  504. <div id="commentcontainer"></div>
  505. </div>
  506. </section>
  507. <section class="container-fluid">
  508. <div id="noscript" role="alert" class="alert alert-info noscript-hide">
  509. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#exclamation-circle" /></svg>
  510. <?php echo I18n::_('Loading…'); ?><br />
  511. <span class="small"><?php echo I18n::_('In case this message never disappears please have a look at <a href="%s">this FAQ for information to troubleshoot</a>.', 'https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-the-loading-message-not-go-away'); ?></span>
  512. </div>
  513. </section>
  514. </main>
  515. <footer class="container-fluid mt-auto">
  516. <div class="row">
  517. <h5 class="col-md-5 col-xs-8"><?php echo I18n::_($NAME); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h5>
  518. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  519. <p id="aboutbox" class="col-md-6 col-xs-12">
  520. <?php echo sprintf(
  521. I18n::_('%s is a minimalist, open source online pastebin where the server has zero knowledge of stored data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.',
  522. I18n::_($NAME),
  523. '%s', '%s'
  524. ),
  525. '<i>', '</i>'), ' ', $INFO, PHP_EOL;
  526. ?>
  527. </p>
  528. </div>
  529. </footer>
  530. <div id="serverdata" class="hidden" aria-hidden="true">
  531. <div id="templates">
  532. <article id="commenttemplate" class="comment px-2 pb-3">
  533. <div class="commentmeta">
  534. <span class="nickname">name</span>
  535. <span class="commentdate">0000-00-00</span>
  536. </div>
  537. <div class="commentdata">c</div>
  538. <button class="btn btn-secondary btn-sm"><?php echo I18n::_('Reply'); ?></button>
  539. </article>
  540. <p id="commenttailtemplate" class="comment px-2 pb-3">
  541. <button class="btn btn-secondary btn-sm"><?php echo I18n::_('Add comment'); ?></button>
  542. </p>
  543. <div id="replytemplate" class="reply hidden">
  544. <input type="text" id="nickname" class="form-control my-2" title="<?php echo I18n::_('Optional nickname…'); ?>" placeholder="<?php echo I18n::_('Optional nickname…'); ?>" />
  545. <textarea id="replymessage" class="replymessage form-control" cols="80" rows="7"></textarea><br />
  546. <div id="replystatus" role="alert" class="statusmessage hidden alert">
  547. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#info-circle" /></svg>
  548. </div>
  549. <button id="replybutton" class="btn btn-secondary btn-sm"><?php echo I18n::_('Post comment'); ?></button>
  550. </div>
  551. <div id="attachmenttemplate" role="alert" class="hidden alert alert-info">
  552. <svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#download" /></svg>
  553. <a class="alert-link"><?php echo I18n::_('Download attachment'); ?><span></span></a>
  554. </div>
  555. </div>
  556. </div>
  557. <?php
  558. if ($FILEUPLOAD) :
  559. ?>
  560. <div id="dropzone" class="hidden" tabindex="-1" aria-hidden="true"></div>
  561. <?php
  562. endif;
  563. ?>
  564. </body>
  565. </html>