1
0

bootstrap-compact.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <?php
  2. use PrivateBin\I18n;
  3. ?><!DOCTYPE html>
  4. <html lang="en">
  5. <head>
  6. <meta charset="utf-8" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <meta name="robots" content="noindex" />
  10. <meta name="referrer" content="no-referrer">
  11. <title><?php echo I18n::_('PrivateBin'); ?></title>
  12. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
  13. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
  14. <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?<?php echo rawurlencode($VERSION); ?>" />
  15. <?php
  16. if ($SYNTAXHIGHLIGHTING):
  17. ?>
  18. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" />
  19. <?php
  20. if (strlen($SYNTAXHIGHLIGHTINGTHEME)):
  21. ?>
  22. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" />
  23. <?php
  24. endif;
  25. endif;
  26. ?>
  27. <script type="text/javascript" src="js/jquery-3.1.1.js" integrity="sha512-U6K1YLIFUWcvuw5ucmMtT9HH4t0uz3M366qrF5y4vnyH6dgDzndlcGvH/Lz5k8NFh80SN95aJ5rqGZEdaQZ7ZQ==" crossorigin="anonymous"></script>
  28. <script type="text/javascript" src="js/sjcl-1.0.4.js" integrity="sha512-BqVQ8GgWfMCcdsDuP6Ggm1BV7+mmoWH3PC4UqcYpEKSdEq1rthy6NUsa6gu5sydewbi/ilI3E3ohdCxlPPF9ww==" crossorigin="anonymous"></script>
  29. <?php
  30. if ($ZEROBINCOMPATIBILITY):
  31. ?>
  32. <script type="text/javascript" src="js/base64-1.7.js" integrity="sha512-JdwsSP3GyHR+jaCkns9CL9NTt4JUJqm/BsODGmYhBcj5EAPKcHYh+OiMfyHbcDLECe17TL0hjXADFkusAqiYgA==" crossorigin="anonymous"></script>
  33. <?php
  34. else:
  35. ?>
  36. <script type="text/javascript" src="js/base64-2.1.9.js" integrity="sha512-rbqAby7hObftbEoGQzkhUbEh5YkUn2MtekTLs4btvo2oly4CZ3DxhJzEh0u/rNzS54tcJdqi5Ug1ruugEd2U1g==" crossorigin="anonymous"></script>
  37. <?php
  38. endif;
  39. ?>
  40. <script type="text/javascript" src="js/rawdeflate-0.5.js" integrity="sha512-tTdZ7qMr7tt5VQy4iCHu6/aGB12eRwbUy+AEI5rXntfsjcRfBeeqJloMsBU9FrGk1bIYLiuND/FhU42LO1bi0g==" crossorigin="anonymous"></script>
  41. <script type="text/javascript" src="js/rawinflate-0.3.js" integrity="sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==" crossorigin="anonymous"></script>
  42. <script type="text/javascript" src="js/bootstrap-3.3.5.js" integrity="sha512-/W33QnLmSAP1fwINS9iXgB6s/VOIG9GVdIuIYaUtbSvKPMv5S08PtT3PqnT2WjwBgB8DFeDN2nqJroqQYF7SwQ==" crossorigin="anonymous"></script>
  43. <?php
  44. if ($SYNTAXHIGHLIGHTING):
  45. ?>
  46. <script type="text/javascript" src="js/prettify.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-m8iHxoN+Fe12xxFwWNdY/TS4KoFntHp29qY0xUzBnPd0bkKMOR/dFhEdTWydpt0b/fIXyhB+znGYUvgjfJ2RzQ==" crossorigin="anonymous"></script>
  47. <?php
  48. endif;
  49. if ($MARKDOWN):
  50. ?>
  51. <script type="text/javascript" src="js/showdown-1.4.1.js" integrity="sha512-Kbz1FIlDnqUJu/3yW8H8USzURA3JuUqSKRwz13lM4kWt6C0n6s4tjl81PCfnWtE4gBIzyj5uGePcfUyotk/icw==" crossorigin="anonymous"></script>
  52. <?php
  53. endif;
  54. ?>
  55. <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-q/2ZUVaS+RVZEaIzIufFOAbhkq2/hYXix2f/Dt3+MxWouGt7vxB3rIU3jkn3f7VHNBnK/wL3KjKL+xZuaaKPVQ==" crossorigin="anonymous"></script>
  56. <!--[if lt IE 10]>
  57. <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
  58. <![endif]-->
  59. <link rel="apple-touch-icon" href="apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
  60. <link rel="icon" type="image/png" href="favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
  61. <link rel="icon" type="image/png" href="favicon-16x16.png?<?php echo rawurlencode($VERSION); ?>" sizes="16x16" />
  62. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  63. <link rel="mask-icon" href="safari-pinned-tab.svg?<?php echo rawurlencode($VERSION); ?>" color="#ffcc00" />
  64. <link rel="shortcut icon" href="favicon.ico">
  65. <meta name="msapplication-config" content="browserconfig.xml">
  66. <meta name="theme-color" content="#ffe57e" />
  67. </head>
  68. <body role="document" class="navbar-spacing">
  69. <div id="passwordmodal" class="modal fade" role="dialog">
  70. <div class="modal-dialog">
  71. <div class="modal-content">
  72. <div class="modal-body">
  73. <form id="passwordform" role="form">
  74. <div class="form-group">
  75. <label for="passworddecrypt"><span class="glyphicon glyphicon-eye-open"></span> <?php echo I18n::_('Please enter the password for this paste:') ?></label>
  76. <input id="passworddecrypt" type="password" class="form-control" placeholder="<?php echo I18n::_('Enter password') ?>" autofocus>
  77. </div>
  78. <button type="submit" class="btn btn-success btn-block"><span class="glyphicon glyphicon-off"></span> <?php echo I18n::_('Decrypt') ?></button>
  79. </form>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <nav class="navbar navbar-default navbar-fixed-top">
  85. <div class="container">
  86. <div class="navbar-header">
  87. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  88. <span class="sr-only"><?php echo I18n::_('Toggle navigation'); ?></span>
  89. <span class="icon-bar"></span>
  90. <span class="icon-bar"></span>
  91. <span class="icon-bar"></span>
  92. </button>
  93. <a class="reloadlink navbar-brand" href="">
  94. <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/icon.svg" width="38" />
  95. </a>
  96. </div>
  97. <div id="navbar" class="navbar-collapse collapse">
  98. <ul class="nav navbar-nav">
  99. <li>
  100. <button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn">
  101. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Send'), PHP_EOL; ?>
  102. </button>
  103. <?php
  104. if ($EXPIRECLONE):
  105. ?>
  106. <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
  107. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Clone'), PHP_EOL; ?>
  108. </button>
  109. <?php
  110. endif;
  111. ?>
  112. <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
  113. <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> <?php echo I18n::_('Raw text'), PHP_EOL; ?>
  114. </button>
  115. </li>
  116. <li class="dropdown">
  117. <select id="pasteExpiration" name="pasteExpiration" class="hidden">
  118. <?php
  119. foreach ($EXPIRE as $key => $value):
  120. ?>
  121. <option value="<?php echo $key; ?>"<?php
  122. if ($key == $EXPIREDEFAULT):
  123. ?> selected="selected"<?php
  124. endif;
  125. ?>><?php echo $value; ?></option>
  126. <?php
  127. endforeach;
  128. ?>
  129. </select>
  130. <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>
  131. <ul class="dropdown-menu">
  132. <?php
  133. foreach ($EXPIRE as $key => $value):
  134. ?>
  135. <li>
  136. <a href="#" data-expiration="<?php echo $key; ?>">
  137. <?php echo $value, PHP_EOL; ?>
  138. </a>
  139. </li>
  140. <?php
  141. endforeach;
  142. ?>
  143. </ul>
  144. </li>
  145. <li id="formatter" class="dropdown">
  146. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php echo I18n::_('Options'); ?> <span class="caret"></span></a>
  147. <ul class="dropdown-menu">
  148. <li id="burnafterreadingoption" class="checkbox hidden">
  149. <label>
  150. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  151. if ($BURNAFTERREADINGSELECTED):
  152. ?> checked="checked"<?php
  153. endif;
  154. ?> />
  155. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  156. </label>
  157. </li>
  158. <?php
  159. if ($DISCUSSION):
  160. ?>
  161. <li id="opendisc" class="checkbox hidden">
  162. <label>
  163. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  164. if ($OPENDISCUSSION):
  165. ?> checked="checked"<?php
  166. endif;
  167. ?> />
  168. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  169. </label>
  170. </li>
  171. <?php
  172. endif;
  173. ?>
  174. <li role="separator" class="divider"></li>
  175. <li>
  176. <div>
  177. <?php echo I18n::_('Format'); ?>: <span id="pasteFormatterDisplay"><?php echo $FORMATTER[$FORMATTERDEFAULT]; ?></span> <span class="caret"></span>
  178. </div>
  179. </li>
  180. <?php
  181. foreach ($FORMATTER as $key => $value):
  182. ?>
  183. <li>
  184. <a href="#" data-format="<?php echo $key; ?>">
  185. <?php echo $value, PHP_EOL; ?>
  186. </a>
  187. </li>
  188. <?php
  189. endforeach;
  190. ?>
  191. </ul>
  192. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  193. <?php
  194. foreach ($FORMATTER as $key => $value):
  195. ?>
  196. <option value="<?php echo $key; ?>"<?php
  197. if ($key == $FORMATTERDEFAULT):
  198. ?> selected="selected"<?php
  199. endif;
  200. ?>><?php echo $value; ?></option>
  201. <?php
  202. endforeach;
  203. ?>
  204. </select>
  205. </li>
  206. <?php
  207. if ($PASSWORD):
  208. ?>
  209. <li>
  210. <div id="password" class="navbar-form hidden">
  211. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="19"/>
  212. </div>
  213. </li>
  214. <?php
  215. endif;
  216. if ($FILEUPLOAD):
  217. ?>
  218. <li id="attach" class="hidden dropdown">
  219. <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>
  220. <ul class="dropdown-menu">
  221. <li id="filewrap">
  222. <div>
  223. <input type="file" id="file" name="file" />
  224. </div>
  225. </li>
  226. <li>
  227. <a id="fileremovebutton" href="#">
  228. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  229. </a>
  230. </li>
  231. </ul>
  232. </li>
  233. <?php
  234. endif;
  235. ?>
  236. </ul>
  237. <ul class="nav navbar-nav pull-right">
  238. <?php
  239. if (strlen($LANGUAGESELECTION)):
  240. ?>
  241. <li id="language" class="dropdown">
  242. <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>
  243. <ul class="dropdown-menu">
  244. <?php
  245. foreach ($LANGUAGES as $key => $value):
  246. ?>
  247. <li>
  248. <a href="#" data-lang="<?php echo $key; ?>">
  249. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  250. </a>
  251. </li>
  252. <?php
  253. endforeach;
  254. ?>
  255. </ul>
  256. </li>
  257. <?php
  258. endif;
  259. ?>
  260. <li>
  261. <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
  262. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL; ?>
  263. </button>
  264. </li>
  265. </ul>
  266. </div>
  267. </div>
  268. </nav>
  269. <header class="container">
  270. <?php
  271. if (strlen($NOTICE)):
  272. ?>
  273. <div role="alert" class="alert alert-info">
  274. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <?php echo htmlspecialchars($NOTICE), PHP_EOL; ?>
  275. </div>
  276. <?php
  277. endif;
  278. ?>
  279. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  280. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  281. </div>
  282. <?php
  283. if ($FILEUPLOAD):
  284. ?>
  285. <div id="attachment" role="alert" class="hidden alert alert-info">
  286. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <a><?php echo I18n::_('Download attachment'); ?></a> <span id="clonedfile" class="hidden"><?php echo I18n::_('Cloned file attached.'); ?></span>
  287. </div>
  288. <?php
  289. endif;
  290. if (strlen($STATUS)):
  291. ?>
  292. <div id="status" role="alert" class="alert alert-success">
  293. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> <?php echo htmlspecialchars($STATUS), PHP_EOL; ?>
  294. </div>
  295. <?php
  296. endif;
  297. ?>
  298. <div id="errormessage" role="alert" class="<?php
  299. if (!strlen($ERROR)):
  300. ?>hidden <?php
  301. endif;
  302. ?>alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> <?php echo htmlspecialchars($ERROR); ?></div>
  303. <noscript><div id="noscript" role="alert" class="nonworking alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?php echo I18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.'); ?></div></noscript>
  304. <div id="oldienotice" role="alert" class="hidden nonworking alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> <?php echo I18n::_('PrivateBin requires a modern browser to work.'); ?></div>
  305. <div id="ienotice" role="alert" class="hidden alert alert-warning"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> <?php echo I18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:'), PHP_EOL; ?>
  306. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  307. <a href="https://www.opera.com/">Opera</a>,
  308. <a href="https://www.google.com/chrome">Chrome</a>,
  309. <a href="https://www.apple.com/safari">Safari</a>...
  310. </div>
  311. <div id="pasteresult" role="alert" class="hidden alert alert-success">
  312. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  313. <div id="deletelink"></div>
  314. <div id="pastelink">
  315. <?php
  316. if (strlen($URLSHORTENER)):
  317. ?>
  318. <button id="shortenbutton" data-shortener="<?php echo htmlspecialchars($URLSHORTENER); ?>" type="button" class="btn btn-primary">
  319. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  320. </button>
  321. <?php
  322. endif;
  323. ?>
  324. </div>
  325. </div>
  326. <ul id="preview" class="nav nav-tabs hidden">
  327. <li role="presentation" class="active"><a id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  328. <li role="presentation"><a id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  329. </ul>
  330. </header>
  331. <section class="container">
  332. <article class="row">
  333. <div id="image" class="col-md-12 text-center hidden"></div>
  334. <div id="prettymessage" class="col-md-12 hidden">
  335. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  336. </div>
  337. <div id="cleartext" class="col-md-12 hidden"></div>
  338. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" class="form-control hidden"></textarea></p>
  339. </article>
  340. </section>
  341. <section class="container">
  342. <div id="discussion" class="hidden">
  343. <h4><?php echo I18n::_('Discussion'); ?></h4>
  344. <div id="comments"></div>
  345. </div>
  346. </section>
  347. <section class="container">
  348. <div id="noscript" role="alert" class="nonworking alert alert-info noscript-hide"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true">
  349. <span> <?php echo I18n::_('Loading…'); ?></span><br>
  350. <span class="small"><?php echo I18n::_('In case this message never disappears please have a look at <a href="https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-not-the-loading-message-go-away">this FAQ for information to troubleshoot</a>.'); ?></span>
  351. </div>
  352. </section>
  353. <footer class="container">
  354. <div class="row">
  355. <h4 class="col-md-5 col-xs-8"><?php echo I18n::_('PrivateBin'); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h4>
  356. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  357. <p id="aboutbox" class="col-md-6 col-xs-12">
  358. <?php echo I18n::_('PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted <i>in the browser</i> using 256 bits AES. More information on the <a href="https://privatebin.info/">project page</a>.'), PHP_EOL; ?>
  359. </p>
  360. </div>
  361. </footer>
  362. <div id="cipherdata" class="hidden"><?php echo htmlspecialchars($CIPHERDATA, ENT_NOQUOTES); ?></div>
  363. </body>
  364. </html>