bootstrap-page.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <meta name="robots" content="noindex" />
  8. <title><?php echo i18n::_('PrivateBin'); ?></title>
  9. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-3.3.5.css" />
  10. <link type="text/css" rel="stylesheet" href="css/bootstrap/bootstrap-theme-3.3.5.css" />
  11. <link type="text/css" rel="stylesheet" href="css/bootstrap/privatebin.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  12. if ($SYNTAXHIGHLIGHTING): ?>
  13. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  14. if (strlen($SYNTAXHIGHLIGHTINGTHEME)): ?>
  15. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  16. endif;
  17. endif; ?>
  18. <script type="text/javascript" src="js/jquery-1.11.3.js"></script>
  19. <script type="text/javascript" src="js/sjcl-1.0.4.js"></script>
  20. <script type="text/javascript" src="js/base64-<?php echo rawurlencode($BASE64JSVERSION); ?>.js"></script>
  21. <script type="text/javascript" src="js/rawdeflate-0.5.js"></script>
  22. <script type="text/javascript" src="js/rawinflate-0.3.js"></script>
  23. <script type="text/javascript" src="js/bootstrap-3.3.5.js"></script><?php
  24. if ($SYNTAXHIGHLIGHTING): ?>
  25. <script type="text/javascript" src="js/prettify.js?<?php echo rawurlencode($VERSION); ?>"></script><?php
  26. endif;
  27. if ($MARKDOWN): ?>
  28. <script type="text/javascript" src="js/showdown-1.4.1.js"></script><?php
  29. endif; ?>
  30. <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>"></script>
  31. <!--[if lt IE 10]>
  32. <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
  33. <![endif]-->
  34. <link rel="apple-touch-icon" href="apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
  35. <link rel="icon" type="image/png" href="favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
  36. <link rel="icon" type="image/png" href="favicon-16x16.png?<?php echo rawurlencode($VERSION); ?>" sizes="16x16" />
  37. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  38. <link rel="mask-icon" href="safari-pinned-tab.svg?<?php echo rawurlencode($VERSION); ?>" color="#ffcc00" />
  39. <link rel="shortcut icon" href="favicon.ico">
  40. <meta name="msapplication-config" content="browserconfig.xml">
  41. <meta name="theme-color" content="#ffe57e" />
  42. </head>
  43. <body role="document">
  44. <nav class="navbar navbar-default navbar-static-top">
  45. <div class="navbar-header">
  46. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  47. <span class="sr-only"><?php echo i18n::_('Toggle navigation'); ?></span>
  48. <span class="icon-bar"></span>
  49. <span class="icon-bar"></span>
  50. <span class="icon-bar"></span>
  51. </button>
  52. <a class="reloadlink navbar-brand" href="/">
  53. <img alt="<?php echo i18n::_('PrivateBin'); ?>" src="img/icon.svg" width="20" />
  54. </a>
  55. </div>
  56. <div id="navbar" class="navbar-collapse collapse">
  57. <ul class="nav navbar-nav">
  58. <li>
  59. <button id="sendbutton" type="button" class="hidden btn btn-primary navbar-btn">
  60. <span class="glyphicon glyphicon-upload" aria-hidden="true"></span> <?php echo i18n::_('Send'); ?>
  61. </button><?php
  62. if ($EXPIRECLONE): ?>
  63. <button id="clonebutton" type="button" class="hidden btn btn-default navbar-btn">
  64. <span class="glyphicon glyphicon-duplicate" aria-hidden="true"></span> <?php echo i18n::_('Clone'); ?>
  65. </button><?php
  66. endif; ?>
  67. <button id="rawtextbutton" type="button" class="hidden btn btn-default navbar-btn">
  68. <span class="glyphicon glyphicon-text-background" aria-hidden="true"></span> <?php echo i18n::_('Raw text'); ?>
  69. </button>
  70. </li>
  71. <li class="dropdown">
  72. <select id="pasteExpiration" name="pasteExpiration" class="hidden"><?php
  73. foreach ($EXPIRE as $key => $value): ?>
  74. <option value="<?php echo $key; ?>"<?php
  75. if ($key == $EXPIREDEFAULT): ?> selected="selected"<?php
  76. endif; ?>><?php echo $value; ?></option><?php
  77. endforeach; ?>
  78. </select>
  79. <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>
  80. <ul class="dropdown-menu"><?php
  81. foreach ($EXPIRE as $key => $value): ?>
  82. <li>
  83. <a href="#" onclick="$('#pasteExpiration').val('<?php echo $key; ?>');$('#pasteExpirationDisplay').text('<?php echo $value; ?>');return false;">
  84. <?php echo $value; ?>
  85. </a>
  86. </li><?php
  87. endforeach; ?>
  88. </ul>
  89. </li>
  90. <li>
  91. <div id="burnafterreadingoption" class="navbar-text checkbox hidden">
  92. <label>
  93. <input type="checkbox" id="burnafterreading" name="burnafterreading" <?php
  94. if ($BURNAFTERREADINGSELECTED): ?> checked="checked"<?php
  95. endif; ?> />
  96. <?php echo i18n::_('Burn after reading'); ?>
  97. </label>
  98. </div>
  99. </li><?php
  100. if ($DISCUSSION): ?>
  101. <li>
  102. <div id="opendisc" class="navbar-text checkbox hidden">
  103. <label>
  104. <input type="checkbox" id="opendiscussion" name="opendiscussion" <?php
  105. if ($OPENDISCUSSION): ?> checked="checked"<?php
  106. endif; ?> />
  107. <?php echo i18n::_('Open discussion'); ?>
  108. </label>
  109. </div>
  110. </li><?php
  111. endif;
  112. if ($PASSWORD): ?>
  113. <li>
  114. <div id="password" class="navbar-form hidden">
  115. <input type="password" id="passwordinput" placeholder="<?php echo i18n::_('Password (recommended)'); ?>" class="form-control" size="19" />
  116. </div>
  117. </li><?php
  118. endif;
  119. if ($FILEUPLOAD): ?>
  120. <li id="attach" class="hidden dropdown">
  121. <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>
  122. <ul class="dropdown-menu">
  123. <li id="filewrap">
  124. <div>
  125. <input type="file" id="file" name="file" />
  126. </div>
  127. </li>
  128. <li>
  129. <a id="fileremovebutton" href="#">
  130. <?php echo i18n::_('Remove attachment'); ?>
  131. </a>
  132. </li>
  133. </ul>
  134. </li><?php
  135. endif; ?>
  136. <li class="dropdown">
  137. <select id="pasteFormatter" name="pasteFormatter" class="hidden"><?php
  138. foreach ($FORMATTER as $key => $value): ?>
  139. <option value="<?php echo $key; ?>"<?php
  140. if ($key == $FORMATTERDEFAULT): ?> selected="selected"<?php
  141. endif; ?>><?php echo $value; ?></option><?php
  142. endforeach; ?>
  143. </select>
  144. <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>
  145. <ul class="dropdown-menu"><?php
  146. foreach ($FORMATTER as $key => $value): ?>
  147. <li>
  148. <a href="#" onclick="$('#pasteFormatter').val('<?php echo $key; ?>');$('#pasteFormatterDisplay').text('<?php echo $value; ?>');return false;">
  149. <?php echo $value; ?>
  150. </a>
  151. </li><?php
  152. endforeach; ?>
  153. </ul>
  154. </li>
  155. </ul>
  156. <ul class="nav navbar-nav pull-right"><?php
  157. if (strlen($LANGUAGESELECTION)): ?>
  158. <li id="language" class="dropdown">
  159. <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>
  160. <ul class="dropdown-menu"><?php
  161. foreach ($LANGUAGES as $key => $value): ?>
  162. <li>
  163. <a href="#" class="reloadlink" onclick="document.cookie='lang=<?php echo $key; ?>';">
  164. <?php echo $value[0]; ?> (<?php echo $value[1]; ?>)
  165. </a>
  166. </li><?php
  167. endforeach; ?>
  168. </ul>
  169. </li><?php
  170. endif; ?>
  171. <li>
  172. <button id="newbutton" type="button" class="reloadlink hidden btn btn-default navbar-btn">
  173. <span class="glyphicon glyphicon-file" aria-hidden="true"></span> <?php echo i18n::_('New'); ?>
  174. </button>
  175. </li>
  176. </ul>
  177. </div>
  178. </nav>
  179. <header class="container"><?php
  180. if (strlen($NOTICE)): ?>
  181. <div role="alert" class="alert alert-info">
  182. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <?php echo htmlspecialchars($NOTICE); ?>
  183. </div><?php
  184. endif; ?>
  185. <div id="remainingtime" role="alert" class="hidden alert alert-info">
  186. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  187. </div><?php
  188. if ($FILEUPLOAD): ?>
  189. <div id="attachment" role="alert" class="hidden alert alert-info">
  190. <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>
  191. </div><?php
  192. endif;
  193. if (strlen($STATUS)): ?>
  194. <div id="status" role="alert" class="alert alert-success">
  195. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> <?php echo htmlspecialchars($STATUS); ?>
  196. </div><?php
  197. endif; ?>
  198. <div id="errormessage" role="alert" class="<?php
  199. if (!strlen($ERROR)): ?>hidden <?php
  200. endif; ?>alert alert-danger"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> <?php echo htmlspecialchars($ERROR); ?></div>
  201. <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>
  202. <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>
  203. <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:'); ?>
  204. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  205. <a href="https://www.opera.com/">Opera</a>,
  206. <a href="https://www.google.com/chrome">Chrome</a>,
  207. <a href="https://www.apple.com/safari">Safari</a>...
  208. </div>
  209. <div id="pasteresult" role="alert" class="hidden alert alert-success">
  210. <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
  211. <div id="deletelink"></div>
  212. <div id="pastelink"><?php
  213. if (strlen($URLSHORTENER)): ?>
  214. <button id="shortenbutton" data-shortener="<?php echo htmlspecialchars($URLSHORTENER); ?>" type="button" class="btn btn-primary">
  215. <span class="glyphicon glyphicon-send" aria-hidden="true"></span> <?php echo i18n::_('Shorten URL'); ?>
  216. </button><?php
  217. endif; ?>
  218. </div>
  219. </div>
  220. <ul id="preview" class="nav nav-tabs hidden">
  221. <li role="presentation" class="active"><a id="messageedit" href="#"><?php echo i18n::_('Editor'); ?></a></li>
  222. <li role="presentation"><a id="messagepreview" href="#"><?php echo i18n::_('Preview'); ?></a></li>
  223. </ul>
  224. </header>
  225. <section class="container">
  226. <article class="row">
  227. <div id="image" class="col-md-12 text-center hidden"></div>
  228. <div id="prettymessage" class="col-md-12 hidden">
  229. <pre id="prettyprint" class="col-md-12 prettyprint linenums:1"></pre>
  230. </div>
  231. <div id="cleartext" class="col-md-12 hidden"></div>
  232. <p class="col-md-12"><textarea id="message" name="message" cols="80" rows="25" class="form-control hidden"></textarea></p>
  233. </article>
  234. </section>
  235. <section class="container">
  236. <div id="discussion" class="hidden">
  237. <h4><?php echo i18n::_('Discussion'); ?></h4>
  238. <div id="comments"></div>
  239. </div>
  240. </section>
  241. <footer class="container">
  242. <div class="row">
  243. <h4 class="col-md-5 col-xs-8"><?php echo i18n::_('PrivateBin'); ?> <small>- <?php echo i18n::_('Because ignorance is bliss'); ?></small></h4>
  244. <p class="col-md-1 col-xs-4 text-center"><?php echo $VERSION; ?></p>
  245. <p id="aboutbox" class="col-md-6 col-xs-12">
  246. <?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>.'); ?>
  247. </p>
  248. </div>
  249. </footer>
  250. <div id="cipherdata" class="hidden"><?php echo htmlspecialchars($CIPHERDATA, ENT_NOQUOTES); ?></div>
  251. </body>
  252. </html>