1
0

bootstrap.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  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->_linkTag('js/zlib-1.3.2.js'); ?>
  46. <?php $this->_scriptTag('js/jquery-3.7.1.js', 'defer'); ?>
  47. <?php
  48. if ($QRCODE) :
  49. ?>
  50. <?php $this->_scriptTag('js/kjua-0.10.0.js', 'defer'); ?>
  51. <?php
  52. endif;
  53. ?>
  54. <?php $this->_scriptTag('js/zlib.js', 'defer'); ?>
  55. <?php $this->_scriptTag('js/base-x-5.0.1.js', 'defer'); ?>
  56. <?php $this->_scriptTag('js/bootstrap-3.4.1.js', 'defer'); ?>
  57. <?php
  58. if ($SYNTAXHIGHLIGHTING) :
  59. ?>
  60. <?php $this->_scriptTag('js/prettify.js', 'defer'); ?>
  61. <?php
  62. endif;
  63. if ($MARKDOWN) :
  64. ?>
  65. <?php $this->_scriptTag('js/showdown-2.1.0.js', 'defer'); ?>
  66. <?php
  67. endif;
  68. ?>
  69. <?php $this->_scriptTag('js/purify-3.4.1.js', 'defer'); ?>
  70. <?php $this->_scriptTag('js/legacy.js', 'defer'); ?>
  71. <?php $this->_scriptTag('js/privatebin.js', 'defer'); ?>
  72. <!-- icon -->
  73. <link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
  74. <link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
  75. <link rel="icon" type="image/png" href="img/favicon-16x16.png" sizes="16x16" />
  76. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  77. <link rel="mask-icon" href="img/safari-pinned-tab.svg" color="#ffcc00" />
  78. <link rel="shortcut icon" href="img/favicon.ico">
  79. <meta name="msapplication-config" content="browserconfig.xml">
  80. <meta name="theme-color" content="#ffe57e" />
  81. <!-- Twitter/social media cards -->
  82. <meta name="twitter:card" content="summary" />
  83. <meta name="twitter:title" content="<?php echo I18n::_('Encrypted note on %s', I18n::_($NAME)) ?>" />
  84. <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.') ?>" />
  85. <meta name="twitter:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  86. <meta property="og:title" content="<?php echo I18n::_($NAME); ?>" />
  87. <meta property="og:site_name" content="<?php echo I18n::_($NAME); ?>" />
  88. <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.') ?>" />
  89. <meta property="og:image" content="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" />
  90. <meta property="og:image:type" content="image/png" />
  91. <meta property="og:image:width" content="180" />
  92. <meta property="og:image:height" content="180" />
  93. </head>
  94. <body role="document" data-compression="<?php echo rawurlencode($COMPRESSION); ?>"<?php
  95. $class = array();
  96. if ($isCpct) {
  97. $class[] = 'navbar-spacing';
  98. }
  99. if ($isDark) {
  100. $class[] = 'dark-theme';
  101. }
  102. if (count($class)) {
  103. echo ' class="', implode(' ', $class), '"';
  104. }
  105. ?>>
  106. <div id="passwordmodal" tabindex="-1" class="modal fade" role="dialog" aria-hidden="true">
  107. <div class="modal-dialog" role="document">
  108. <div class="modal-content">
  109. <div class="modal-body">
  110. <form id="passwordform" role="form">
  111. <div class="form-group">
  112. <label for="passworddecrypt"><span class="glyphicon glyphicon-eye-open"></span> <?php echo I18n::_('Please enter the password for this document:') ?></label>
  113. <div class="input-group">
  114. <input id="passworddecrypt" type="password" class="form-control input-password" placeholder="<?php echo I18n::_('Enter password') ?>" required="required">
  115. <div class="input-group-addon toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
  116. <span class="glyphicon glyphicon-eye-open"></span>
  117. </div>
  118. </div>
  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 document'), 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. <div class="input-group">
  377. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control input-password" size="23" />
  378. <div class="input-group-addon toggle-password" type="button" title="<?php echo I18n::_('Show password'); ?>" aria-label="<?php echo I18n::_('Show password'); ?>">
  379. <span class="glyphicon glyphicon-eye-open"></span>
  380. </div>
  381. </div>
  382. </div>
  383. </li>
  384. <?php
  385. endif;
  386. if ($FILEUPLOAD) :
  387. ?>
  388. <li id="attach" class="hidden dropdown">
  389. <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>
  390. <ul class="dropdown-menu">
  391. <li id="filewrap">
  392. <div>
  393. <input type="file" id="file" name="file" multiple />
  394. </div>
  395. <div id="dragAndDropFileName" class="dragAndDropFile"><?php echo I18n::_('alternatively drag & drop a file or paste an image from the clipboard'); ?></div>
  396. </li>
  397. <li id="customattachment" class="hidden"></li>
  398. <li>
  399. <a id="fileremovebutton" href="#">
  400. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  401. </a>
  402. </li>
  403. </ul>
  404. </li>
  405. <?php
  406. endif;
  407. if (!$isCpct) :
  408. ?>
  409. <li class="dropdown">
  410. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  411. <?php
  412. foreach ($FORMATTER as $key => $value) :
  413. ?>
  414. <option value="<?php echo $key; ?>"<?php
  415. if ($key === $FORMATTERDEFAULT) :
  416. ?> selected="selected"<?php
  417. endif;
  418. ?>><?php echo $value; ?></option>
  419. <?php
  420. endforeach;
  421. ?>
  422. </select>
  423. <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>
  424. <ul class="dropdown-menu">
  425. <?php
  426. foreach ($FORMATTER as $key => $value) :
  427. ?>
  428. <li>
  429. <a href="#" data-format="<?php echo $key; ?>">
  430. <?php echo $value, PHP_EOL; ?>
  431. </a>
  432. </li>
  433. <?php
  434. endforeach;
  435. ?>
  436. </ul>
  437. </li>
  438. <?php
  439. endif;
  440. ?>
  441. </ul>
  442. <ul class="nav navbar-nav pull-right">
  443. <?php
  444. if (!empty($LANGUAGESELECTION)) :
  445. ?>
  446. <li id="language" class="dropdown">
  447. <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>
  448. <ul class="dropdown-menu dropdown-menu-right">
  449. <?php
  450. foreach ($LANGUAGES as $key => $value) :
  451. ?>
  452. <li>
  453. <a href="#" data-lang="<?php echo $key; ?>">
  454. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  455. </a>
  456. </li>
  457. <?php
  458. endforeach;
  459. ?>
  460. </ul>
  461. </li>
  462. <?php
  463. endif;
  464. ?>
  465. <?php
  466. if (!empty($TEMPLATESELECTION)) :
  467. ?>
  468. <li id="template" class="dropdown">
  469. <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>
  470. <ul class="dropdown-menu dropdown-menu-right">
  471. <?php
  472. foreach ($TEMPLATES as $value) :
  473. ?>
  474. <li>
  475. <a href="#" data-template="<?php echo $value; ?>">
  476. <?php echo $value; ?>
  477. </a>
  478. </li>
  479. <?php
  480. endforeach;
  481. ?>
  482. </ul>
  483. </li>
  484. <?php
  485. endif;
  486. ?>
  487. </ul>
  488. </div>
  489. <?php
  490. if ($isCpct) :
  491. ?></div><?php
  492. endif;
  493. ?></nav>
  494. <main>
  495. <section class="container">
  496. <?php
  497. if (!empty($NOTICE)) :
  498. ?>
  499. <div role="alert" class="alert alert-info">
  500. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  501. <?php echo I18n::encode($NOTICE), PHP_EOL; ?>
  502. </div>
  503. <?php
  504. endif;
  505. ?>
  506. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  507. <span class="glyphicon glyphicon-fire" aria-hidden="true"></span>
  508. </div>
  509. <?php
  510. if ($FILEUPLOAD) :
  511. ?>
  512. <div id="attachment" class="hidden"></div>
  513. <?php
  514. endif;
  515. ?>
  516. <div id="status" role="alert" class="clearfix alert alert-<?php echo $ISDELETED ? 'success' : 'info'; echo empty($STATUS) ? ' hidden' : '' ?>">
  517. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  518. <?php echo I18n::encode($STATUS), PHP_EOL; ?>
  519. <?php
  520. if ($ISDELETED) :
  521. ?>
  522. <button type="button" class="btn btn-default pull-right" id="new-from-alert">
  523. <span class="glyphicon glyphicon-repeat"></span>
  524. <?php echo I18n::_('Start over'), PHP_EOL; ?>
  525. </button>
  526. <?php
  527. endif;
  528. ?>
  529. </div>
  530. <div id="errormessage" role="alert" class="<?php echo empty($ERROR) ? 'hidden' : '' ?> alert alert-danger">
  531. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  532. <?php echo I18n::encode($ERROR), PHP_EOL; ?>
  533. </div>
  534. <noscript>
  535. <div id="noscript" role="alert" class="alert alert-<?php echo $isDark ? 'error' : 'warning'; ?>">
  536. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  537. <?php echo I18n::_('JavaScript is required for %s to work. Sorry for the inconvenience.', I18n::_($NAME)), PHP_EOL; ?>
  538. </div>
  539. </noscript>
  540. <div id="oldnotice" role="alert" class="hidden alert alert-danger">
  541. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  542. <?php echo I18n::_('%s requires a modern browser to work.', I18n::_($NAME)), PHP_EOL; ?>
  543. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  544. <a href="https://www.opera.com/">Opera</a>,
  545. <a href="https://www.google.com/chrome">Chrome</a>…<br />
  546. <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>
  547. </div>
  548. <?php
  549. if ($HTTPWARNING) :
  550. ?>
  551. <div id="httpnotice" role="alert" class="hidden alert alert-danger">
  552. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  553. <?php echo I18n::_('This website is using an insecure connection! Please only use it for testing.'); ?><br />
  554. <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>
  555. </div>
  556. <div id="insecurecontextnotice" role="alert" class="hidden alert alert-danger">
  557. <span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
  558. <?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; ?>
  559. </div>
  560. <?php
  561. endif;
  562. ?>
  563. <div id="pastesuccess" class="hidden">
  564. <div class="nav nav-justified">
  565. <button id="copyLink" type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  566. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Copy link') ?>
  567. </button>
  568. <a href="#" id="deletelink" class="btn btn-<?php echo $isDark ? 'warning' : 'default'; ?> navbar-btn">
  569. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  570. <span></span>
  571. </a>
  572. </div>
  573. <div role="alert" class="alert alert-success">
  574. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  575. <div id="pastelink"></div>
  576. </div>
  577. <?php
  578. if (!empty($URLSHORTENER)) :
  579. ?>
  580. <p>
  581. <button id="shortenbutton" data-shortener="<?php echo I18n::encode($URLSHORTENER); ?>"
  582. <?php if ($SHORTENBYDEFAULT) : ?>
  583. data-autoshorten="true"
  584. <?php endif; ?>
  585. type="button" class="btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?> btn-block"
  586. >
  587. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  588. </button>
  589. </p>
  590. <div role="alert" class="alert alert-danger">
  591. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  592. <?php if ($SHORTENBYDEFAULT) : ?>
  593. <?php echo I18n::_('URL shortener is enabled by default.'), PHP_EOL; ?>
  594. <?php endif; ?>
  595. <?php echo I18n::_('URL shortener may expose your decrypt key in URL.'), PHP_EOL; ?>
  596. </div>
  597. <?php
  598. endif;
  599. ?>
  600. </div>
  601. <ul id="editorTabs" class="nav nav-tabs hidden">
  602. <li role="presentation" class="active"><a role="tab" aria-selected="true" aria-controls="editorTabs" id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  603. <li role="presentation"><a role="tab" aria-selected="false" aria-controls="editorTabs" id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  604. <li role="presentation" class="pull-right">
  605. <?php
  606. if ($isPage) :
  607. ?>
  608. <button id="newbutton" type="button" class="reloadlink hidden btn btn-<?php echo $isDark ? 'warning' : 'default'; ?>">
  609. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL;
  610. else :
  611. ?>
  612. <button id="sendbutton" type="button" tabindex="2" class="hidden btn btn-<?php echo $isDark ? 'warning' : 'primary'; ?>">
  613. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Create'), PHP_EOL;
  614. endif;
  615. ?>
  616. </button>
  617. </li>
  618. </ul>
  619. </section>
  620. <section class="container">
  621. <article class="row">
  622. <div id="placeholder" class="col-md-12 hidden"><?php echo I18n::_('+++ no document text +++'); ?></div>
  623. <div id="attachmentPreview" class="col-md-12 text-center hidden"></div>
  624. <h5 id="copyShortcutHint" class="media col-md-12 hidden" style="margin-top: 0;">
  625. <div class="media-body media-middle">
  626. <small id="copyShortcutHintText">
  627. <?php echo I18n::_("To copy document press on the copy button or use the clipboard shortcut <kbd>Ctrl</kbd>+<kbd>c</kbd>/<kbd>Cmd</kbd>+<kbd>c</kbd>") ?>
  628. </small>
  629. </div>
  630. <div class="media-right media-middle">
  631. <button type="button" id="copyShortcutHintBtn" class="btn btn-default"><?php echo I18n::_('Copy'); ?></button>
  632. </div>
  633. </h5>
  634. <div id="prettymessage" class="col-md-12 hidden">
  635. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  636. </div>
  637. <div id="plaintext" class="col-md-12 hidden"></div>
  638. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" tabindex="1" class="form-control hidden"></textarea></p>
  639. <p class="col-md-12 checkbox">
  640. <label>
  641. <input id="messagetab" type="checkbox" tabindex="3" checked="checked" />
  642. <?php echo I18n::_('Tabulator key serves as character (Hit <kbd>Ctrl</kbd>+<kbd>m</kbd> or <kbd>Esc</kbd> to toggle)'), PHP_EOL; ?>
  643. </label>
  644. </p>
  645. </article>
  646. </section>
  647. <section class="container">
  648. <div id="discussion" class="hidden">
  649. <h4><?php echo I18n::_('Discussion'); ?></h4>
  650. <div id="commentcontainer"></div>
  651. </div>
  652. </section>
  653. <section class="container">
  654. <div id="noscript" role="alert" class="alert alert-info noscript-hide">
  655. <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  656. <?php echo I18n::_('Loading…'); ?><br />
  657. <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>
  658. </div>
  659. </section>
  660. <footer class="container">
  661. <div class="row">
  662. <h4 class="col-md-5 col-xs-8"><?php echo I18n::_($NAME); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h4>
  663. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  664. <p id="aboutbox" class="col-md-6 col-xs-12">
  665. <?php echo sprintf(
  666. 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.',
  667. I18n::_($NAME),
  668. '%s', '%s'
  669. ),
  670. '<i>', '</i>'), ' ', $INFO, PHP_EOL;
  671. ?>
  672. </p>
  673. </div>
  674. </footer>
  675. </main>
  676. <div id="serverdata" class="hidden" aria-hidden="true">
  677. <div id="templates">
  678. <article id="commenttemplate" class="comment">
  679. <div class="commentmeta">
  680. <span class="nickname">name</span>
  681. <span class="commentdate">0000-00-00</span>
  682. </div>
  683. <div class="commentdata">c</div>
  684. <button class="btn btn-default btn-sm"><?php echo I18n::_('Reply'); ?></button>
  685. </article>
  686. <p id="commenttailtemplate" class="comment">
  687. <button class="btn btn-default btn-sm"><?php echo I18n::_('Add comment'); ?></button>
  688. </p>
  689. <div id="replytemplate" class="reply hidden">
  690. <input type="text" id="nickname" class="form-control" title="<?php echo I18n::_('Optional nickname…'); ?>" placeholder="<?php echo I18n::_('Optional nickname…'); ?>" />
  691. <textarea id="replymessage" class="replymessage form-control" cols="80" rows="7"></textarea><br />
  692. <div id="replystatus" role="alert" class="statusmessage hidden alert">
  693. <span class="glyphicon" aria-hidden="true"></span>
  694. </div>
  695. <button id="replybutton" class="btn btn-default btn-sm"><?php echo I18n::_('Post comment'); ?></button>
  696. </div>
  697. <div id="attachmenttemplate" role="alert" class="attachment hidden alert alert-info">
  698. <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
  699. <a class="alert-link"><?php echo I18n::_('Download attachment'); ?><span></span></a>
  700. </div>
  701. </div>
  702. </div>
  703. <?php
  704. if ($FILEUPLOAD) :
  705. ?>
  706. <div id="dropzone" class="hidden" tabindex="-1" aria-hidden="true"></div>
  707. <?php
  708. endif;
  709. ?>
  710. </body>
  711. </html>