bootstrap-compact.php 13 KB

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