1
0

bootstrap-compact.php 14 KB

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