1
0

bootstrap-compact.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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-WBbdKQKeIQFarq1hrOxNL/gnp0Tqh25fn0z3X1po+ej8iuHhHdp6Sh9l+tghGw5L1bsvtzjeuSKsL80RW3XdYw==" 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-Jx4qD49amdzpNe9FLtxLO84Xt5LZeQ2PGaM0I9UCS2Kr4xhrnFyvP+0hrLIMgDTwjWFDpTSCoDHuj0SHzuqXuQ==" 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. <nav class="navbar navbar-default navbar-fixed-top">
  70. <div class="container">
  71. <div class="navbar-header">
  72. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  73. <span class="sr-only"><?php echo I18n::_('Toggle navigation'); ?></span>
  74. <span class="icon-bar"></span>
  75. <span class="icon-bar"></span>
  76. <span class="icon-bar"></span>
  77. </button>
  78. <a class="reloadlink navbar-brand" href="">
  79. <img alt="<?php echo I18n::_('PrivateBin'); ?>" src="img/icon.svg" width="38" />
  80. </a>
  81. </div>
  82. <div id="navbar" class="navbar-collapse collapse">
  83. <ul class="nav navbar-nav">
  84. <li>
  85. <button id="sendbutton" type="button" class="hidden btn btn-default navbar-btn">
  86. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo I18n::_('Send'), PHP_EOL; ?>
  87. </button>
  88. <?php
  89. if ($EXPIRECLONE):
  90. ?>
  91. <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
  92. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo I18n::_('Clone'), PHP_EOL; ?>
  93. </button>
  94. <?php
  95. endif;
  96. ?>
  97. <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
  98. <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> <?php echo I18n::_('Raw text'), PHP_EOL; ?>
  99. </button>
  100. </li>
  101. <li class="dropdown">
  102. <select id="pasteExpiration" name="pasteExpiration" class="hidden">
  103. <?php
  104. foreach ($EXPIRE as $key => $value):
  105. ?>
  106. <option value="<?php echo $key; ?>"<?php
  107. if ($key == $EXPIREDEFAULT):
  108. ?> selected="selected"<?php
  109. endif;
  110. ?>><?php echo $value; ?></option>
  111. <?php
  112. endforeach;
  113. ?>
  114. </select>
  115. <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>
  116. <ul class="dropdown-menu">
  117. <?php
  118. foreach ($EXPIRE as $key => $value):
  119. ?>
  120. <li>
  121. <a href="#" data-expiration="<?php echo $key; ?>">
  122. <?php echo $value, PHP_EOL; ?>
  123. </a>
  124. </li>
  125. <?php
  126. endforeach;
  127. ?>
  128. </ul>
  129. </li>
  130. <li id="formatter" class="dropdown">
  131. <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>
  132. <ul class="dropdown-menu">
  133. <li id="burnafterreadingoption" class="checkbox hidden">
  134. <label>
  135. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  136. if ($BURNAFTERREADINGSELECTED):
  137. ?> checked="checked"<?php
  138. endif;
  139. ?> />
  140. <?php echo I18n::_('Burn after reading'), PHP_EOL; ?>
  141. </label>
  142. </li>
  143. <?php
  144. if ($DISCUSSION):
  145. ?>
  146. <li id="opendisc" class="checkbox hidden">
  147. <label>
  148. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  149. if ($OPENDISCUSSION):
  150. ?> checked="checked"<?php
  151. endif;
  152. ?> />
  153. <?php echo I18n::_('Open discussion'), PHP_EOL; ?>
  154. </label>
  155. </li>
  156. <?php
  157. endif;
  158. ?>
  159. <li role="separator" class="divider"></li>
  160. <li>
  161. <div>
  162. <?php echo I18n::_('Format'); ?>: <span id="pasteFormatterDisplay"><?php echo $FORMATTER[$FORMATTERDEFAULT]; ?></span> <span class="caret"></span>
  163. </div>
  164. </li>
  165. <?php
  166. foreach ($FORMATTER as $key => $value):
  167. ?>
  168. <li>
  169. <a href="#" data-format="<?php echo $key; ?>">
  170. <?php echo $value, PHP_EOL; ?>
  171. </a>
  172. </li>
  173. <?php
  174. endforeach;
  175. ?>
  176. </ul>
  177. <select id="pasteFormatter" name="pasteFormatter" class="hidden">
  178. <?php
  179. foreach ($FORMATTER as $key => $value):
  180. ?>
  181. <option value="<?php echo $key; ?>"<?php
  182. if ($key == $FORMATTERDEFAULT):
  183. ?> selected="selected"<?php
  184. endif;
  185. ?>><?php echo $value; ?></option>
  186. <?php
  187. endforeach;
  188. ?>
  189. </select>
  190. </li>
  191. <?php
  192. if ($PASSWORD):
  193. ?>
  194. <li>
  195. <div id="password" class="navbar-form hidden">
  196. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="19"/>
  197. </div>
  198. </li>
  199. <?php
  200. endif;
  201. if ($FILEUPLOAD):
  202. ?>
  203. <li id="attach" class="hidden dropdown">
  204. <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>
  205. <ul class="dropdown-menu">
  206. <li id="filewrap">
  207. <div>
  208. <input type="file" id="file" name="file" />
  209. </div>
  210. </li>
  211. <li>
  212. <a id="fileremovebutton" href="#">
  213. <?php echo I18n::_('Remove attachment'), PHP_EOL; ?>
  214. </a>
  215. </li>
  216. </ul>
  217. </li>
  218. <?php
  219. endif;
  220. ?>
  221. </ul>
  222. <ul class="nav navbar-nav pull-right">
  223. <?php
  224. if (strlen($LANGUAGESELECTION)):
  225. ?>
  226. <li id="language" class="dropdown">
  227. <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>
  228. <ul class="dropdown-menu">
  229. <?php
  230. foreach ($LANGUAGES as $key => $value):
  231. ?>
  232. <li>
  233. <a href="#" data-lang="<?php echo $key; ?>">
  234. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  235. </a>
  236. </li>
  237. <?php
  238. endforeach;
  239. ?>
  240. </ul>
  241. </li>
  242. <?php
  243. endif;
  244. ?>
  245. <li>
  246. <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
  247. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo I18n::_('New'), PHP_EOL; ?>
  248. </button>
  249. </li>
  250. </ul>
  251. </div>
  252. </div>
  253. </nav>
  254. <header class="container">
  255. <?php
  256. if (strlen($NOTICE)):
  257. ?>
  258. <div role="alert" class="alert alert-info">
  259. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <?php echo htmlspecialchars($NOTICE), PHP_EOL; ?>
  260. </div>
  261. <?php
  262. endif;
  263. ?>
  264. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  265. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  266. </div>
  267. <?php
  268. if ($FILEUPLOAD):
  269. ?>
  270. <div id="attachment" role="alert" class="hidden alert alert-info">
  271. <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>
  272. </div>
  273. <?php
  274. endif;
  275. if (strlen($STATUS)):
  276. ?>
  277. <div id="status" role="alert" class="alert alert-success">
  278. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> <?php echo htmlspecialchars($STATUS), PHP_EOL; ?>
  279. </div>
  280. <?php
  281. endif;
  282. ?>
  283. <div id="errormessage" role="alert" class="<?php
  284. if (!strlen($ERROR)):
  285. ?>hidden <?php
  286. endif;
  287. ?>alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> <?php echo htmlspecialchars($ERROR); ?></div>
  288. <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>
  289. <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>
  290. <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; ?>
  291. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  292. <a href="https://www.opera.com/">Opera</a>,
  293. <a href="https://www.google.com/chrome">Chrome</a>,
  294. <a href="https://www.apple.com/safari">Safari</a>...
  295. </div>
  296. <div id="pasteresult" role="alert" class="hidden alert alert-success">
  297. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  298. <div id="deletelink"></div>
  299. <div id="pastelink">
  300. <?php
  301. if (strlen($URLSHORTENER)):
  302. ?>
  303. <button id="shortenbutton" data-shortener="<?php echo htmlspecialchars($URLSHORTENER); ?>" type="button" class="btn btn-primary">
  304. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo I18n::_('Shorten URL'), PHP_EOL; ?>
  305. </button>
  306. <?php
  307. endif;
  308. ?>
  309. </div>
  310. </div>
  311. <ul id="preview" class="nav nav-tabs hidden">
  312. <li role="presentation" class="active"><a id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
  313. <li role="presentation"><a id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
  314. </ul>
  315. </header>
  316. <section class="container">
  317. <article class="row">
  318. <div id="image" class="col-md-12 text-center hidden"></div>
  319. <div id="prettymessage" class="col-md-12 hidden">
  320. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  321. </div>
  322. <div id="cleartext" class="col-md-12 hidden"></div>
  323. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" class="form-control hidden"></textarea></p>
  324. </article>
  325. </section>
  326. <section class="container">
  327. <div id="discussion" class="hidden">
  328. <h4><?php echo I18n::_('Discussion'); ?></h4>
  329. <div id="comments"></div>
  330. </div>
  331. </section>
  332. <footer class="container">
  333. <div class="row">
  334. <h4 class="col-md-5 col-xs-8"><?php echo I18n::_('PrivateBin'); ?> <small>- <?php echo I18n::_('Because ignorance is bliss'); ?></small></h4>
  335. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  336. <p id="aboutbox" class="col-md-6 col-xs-12">
  337. <?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; ?>
  338. </p>
  339. </div>
  340. </footer>
  341. <div id="cipherdata" class="hidden"><?php echo htmlspecialchars($CIPHERDATA, ENT_NOQUOTES); ?></div>
  342. </body>
  343. </html>