bootstrap5.php 27 KB

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