bootstrap.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. <?php declare(strict_types=1);
  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 (!empty($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. <?php $this->_scriptTag('js/jquery-3.7.1.js', 'defer'); ?>
  46. <?php
  47. if ($QRCODE) :
  48. ?>
  49. <?php $this->_scriptTag('js/kjua-0.9.0.js', 'async'); ?>
  50. <?php
  51. endif;
  52. if ($ZEROBINCOMPATIBILITY) :
  53. ?>
  54. <?php $this->_scriptTag('js/base64-1.7.js', 'async'); ?>
  55. <?php
  56. endif;
  57. ?>
  58. <?php $this->_scriptTag('js/zlib-1.3.1.js', 'async'); ?>
  59. <?php $this->_scriptTag('js/base-x-4.0.0.js', 'defer'); ?>
  60. <?php $this->_scriptTag('js/rawinflate-0.3.js', 'defer'); ?>
  61. <?php $this->_scriptTag('js/bootstrap-3.4.1.js', 'defer'); ?>
  62. <?php
  63. if ($SYNTAXHIGHLIGHTING) :
  64. ?>
  65. <?php $this->_scriptTag('js/prettify.js', 'async'); ?>
  66. <?php
  67. endif;
  68. if ($MARKDOWN) :
  69. ?>
  70. <?php $this->_scriptTag('js/showdown-2.1.0.js', 'async'); ?>
  71. <?php
  72. endif;
  73. ?>
  74. <?php $this->_scriptTag('js/purify-3.2.6.js', 'async'); ?>
  75. <?php $this->_scriptTag('js/legacy.js', 'async'); ?>
  76. <?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
  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. <div id="loadconfirmmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  127. <div class="modal-dialog" role="document">
  128. <div class="modal-content">
  129. <div class="modal-header">
  130. <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"><span aria-hidden="true">&times;</span></button>
  131. <h4 class="modal-title"><?php echo I18n::_('This secret message can only be displayed once. Would you like to see it now?') ?></h4>
  132. </div>
  133. <div class="modal-body text-center">
  134. <button id="loadconfirm-open-now" type="button" class="btn btn-success" data-dismiss="modal"><span class="glyphicon glyphicon-download"></span> <?php echo I18n::_('Yes, see it') ?></button>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <?php
  140. if ($QRCODE) :
  141. ?>
  142. <div id="qrcodemodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  143. <div class="modal-dialog" role="document">
  144. <div class="modal-content">
  145. <div class="modal-header">
  146. <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"><span aria-hidden="true">&times;</span></button>
  147. <h4 class="modal-title"><?php echo I18n::_('QR code') ?></h4>
  148. </div>
  149. <div class="modal-body">
  150. <div class="mx-auto" id="qrcode-display"></div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. <?php
  156. endif;
  157. if ($EMAIL) :
  158. ?>
  159. <div id="emailconfirmmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  160. <div class="modal-dialog" role="document">
  161. <div class="modal-content">
  162. <div class="modal-header">
  163. <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo I18n::_('Close') ?>"><span aria-hidden="true">&times;</span></button>
  164. <h4 class="modal-title"><?php echo I18n::_('Recipient may become aware of your timezone, convert time to UTC?') ?></h4>
  165. </div>
  166. <div class="modal-body row">
  167. <div class="col-xs-12 col-md-6">
  168. <button id="emailconfirm-timezone-current" type="button" class="btn btn-danger"><span class="glyphicon glyphicon-time"></span> <?php echo I18n::_('Use Current Timezone') ?></button>
  169. </div>
  170. <div class="col-xs-12 col-md-6 text-right">
  171. <button id="emailconfirm-timezone-utc" type="button" class="btn btn-success"><span class="glyphicon glyphicon-globe"></span> <?php echo I18n::_('Convert To UTC') ?></button>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. <?php
  178. endif;
  179. ?>
  180. <nav class="navbar navbar-<?php echo $isDark ? 'inverse' : 'default'; ?> navbar-<?php echo $isCpct ? 'fixed' : 'static'; ?>-top"><?php
  181. if ($isCpct) :
  182. ?><div class="container"><?php
  183. endif;
  184. ?>
  185. <div class="navbar-header">
  186. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  187. <span class="sr-only"><?php echo I18n::_('Toggle navigation'); ?></span>
  188. <span class="icon-bar"></span>
  189. <span class="icon-bar"></span>
  190. <span class="icon-bar"></span>
  191. </button>
  192. <a class="reloadlink navbar-brand" href="">
  193. <img alt="<?php echo I18n::_($NAME); ?>" src="img/icon.svg" width="38" />
  194. </a>
  195. </div>
  196. <div id="navbar" class="navbar-collapse collapse">
  197. <ul class="nav navbar-nav">
  198. <li id="loadingindicator" class="navbar-text hidden">
  199. <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
  200. <?php echo I18n::_('Loading…'), PHP_EOL; ?>
  201. </li>
  202. <li>
  203. <button id="retrybutton" type="button" class="reloadlink hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> navbar-btn">
  204. <span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> <?php echo I18n::_('Retry'), PHP_EOL; ?>
  205. </button>
  206. </li>
  207. <li>
  208. <?php
  209. if ($isPage) :
  210. ?>
  211. <button id="sendbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> navbar-btn">
  212. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Create'), PHP_EOL;
  213. else :
  214. ?>
  215. <button id="newbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  216. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL;
  217. endif;
  218. ?>
  219. </button>
  220. <button id="clonebutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  221. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Clone'), PHP_EOL; ?>
  222. </button>
  223. <button id="rawtextbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  224. <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> <?php echo I18n::_('Raw text'), PHP_EOL; ?>
  225. </button>
  226. <button id="downloadtextbutton" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  227. <span class="glyphicon glyphicon glyphicon-download-alt" aria-hidden="true"></span> <?php echo I18n::_('Save paste'), PHP_EOL; ?>
  228. </button>
  229. <?php
  230. if ($EMAIL) :
  231. ?>
  232. <button id="emaillink" type="button" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  233. <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> <?php echo I18n::_('Email'), PHP_EOL; ?>
  234. </button>
  235. <?php
  236. endif;
  237. if ($QRCODE) :
  238. ?>
  239. <button id="qrcodelink" type="button" data-toggle="modal" data-target="#qrcodemodal" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  240. <span class="glyphicon glyphicon-qrcode" aria-hidden="true"></span> <?php echo I18n::_('QR code'), PHP_EOL; ?>
  241. </button>
  242. <?php
  243. endif;
  244. ?>
  245. </li>
  246. <li class="dropdown">
  247. <select id="pasteExpiration" name="pasteExpiration" class="hidden">
  248. <?php
  249. foreach ($EXPIRE as $key => $value) :
  250. ?>
  251. <option value="<?php echo $key; ?>"<?php
  252. if ($key == $EXPIREDEFAULT) :
  253. ?> selected="selected"<?php
  254. endif;
  255. ?>><?php echo $value; ?></option>
  256. <?php
  257. endforeach;
  258. ?>
  259. </select>
  260. <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>
  261. <ul class="dropdown-menu">
  262. <?php
  263. foreach ($EXPIRE as $key => $value) :
  264. ?>
  265. <li>
  266. <a href="#" data-expiration="<?php echo $key; ?>">
  267. <?php echo $value, PHP_EOL; ?>
  268. </a>
  269. </li>
  270. <?php
  271. endforeach;
  272. ?>
  273. </ul>
  274. </li>
  275. <?php
  276. if ($isCpct) :
  277. ?>
  278. <li class="dropdown">
  279. <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>
  280. <ul class="dropdown-menu">
  281. <li id="burnafterreadingoption" class="checkbox hidden">
  282. <label>
  283. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  284. if ($BURNAFTERREADINGSELECTED) :
  285. ?> checked="checked"<?php
  286. endif;
  287. ?> />
  288. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  289. </label>
  290. </li>
  291. <?php
  292. if ($DISCUSSION) :
  293. ?>
  294. <li id="opendiscussionoption" class="checkbox hidden">
  295. <label>
  296. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  297. if ($OPENDISCUSSION) :
  298. ?> checked="checked"<?php
  299. endif;
  300. ?> />
  301. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  302. </label>
  303. </li>
  304. <?php
  305. endif;
  306. ?>
  307. <li role="separator" class="divider"></li>
  308. <li>
  309. <div>
  310. <?php echo I18n::_('Format'); ?>: <span id="pasteFormatterDisplay"><?php echo $FORMATTER[$FORMATTERDEFAULT]; ?></span> <span class="caret"></span>
  311. </div>
  312. </li>
  313. <?php
  314. foreach ($FORMATTER as $key => $value) :
  315. ?>
  316. <li>
  317. <a href="#" data-format="<?php echo $key; ?>">
  318. <?php echo $value, PHP_EOL; ?>
  319. </a>
  320. </li>
  321. <?php
  322. endforeach;
  323. ?>
  324. </ul>
  325. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  326. <?php
  327. foreach ($FORMATTER as $key => $value) :
  328. ?>
  329. <option value="<?php echo $key; ?>"<?php
  330. if ($key == $FORMATTERDEFAULT) :
  331. ?> selected="selected"<?php
  332. endif;
  333. ?>><?php echo $value; ?></option>
  334. <?php
  335. endforeach;
  336. ?>
  337. </select>
  338. </li>
  339. <?php
  340. else :
  341. ?>
  342. <li>
  343. <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
  344. <label>
  345. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  346. if ($BURNAFTERREADINGSELECTED) :
  347. ?> checked="checked"<?php
  348. endif;
  349. ?> />
  350. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  351. </label>
  352. </div>
  353. </li>
  354. <?php
  355. if ($DISCUSSION) :
  356. ?>
  357. <li>
  358. <div id="opendiscussionoption" class="navbar-text checkbox hidden">
  359. <label>
  360. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  361. if ($OPENDISCUSSION) :
  362. ?> checked="checked"<?php
  363. endif;
  364. ?> />
  365. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  366. </label>
  367. </div>
  368. </li>
  369. <?php
  370. endif;
  371. endif;
  372. if ($PASSWORD) :
  373. ?>
  374. <li>
  375. <div id="password" class="navbar-form hidden">
  376. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="23" />
  377. </div>
  378. </li>
  379. <?php
  380. endif;
  381. if ($FILEUPLOAD) :
  382. ?>
  383. <li id="attach" class="hidden dropdown">
  384. <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>
  385. <ul class="dropdown-menu">
  386. <li id="filewrap">
  387. <div>
  388. <input type="file" id="file" name="file" />
  389. </div>
  390. <div id="dragAndDropFileName" class="dragAndDropFile"><?php echo I18n::_('alternatively drag & drop a file or paste an image from the clipboard'); ?></div>
  391. </li>
  392. <li id="customattachment" class="hidden"></li>
  393. <li>
  394. <a id="fileremovebutton" href="#">
  395. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  396. </a>
  397. </li>
  398. </ul>
  399. </li>
  400. <?php
  401. endif;
  402. if (!$isCpct) :
  403. ?>
  404. <li class="dropdown">
  405. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  406. <?php
  407. foreach ($FORMATTER as $key => $value) :
  408. ?>
  409. <option value="<?php echo $key; ?>"<?php
  410. if ($key == $FORMATTERDEFAULT) :
  411. ?> selected="selected"<?php
  412. endif;
  413. ?>><?php echo $value; ?></option>
  414. <?php
  415. endforeach;
  416. ?>
  417. </select>
  418. <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>
  419. <ul class="dropdown-menu">
  420. <?php
  421. foreach ($FORMATTER as $key => $value) :
  422. ?>
  423. <li>
  424. <a href="#" data-format="<?php echo $key; ?>">
  425. <?php echo $value, PHP_EOL; ?>
  426. </a>
  427. </li>
  428. <?php
  429. endforeach;
  430. ?>
  431. </ul>
  432. </li>
  433. <?php
  434. endif;
  435. ?>
  436. </ul>
  437. <ul class="nav navbar-nav pull-right">
  438. <?php
  439. if (!empty($LANGUAGESELECTION)) :
  440. ?>
  441. <li id="language" class="dropdown">
  442. <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>
  443. <ul class="dropdown-menu dropdown-menu-right">
  444. <?php
  445. foreach ($LANGUAGES as $key => $value) :
  446. ?>
  447. <li>
  448. <a href="#" data-lang="<?php echo $key; ?>">
  449. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  450. </a>
  451. </li>
  452. <?php
  453. endforeach;
  454. ?>
  455. </ul>
  456. </li>
  457. <?php
  458. endif;
  459. ?>
  460. <?php
  461. if (!empty($TEMPLATESELECTION)) :
  462. ?>
  463. <li id="template" class="dropdown">
  464. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Theme'); ?>: <?php echo $TEMPLATESELECTION; ?> <span class="caret"></span></a>
  465. <ul class="dropdown-menu dropdown-menu-right">
  466. <?php
  467. foreach ($TEMPLATES as $value) :
  468. ?>
  469. <li>
  470. <a href="#" data-template="<?php echo $value; ?>">
  471. <?php echo $value; ?>
  472. </a>
  473. </li>
  474. <?php
  475. endforeach;
  476. ?>
  477. </ul>
  478. </li>
  479. <?php
  480. endif;
  481. ?>
  482. </ul>
  483. </div>
  484. <?php
  485. if ($isCpct) :
  486. ?></div><?php
  487. endif;
  488. ?></nav>
  489. <main>
  490. <section class="container">
  491. <?php
  492. if (!empty($NOTICE)) :
  493. ?>
  494. <div role="alert" class="alert alert-info">
  495. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  496. <?php echo I18n::encode($NOTICE), PHP_EOL; ?>
  497. </div>
  498. <?php
  499. endif;
  500. ?>
  501. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  502. <span class="glyphicon glyphicon-fire" aria-hidden="true"></span>
  503. </div>
  504. <?php
  505. if ($FILEUPLOAD) :
  506. ?>
  507. <div id="attachment" role="alert" class="hidden alert alert-info">
  508. <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
  509. <a class="alert-link"><?php echo I18n::_('Download attachment'); ?></a>
  510. </div>
  511. <?php
  512. endif;
  513. ?>
  514. <div id="status" role="alert" class="clearfix alert alert-<?php echo (bool)$ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
  515. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  516. <?php echo I18n::encode($STATUS), PHP_EOL; ?>
  517. <?php
  518. if ((bool)$ISDELETED):
  519. ?>
  520. <button type="button" class="btn btn-default pull-right" id="new-from-alert">
  521. <span class="glyphicon glyphicon-repeat"></span> <?php echo I18n::_('Start over'), PHP_EOL; ?>
  522. </button>
  523. <?php endif; ?>
  524. </div>
  525. <div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
  526. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  527. <?php echo I18n::encode($ERROR), PHP_EOL; ?>
  528. </div>
  529. <noscript>
  530. <div id="noscript" role="alert" class="alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>">
  531. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  532. <?php echo I18n::_('JavaScript is required for %s to work. Sorry for the inconvenience.', I18n::_($NAME)), PHP_EOL; ?>
  533. </div>
  534. </noscript>
  535. <div id="oldnotice" role="alert" class="hidden alert alert-danger">
  536. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  537. <?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)), PHP_EOL; ?>
  538. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  539. <a href="https://www.opera.com/">Opera</a>,
  540. <a href="https://www.google.com/chrome">Chrome</a>…<br />
  541. <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>
  542. </div>
  543. <?php
  544. if ($HTTPWARNING) :
  545. ?>
  546. <div id="httpnotice" role="alert" class="hidden alert alert-danger">
  547. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  548. <?php echo I18n::_('This website is using an insecure connection! Please only use it for testing.'); ?><br />
  549. <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>
  550. </div>
  551. <div id="insecurecontextnotice" role="alert" class="hidden alert alert-danger">
  552. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  553. <?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; ?>
  554. </div>
  555. <?php
  556. endif;
  557. ?>
  558. <div id="pastesuccess" class="hidden">
  559. <div class="nav nav-justified">
  560. <button id="copyLink" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  561. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Copy link') ?>
  562. </button>
  563. <a href="#" id="deletelink" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  564. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  565. <span></span>
  566. </a>
  567. </div>
  568. <div role="alert" class="alert alert-success">
  569. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  570. <div id="pastelink"></div>
  571. </div>
  572. <?php
  573. if (!empty($URLSHORTENER)) :
  574. ?>
  575. <p>
  576. <button id="shortenbutton" data-shortener="<?php echo I18n::encode($URLSHORTENER); ?>" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> btn-block">
  577. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  578. </button>
  579. </p>
  580. <div role="alert" class="alert alert-danger">
  581. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  582. <?php echo I18n::_('URL shortener may expose your decrypt key in URL.'), PHP_EOL; ?>
  583. </div>
  584. <?php
  585. endif;
  586. ?>
  587. </div>
  588. <ul id="editorTabs" class="nav nav-tabs hidden">
  589. <li role="presentation" class="active"><a role="tab" aria-selected="true" aria-controls="editorTabs" id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  590. <li role="presentation"><a role="tab" aria-selected="false" aria-controls="editorTabs" id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  591. <li role="presentation" class="pull-right">
  592. <?php
  593. if ($isPage) :
  594. ?>
  595. <button id="newbutton" type="button" class="reloadlink hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?>">
  596. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL;
  597. else :
  598. ?>
  599. <button id="sendbutton" type="button" tabindex="2" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?>">
  600. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Create'), PHP_EOL;
  601. endif;
  602. ?>
  603. </button>
  604. </li>
  605. </ul>
  606. </section>
  607. <section class="container">
  608. <article class="row">
  609. <div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no paste text +++'); ?></div>
  610. <div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
  611. <h5 id="copyShortcutHint" class="col-md-12"><small id="copyShortcutHintText"></small></h5>
  612. <div id="prettymessage" class="col-md-12 hidden">
  613. <button id="prettyMessageCopyBtn">
  614. <span id="copyIcon" class="glyphicon glyphicon-duplicate" aria-hidden="true"></span>
  615. <span id="copySuccessIcon" class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>
  616. </button>
  617. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  618. </div>
  619. <div id="plaintext" class="col-md-12 hidden"></div>
  620. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" tabindex="1" class="form-control hidden"></textarea></p>
  621. <p class="col-md-12 checkbox">
  622. <label>
  623. <input id="messagetab" type="checkbox" tabindex="3" checked="checked" />
  624. <?php echo I18n::_('Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)'), PHP_EOL; ?>
  625. </label>
  626. </p>
  627. </article>
  628. </section>
  629. <section class="container">
  630. <div id="discussion" class="hidden">
  631. <h4><?php echo I18n::_('Discussion'); ?></h4>
  632. <div id="commentcontainer"></div>
  633. </div>
  634. </section>
  635. <section class="container">
  636. <div id="noscript" role="alert" class="alert alert-info noscript-hide">
  637. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  638. <?php echo I18n::_('Loading…'); ?><br />
  639. <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>
  640. </div>
  641. </section>
  642. <footer class="container">
  643. <div class="row">
  644. <h4 class="col-md-5 col-xs-8"><?php echo I18n::_($NAME); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h4>
  645. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  646. <p id="aboutbox" class="col-md-6 col-xs-12">
  647. <?php echo sprintf(
  648. 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.',
  649. I18n::_($NAME),
  650. '%s', '%s'
  651. ),
  652. '<i>', '</i>'), ' ', $INFO, PHP_EOL;
  653. ?>
  654. </p>
  655. </div>
  656. </footer>
  657. </main>
  658. <?php
  659. if ($DISCUSSION) :
  660. ?>
  661. <div id="serverdata" class="hidden" aria-hidden="true">
  662. <div id="templates">
  663. <article id="commenttemplate" class="comment">
  664. <div class="commentmeta">
  665. <span class="nickname">name</span>
  666. <span class="commentdate">0000-00-00</span>
  667. </div>
  668. <div class="commentdata">c</div>
  669. <button class="btn btn-default btn-sm"><?php echo I18n::_('Reply'); ?></button>
  670. </article>
  671. <p id="commenttailtemplate" class="comment">
  672. <button class="btn btn-default btn-sm"><?php echo I18n::_('Add comment'); ?></button>
  673. </p>
  674. <div id="replytemplate" class="reply hidden">
  675. <input type="text" id="nickname" class="form-control" title="<?php echo I18n::_('Optional nickname…'); ?>" placeholder="<?php echo I18n::_('Optional nickname…'); ?>" />
  676. <textarea id="replymessage" class="replymessage form-control" cols="80" rows="7"></textarea><br />
  677. <div id="replystatus" role="alert" class="statusmessage hidden alert">
  678. <span class="glyphicon" aria-hidden="true"></span>
  679. </div>
  680. <button id="replybutton" class="btn btn-default btn-sm"><?php echo I18n::_('Post comment'); ?></button>
  681. </div>
  682. </div>
  683. </div>
  684. <?php
  685. endif;
  686. ?>
  687. <?php
  688. if ($FILEUPLOAD) :
  689. ?>
  690. <div id="dropzone" class="hidden" tabindex="-1" aria-hidden="true"></div>
  691. <?php
  692. endif;
  693. ?>
  694. </body>
  695. </html>