1
0

bootstrap.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. <?php
  2. use PrivateBin\I18n;
  3. $isCpct = substr($template, 9, 8) === '-compact';
  4. $isDark = substr($template, 9, 5) === '-dark';
  5. $isPage = substr($template, -5) === '-page';
  6. ?><!DOCTYPE html>
  7. <html lang="<?php echo I18n::getLanguage(); ?>"<?php echo I18n::isRtl() ? ' dir="rtl"' : ''; ?>>
  8. <head>
  9. <meta charset="utf-8" />
  10. <meta http-equiv="Content-Security-Policy" content="<?php echo I18n::encode($CSPHEADER); ?>">
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  12. <meta name="viewport" content="width=device-width, initial-scale=1">
  13. <meta name="robots" content="noindex" />
  14. <meta name="google" content="notranslate">
  15. <title><?php echo I18n::_($NAME); ?></title>
  16. <?php
  17. if (!$isDark) :
  18. ?>
  19. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.4.1.css" />
  20. <?php
  21. endif;
  22. ?>
  23. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.4.1.css" />
  24. <?php
  25. if ($isDark) :
  26. ?>
  27. <link type="text/css" rel="stylesheet" href="css/bootstrap/darkstrap-0.9.3.css" />
  28. <?php
  29. endif;
  30. ?>
  31. <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?<?php echo rawurlencode($VERSION); ?>" />
  32. <?php
  33. if ($SYNTAXHIGHLIGHTING) :
  34. ?>
  35. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" />
  36. <?php
  37. if (strlen($SYNTAXHIGHLIGHTINGTHEME)) :
  38. ?>
  39. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" />
  40. <?php
  41. endif;
  42. endif;
  43. ?>
  44. <noscript><link type="text/css" rel="stylesheet" href="css/noscript.css" /></noscript>
  45. <script type="text/javascript" data-cfasync="false" src="js/jquery-3.7.0.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous"></script>
  46. <?php
  47. if ($QRCODE) :
  48. ?>
  49. <script async type="text/javascript" data-cfasync="false" src="js/kjua-0.9.0.js" integrity="sha512-CVn7af+vTMBd9RjoS4QM5fpLFEOtBCoB0zPtaqIDC7sF4F8qgUSRFQQpIyEDGsr6yrjbuOLzdf20tkHHmpaqwQ==" crossorigin="anonymous"></script>
  50. <?php
  51. endif;
  52. if ($ZEROBINCOMPATIBILITY) :
  53. ?>
  54. <script type="text/javascript" data-cfasync="false" src="js/base64-1.7.js" integrity="sha512-JdwsSP3GyHR+jaCkns9CL9NTt4JUJqm/BsODGmYhBcj5EAPKcHYh+OiMfyHbcDLECe17TL0hjXADFkusAqiYgA==" crossorigin="anonymous"></script>
  55. <?php
  56. endif;
  57. ?>
  58. <script type="text/javascript" data-cfasync="false" src="js/zlib-1.2.13.js" integrity="sha512-Lv4PCbSge8B4odE2blatgggJ/mkX1Ak21e7jL8mY3vzrVHS8FGsrEoqCrizxIJB4sW3T2w5Q+RG7hhUvp7+9tw==" crossorigin="anonymous"></script>
  59. <script type="text/javascript" data-cfasync="false" src="js/base-x-4.0.0.js" integrity="sha512-nNPg5IGCwwrveZ8cA/yMGr5HiRS5Ps2H+s0J/mKTPjCPWUgFGGw7M5nqdnPD3VsRwCVysUh3Y8OWjeSKGkEQJQ==" crossorigin="anonymous"></script>
  60. <script type="text/javascript" data-cfasync="false" src="js/rawinflate-0.3.js" integrity="sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==" crossorigin="anonymous"></script>
  61. <script type="text/javascript" data-cfasync="false" src="js/bootstrap-3.4.1.js" integrity="sha512-oBTprMeNEKCnqfuqKd6sbvFzmFQtlXS3e0C/RGFV0hD6QzhHV+ODfaQbAlmY6/q0ubbwlAM/nCJjkrgA3waLzg==" crossorigin="anonymous"></script>
  62. <?php
  63. if ($SYNTAXHIGHLIGHTING) :
  64. ?>
  65. <script type="text/javascript" data-cfasync="false" src="js/prettify.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-puO0Ogy++IoA2Pb9IjSxV1n4+kQkKXYAEUtVzfZpQepyDPyXk8hokiYDS7ybMogYlyyEIwMLpZqVhCkARQWLMg==" crossorigin="anonymous"></script>
  66. <?php
  67. endif;
  68. if ($MARKDOWN) :
  69. ?>
  70. <script type="text/javascript" data-cfasync="false" src="js/showdown-2.1.0.js" integrity="sha512-WYXZgkTR0u/Y9SVIA4nTTOih0kXMEd8RRV6MLFdL6YU8ymhR528NLlYQt1nlJQbYz4EW+ZsS0fx1awhiQJme1Q==" crossorigin="anonymous"></script>
  71. <?php
  72. endif;
  73. ?>
  74. <script type="text/javascript" data-cfasync="false" src="js/purify-3.0.4.js" integrity="sha512-N7H+3ylaOUeKuTX57cZoa42hqaG5w1rchG/IP9+BHd48W/vESgPDpb5QuDqzJE1dZhrGVCQgU8peIQGHmdGFhQ==" crossorigin="anonymous"></script>
  75. <script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
  76. <script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-ykPMZuZDmyGNik7G5dIeqE/+CJ79OKZ0XzPPVWUwAzp+k8PQoP66J8F8zYtI53dM4ITLojkNKrv4vTv6E3bzFQ==" crossorigin="anonymous"></script>
  77. <!-- icon -->
  78. <link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
  79. <link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
  80. <link rel="icon" type="image/png" href="img/favicon-16x16.png" sizes="16x16" />
  81. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  82. <link rel="mask-icon" href="img/safari-pinned-tab.svg" color="#ffcc00" />
  83. <link rel="shortcut icon" href="img/favicon.ico">
  84. <meta name="msapplication-config" content="browserconfig.xml">
  85. <meta name="theme-color" content="#ffe57e" />
  86. <!-- Twitter/social media cards -->
  87. <meta name="twitter:card" content="summary" />
  88. <meta name="twitter:title" content="<?php echo I18n::_('Encrypted note on %s', I18n::_($NAME)) ?>" />
  89. <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.') ?>" />
  90. <meta name="twitter:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  91. <meta property="og:title" content="<?php echo I18n::_($NAME); ?>" />
  92. <meta property="og:site_name" content="<?php echo I18n::_($NAME); ?>" />
  93. <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.') ?>" />
  94. <meta property="og:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  95. <meta property="og:image:type" content="image/png" />
  96. <meta property="og:image:width" content="180" />
  97. <meta property="og:image:height" content="180" />
  98. </head>
  99. <body role="document" data-compression="<?php echo rawurlencode($COMPRESSION); ?>"<?php
  100. $class = array();
  101. if ($isCpct) {
  102. $class[] = 'navbar-spacing';
  103. }
  104. if ($isDark) {
  105. $class[] = 'dark-theme';
  106. }
  107. if (count($class)) {
  108. echo ' class="', implode(' ', $class), '"';
  109. }
  110. ?>>
  111. <div id="passwordmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  112. <div class="modal-dialog" role="document">
  113. <div class="modal-content">
  114. <div class="modal-body">
  115. <form id="passwordform" role="form">
  116. <div class="form-group">
  117. <label for="passworddecrypt"><span class="glyphicon glyphicon-eye-open"></span> <?php echo I18n::_('Please enter the password for this paste:') ?></label>
  118. <input id="passworddecrypt" type="password" class="form-control" placeholder="<?php echo I18n::_('Enter password') ?>" required="required">
  119. </div>
  120. <button type="submit" class="btn btn-success btn-block"><span class="glyphicon glyphicon-off"></span> <?php echo I18n::_('Decrypt') ?></button>
  121. </form>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <?php
  127. if ($QRCODE) :
  128. ?>
  129. <div id="qrcodemodal" tabindex="-1" class="modal fade" aria-labelledby="qrcodemodalTitle" role="dialog" aria-hidden="true">
  130. <div class="modal-dialog" role="document">
  131. <div class="modal-content">
  132. <div class="modal-body">
  133. <div class="mx-auto" id="qrcode-display"></div>
  134. </div>
  135. <div class="row">
  136. <div class="btn-group col-xs-12">
  137. <span class="col-xs-12">
  138. <button type="button" class="btn btn-primary btn-block" data-dismiss="modal"><?php echo I18n::_('Close') ?></button>
  139. </span>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <?php
  146. endif;
  147. if ($EMAIL) :
  148. ?>
  149. <div id="emailconfirmmodal" tabindex="-1" class="modal fade" aria-labelledby="emailconfirmmodalTitle" role="dialog" aria-hidden="true">
  150. <div class="modal-dialog" role="document">
  151. <div class="modal-content">
  152. <div class="modal-body">
  153. <div id="emailconfirm-display"></div>
  154. </div>
  155. <div class="row">
  156. <div class="btn-group col-xs-12" data-toggle="buttons">
  157. <span class="col-xs-12 col-md-4">
  158. <button id="emailconfirm-timezone-current" type="button" class="btn btn-danger btn-block" data-dismiss="modal"><?php echo I18n::_('Use Current Timezone') ?></button>
  159. </span>
  160. <span class="col-xs-12 col-md-4">
  161. <button id="emailconfirm-timezone-utc" type="button" class="btn btn-default btn-block" data-dismiss="modal"><?php echo I18n::_('Convert To UTC') ?></button>
  162. </span>
  163. <span class="col-xs-12 col-md-4">
  164. <button type="button" class="btn btn-primary btn-block" data-dismiss="modal"><?php echo I18n::_('Close') ?></button>
  165. </span>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <?php
  172. endif;
  173. ?>
  174. <nav class="navbar navbar-<?php echo $isDark ? 'inverse' : 'default'; ?> navbar-<?php echo $isCpct ? 'fixed' : 'static'; ?>-top"><?php
  175. if ($isCpct) :
  176. ?><div class="container"><?php
  177. endif;
  178. ?>
  179. <div class="navbar-header">
  180. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  181. <span class="sr-only"><?php echo I18n::_('Toggle navigation'); ?></span>
  182. <span class="icon-bar"></span>
  183. <span class="icon-bar"></span>
  184. <span class="icon-bar"></span>
  185. </button>
  186. <a class="reloadlink navbar-brand" href="">
  187. <img alt="<?php echo I18n::_($NAME); ?>" src="img/icon.svg" width="38" />
  188. </a>
  189. </div>
  190. <div id="navbar" class="navbar-collapse collapse">
  191. <ul class="nav navbar-nav">
  192. <li id="loadingindicator" class="navbar-text hidden">
  193. <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
  194. <?php echo I18n::_('Loading…'), PHP_EOL; ?>
  195. </li>
  196. <li>
  197. <button id="retrybutton" type="button" class="reloadlink hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> navbar-btn">
  198. <span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> <?php echo I18n::_('Retry'), PHP_EOL; ?>
  199. </button>
  200. </li>
  201. <li>
  202. <?php
  203. if ($isPage) :
  204. ?>
  205. <button id="sendbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> navbar-btn">
  206. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Send'), PHP_EOL;
  207. else :
  208. ?>
  209. <button id="newbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  210. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL;
  211. endif;
  212. ?>
  213. </button>
  214. <button id="clonebutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  215. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Clone'), PHP_EOL; ?>
  216. </button>
  217. <button id="rawtextbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  218. <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> <?php echo I18n::_('Raw text'), PHP_EOL; ?>
  219. </button>
  220. <button id="downloadtextbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  221. <span class="glyphicon glyphicon glyphicon-download-alt" aria-hidden="true"></span> <?php echo I18n::_('Save paste'), PHP_EOL; ?>
  222. </button>
  223. <?php
  224. if ($EMAIL) :
  225. ?>
  226. <button id="emaillink" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  227. <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> <?php echo I18n::_('Email'), PHP_EOL; ?>
  228. </button>
  229. <?php
  230. endif;
  231. if ($QRCODE) :
  232. ?>
  233. <button id="qrcodelink" type="button" data-toggle="modal" data-target="#qrcodemodal" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  234. <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> <?php echo I18n::_('QR code'), PHP_EOL; ?>
  235. </button>
  236. <?php
  237. endif;
  238. ?>
  239. </li>
  240. <li class="dropdown">
  241. <select id="pasteExpiration" name="pasteExpiration" class="hidden">
  242. <?php
  243. foreach ($EXPIRE as $key => $value) :
  244. ?>
  245. <option value="<?php echo $key; ?>"<?php
  246. if ($key == $EXPIREDEFAULT) :
  247. ?> selected="selected"<?php
  248. endif;
  249. ?>><?php echo $value; ?></option>
  250. <?php
  251. endforeach;
  252. ?>
  253. </select>
  254. <a id="expiration" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Expires'); ?>: <span id="pasteExpirationDisplay"><?php echo $EXPIRE[$EXPIREDEFAULT]; ?></span> <span class="caret"></span></a>
  255. <ul class="dropdown-menu">
  256. <?php
  257. foreach ($EXPIRE as $key => $value) :
  258. ?>
  259. <li>
  260. <a href="#" data-expiration="<?php echo $key; ?>">
  261. <?php echo $value, PHP_EOL; ?>
  262. </a>
  263. </li>
  264. <?php
  265. endforeach;
  266. ?>
  267. </ul>
  268. </li>
  269. <?php
  270. if ($isCpct) :
  271. ?>
  272. <li class="dropdown">
  273. <a id="formatter" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Options'); ?> <span class="caret"></span></a>
  274. <ul class="dropdown-menu">
  275. <li id="burnafterreadingoption" class="checkbox hidden">
  276. <label>
  277. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  278. if ($BURNAFTERREADINGSELECTED) :
  279. ?> checked="checked"<?php
  280. endif;
  281. ?> />
  282. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  283. </label>
  284. </li>
  285. <?php
  286. if ($DISCUSSION) :
  287. ?>
  288. <li id="opendiscussionoption" class="checkbox hidden">
  289. <label>
  290. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  291. if ($OPENDISCUSSION) :
  292. ?> checked="checked"<?php
  293. endif;
  294. ?> />
  295. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  296. </label>
  297. </li>
  298. <?php
  299. endif;
  300. ?>
  301. <li role="separator" class="divider"></li>
  302. <li>
  303. <div>
  304. <?php echo I18n::_('Format'); ?>: <span id="pasteFormatterDisplay"><?php echo $FORMATTER[$FORMATTERDEFAULT]; ?></span> <span class="caret"></span>
  305. </div>
  306. </li>
  307. <?php
  308. foreach ($FORMATTER as $key => $value) :
  309. ?>
  310. <li>
  311. <a href="#" data-format="<?php echo $key; ?>">
  312. <?php echo $value, PHP_EOL; ?>
  313. </a>
  314. </li>
  315. <?php
  316. endforeach;
  317. ?>
  318. </ul>
  319. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  320. <?php
  321. foreach ($FORMATTER as $key => $value) :
  322. ?>
  323. <option value="<?php echo $key; ?>"<?php
  324. if ($key == $FORMATTERDEFAULT) :
  325. ?> selected="selected"<?php
  326. endif;
  327. ?>><?php echo $value; ?></option>
  328. <?php
  329. endforeach;
  330. ?>
  331. </select>
  332. </li>
  333. <?php
  334. else :
  335. ?>
  336. <li>
  337. <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
  338. <label>
  339. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  340. if ($BURNAFTERREADINGSELECTED) :
  341. ?> checked="checked"<?php
  342. endif;
  343. ?> />
  344. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  345. </label>
  346. </div>
  347. </li>
  348. <?php
  349. if ($DISCUSSION) :
  350. ?>
  351. <li>
  352. <div id="opendiscussionoption" class="navbar-text checkbox hidden">
  353. <label>
  354. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  355. if ($OPENDISCUSSION) :
  356. ?> checked="checked"<?php
  357. endif;
  358. ?> />
  359. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  360. </label>
  361. </div>
  362. </li>
  363. <?php
  364. endif;
  365. endif;
  366. if ($PASSWORD) :
  367. ?>
  368. <li>
  369. <div id="password" class="navbar-form hidden">
  370. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="23" />
  371. </div>
  372. </li>
  373. <?php
  374. endif;
  375. if ($FILEUPLOAD) :
  376. ?>
  377. <li id="attach" class="hidden dropdown">
  378. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Attach a file'); ?> <span class="caret"></span></a>
  379. <ul class="dropdown-menu">
  380. <li id="filewrap">
  381. <div>
  382. <input type="file" id="file" name="file" />
  383. </div>
  384. <div id="dragAndDropFileName" class="dragAndDropFile"><?php echo I18n::_('alternatively drag & drop a file or paste an image from the clipboard'); ?></div>
  385. </li>
  386. <li id="customattachment" class="hidden"></li>
  387. <li>
  388. <a id="fileremovebutton" href="#">
  389. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  390. </a>
  391. </li>
  392. </ul>
  393. </li>
  394. <?php
  395. endif;
  396. if (!$isCpct) :
  397. ?>
  398. <li class="dropdown">
  399. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  400. <?php
  401. foreach ($FORMATTER as $key => $value) :
  402. ?>
  403. <option value="<?php echo $key; ?>"<?php
  404. if ($key == $FORMATTERDEFAULT) :
  405. ?> selected="selected"<?php
  406. endif;
  407. ?>><?php echo $value; ?></option>
  408. <?php
  409. endforeach;
  410. ?>
  411. </select>
  412. <a id="formatter" href="#" class="hidden dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Format'); ?>: <span id="pasteFormatterDisplay"><?php echo $FORMATTER[$FORMATTERDEFAULT]; ?></span> <span class="caret"></span></a>
  413. <ul class="dropdown-menu">
  414. <?php
  415. foreach ($FORMATTER as $key => $value) :
  416. ?>
  417. <li>
  418. <a href="#" data-format="<?php echo $key; ?>">
  419. <?php echo $value, PHP_EOL; ?>
  420. </a>
  421. </li>
  422. <?php
  423. endforeach;
  424. ?>
  425. </ul>
  426. </li>
  427. <?php
  428. endif;
  429. ?>
  430. </ul>
  431. <ul class="nav navbar-nav pull-right">
  432. <?php
  433. if (strlen($LANGUAGESELECTION)) :
  434. ?>
  435. <li id="language" class="dropdown">
  436. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-flag" aria-hidden="true"></span> <?php echo $LANGUAGES[$LANGUAGESELECTION][0]; ?> <span class="caret"></span></a>
  437. <ul class="dropdown-menu dropdown-menu-right">
  438. <?php
  439. foreach ($LANGUAGES as $key => $value) :
  440. ?>
  441. <li>
  442. <a href="#" data-lang="<?php echo $key; ?>">
  443. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  444. </a>
  445. </li>
  446. <?php
  447. endforeach;
  448. ?>
  449. </ul>
  450. </li>
  451. <?php
  452. endif;
  453. ?>
  454. </ul>
  455. </div>
  456. <?php
  457. if ($isCpct) :
  458. ?></div><?php
  459. endif;
  460. ?></nav>
  461. <main>
  462. <section class="container">
  463. <?php
  464. if (strlen($NOTICE)) :
  465. ?>
  466. <div role="alert" class="alert alert-info">
  467. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  468. <?php echo I18n::encode($NOTICE), PHP_EOL; ?>
  469. </div>
  470. <?php
  471. endif;
  472. ?>
  473. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  474. <span class="glyphicon glyphicon-fire" aria-hidden="true"></span>
  475. </div>
  476. <?php
  477. if ($FILEUPLOAD) :
  478. ?>
  479. <div id="attachment" role="alert" class="hidden alert alert-info">
  480. <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
  481. <a class="alert-link"><?php echo I18n::_('Download attachment'), PHP_EOL; ?></a>
  482. </div>
  483. <?php
  484. endif;
  485. ?>
  486. <div id="status" role="alert" class="alert alert-info<?php echo empty($STATUS) ? ' hidden' : '' ?>">
  487. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  488. <?php echo I18n::encode($STATUS), PHP_EOL; ?>
  489. </div>
  490. <div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
  491. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  492. <?php echo I18n::encode($ERROR), PHP_EOL; ?>
  493. </div>
  494. <noscript>
  495. <div id="noscript" role="alert" class="alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>">
  496. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  497. <?php echo I18n::_('JavaScript is required for %s to work. Sorry for the inconvenience.', I18n::_($NAME)), PHP_EOL; ?>
  498. </div>
  499. </noscript>
  500. <div id="oldnotice" role="alert" class="hidden alert alert-danger">
  501. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  502. <?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)), PHP_EOL; ?>
  503. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  504. <a href="https://www.opera.com/">Opera</a>,
  505. <a href="https://www.google.com/chrome">Chrome</a>…<br />
  506. <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>
  507. </div>
  508. <?php
  509. if ($HTTPWARNING) :
  510. ?>
  511. <div id="httpnotice" role="alert" class="hidden alert alert-danger">
  512. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  513. <?php echo I18n::_('This website is using an insecure connection! Please only use it for testing.'), PHP_EOL; ?><br />
  514. <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>
  515. </div>
  516. <div id="insecurecontextnotice" role="alert" class="hidden alert alert-danger">
  517. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  518. <?php echo I18n::_('Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href="%s">switching to HTTPS</a>.', $HTTPSLINK); ?>
  519. </div>
  520. <?php
  521. endif;
  522. ?>
  523. <div id="pastesuccess" class="hidden">
  524. <div role="alert" class="alert alert-success">
  525. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  526. <div id="deletelink"></div>
  527. <div id="pastelink"></div>
  528. </div>
  529. <?php
  530. if (strlen($URLSHORTENER)) :
  531. ?>
  532. <p>
  533. <button id="shortenbutton" data-shortener="<?php echo I18n::encode($URLSHORTENER); ?>" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> btn-block">
  534. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  535. </button>
  536. </p>
  537. <div role="alert" class="alert alert-danger">
  538. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  539. <?php echo I18n::_('URL shortener may expose your decrypt key in URL.'), PHP_EOL; ?>
  540. </div>
  541. <?php
  542. endif;
  543. ?>
  544. </div>
  545. <ul id="editorTabs" class="nav nav-tabs hidden">
  546. <li role="presentation" class="active"><a role="tab" aria-selected="true" aria-controls="editorTabs" id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  547. <li role="presentation"><a role="tab" aria-selected="false" aria-controls="editorTabs" id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  548. <li role="presentation" class="pull-right">
  549. <?php
  550. if ($isPage) :
  551. ?>
  552. <button id="newbutton" type="button" class="reloadlink hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?>">
  553. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL;
  554. else :
  555. ?>
  556. <button id="sendbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?>">
  557. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Send'), PHP_EOL;
  558. endif;
  559. ?>
  560. </button>
  561. </li>
  562. </ul>
  563. </section>
  564. <section class="container">
  565. <article class="row">
  566. <div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no paste text +++'); ?></div>
  567. <div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
  568. <div id="prettymessage" class="col-md-12 hidden">
  569. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  570. </div>
  571. <div id="plaintext" class="col-md-12 hidden"></div>
  572. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" class="form-control hidden"></textarea></p>
  573. </article>
  574. </section>
  575. <section class="container">
  576. <div id="discussion" class="hidden">
  577. <h4><?php echo I18n::_('Discussion'); ?></h4>
  578. <div id="commentcontainer"></div>
  579. </div>
  580. </section>
  581. <section class="container">
  582. <div id="noscript" role="alert" class="alert alert-info noscript-hide">
  583. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  584. <?php echo I18n::_('Loading…'); ?><br />
  585. <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>
  586. </div>
  587. </section>
  588. <footer class="container">
  589. <div class="row">
  590. <h4 class="col-md-5 col-xs-8"><?php echo I18n::_($NAME); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h4>
  591. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  592. <p id="aboutbox" class="col-md-6 col-xs-12">
  593. <?php echo sprintf(
  594. I18n::_('%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted %sin the browser%s using 256 bits AES.',
  595. I18n::_($NAME),
  596. '%s', '%s'
  597. ),
  598. '<i>', '</i>'), ' ', $INFO, PHP_EOL;
  599. ?>
  600. </p>
  601. </div>
  602. </footer>
  603. </main>
  604. <?php
  605. if ($DISCUSSION) :
  606. ?>
  607. <div id="serverdata" class="hidden" aria-hidden="true">
  608. <div id="templates">
  609. <article id="commenttemplate" class="comment"><div class="commentmeta"><span class="nickname">name</span><span class="commentdate">0000-00-00</span></div><div class="commentdata">c</div><button class="btn btn-default btn-sm"><?php echo I18n::_('Reply'); ?></button></article>
  610. <p id="commenttailtemplate" class="comment"><button class="btn btn-default btn-sm"><?php echo I18n::_('Add comment'); ?></button></p>
  611. <div id="replytemplate" class="reply hidden"><input type="text" id="nickname" class="form-control" title="<?php echo I18n::_('Optional nickname…'); ?>" placeholder="<?php echo I18n::_('Optional nickname…'); ?>" /><textarea id="replymessage" class="replymessage form-control" cols="80" rows="7"></textarea><br /><div id="replystatus" role="alert" class="statusmessage hidden alert"><span class="glyphicon" aria-hidden="true"></span> </div><button id="replybutton" class="btn btn-default btn-sm"><?php echo I18n::_('Post comment'); ?></button></div>
  612. </div>
  613. </div>
  614. <?php
  615. endif;
  616. ?>
  617. <?php
  618. if ($FILEUPLOAD) :
  619. ?>
  620. <div id="dropzone" class="hidden" tabindex="-1" aria-hidden="true"></div>
  621. <?php
  622. endif;
  623. ?>
  624. </body>
  625. </html>