bootstrap.php 28 KB

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