page.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <?php
  2. use PrivateBin\I18n;
  3. ?><!DOCTYPE html>
  4. <html lang="en">
  5. <head>
  6. <meta charset="utf-8" />
  7. <meta name="robots" content="noindex" />
  8. <title><?php echo I18n::_('PrivateBin'); ?></title>
  9. <link type="text/css" rel="stylesheet" href="css/privatebin.css?<?php echo rawurlencode($VERSION); ?>" />
  10. <?php
  11. if ($SYNTAXHIGHLIGHTING):
  12. ?>
  13. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" />
  14. <?php
  15. if (strlen($SYNTAXHIGHLIGHTINGTHEME)):
  16. ?>
  17. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" />
  18. <?php
  19. endif;
  20. endif;
  21. ?>
  22. <script type="text/javascript" src="js/jquery-1.11.3.js" integrity="sha512-xAERw8wHVOkM9x9y9/FvQ7g1t+gIQj39mfkN1Rd1OLcC5k/x2e6NO8hq6qEbb3oO+CYYTjVLFiFYg5/7ddF0zA==" crossorigin="anonymous"></script>
  23. <script type="text/javascript" src="js/sjcl-1.0.4.js" integrity="sha512-BqVQ8GgWfMCcdsDuP6Ggm1BV7+mmoWH3PC4UqcYpEKSdEq1rthy6NUsa6gu5sydewbi/ilI3E3ohdCxlPPF9ww==" crossorigin="anonymous"></script>
  24. <?php
  25. if ($ZEROBINCOMPATIBILITY):
  26. ?>
  27. <script type="text/javascript" src="js/base64-1.7.js" integrity="sha512-JdwsSP3GyHR+jaCkns9CL9NTt4JUJqm/BsODGmYhBcj5EAPKcHYh+OiMfyHbcDLECe17TL0hjXADFkusAqiYgA==" crossorigin="anonymous"></script>
  28. <?php
  29. else:
  30. ?>
  31. <script type="text/javascript" src="js/base64-2.1.9.js" integrity="sha512-rbqAby7hObftbEoGQzkhUbEh5YkUn2MtekTLs4btvo2oly4CZ3DxhJzEh0u/rNzS54tcJdqi5Ug1ruugEd2U1g==" crossorigin="anonymous"></script>
  32. <?php
  33. endif;
  34. ?>
  35. <script type="text/javascript" src="js/rawdeflate-0.5.js" integrity="sha512-tTdZ7qMr7tt5VQy4iCHu6/aGB12eRwbUy+AEI5rXntfsjcRfBeeqJloMsBU9FrGk1bIYLiuND/FhU42LO1bi0g==" crossorigin="anonymous"></script>
  36. <script type="text/javascript" src="js/rawinflate-0.3.js" integrity="sha512-g8uelGgJW9A/Z1tB6Izxab++oj5kdD7B4qC7DHwZkB6DGMXKyzx7v5mvap2HXueI2IIn08YlRYM56jwWdm2ucQ==" crossorigin="anonymous"></script>
  37. <?php
  38. if ($SYNTAXHIGHLIGHTING):
  39. ?>
  40. <script type="text/javascript" src="js/prettify.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-m8iHxoN+Fe12xxFwWNdY/TS4KoFntHp29qY0xUzBnPd0bkKMOR/dFhEdTWydpt0b/fIXyhB+znGYUvgjfJ2RzQ==" crossorigin="anonymous"></script>
  41. <?php
  42. endif;
  43. if ($MARKDOWN):
  44. ?>
  45. <script type="text/javascript" src="js/showdown-1.4.1.js" integrity="sha512-Kbz1FIlDnqUJu/3yW8H8USzURA3JuUqSKRwz13lM4kWt6C0n6s4tjl81PCfnWtE4gBIzyj5uGePcfUyotk/icw==" crossorigin="anonymous"></script>
  46. <?php
  47. endif;
  48. ?>
  49. <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-E9z1cIXJHhc940FLA4o//dRxoy5HwSeRZVgLClmREWl+o576zz3gOkMwxrUFVXKUMa2l2qc6huNwMpw+RGmk2Q==" crossorigin="anonymous"></script>
  50. <!--[if lt IE 10]>
  51. <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
  52. <![endif]-->
  53. <link rel="apple-touch-icon" href="apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
  54. <link rel="icon" type="image/png" href="favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
  55. <link rel="icon" type="image/png" href="favicon-16x16.png?<?php echo rawurlencode($VERSION); ?>" sizes="16x16" />
  56. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  57. <link rel="mask-icon" href="safari-pinned-tab.svg?<?php echo rawurlencode($VERSION); ?>" color="#ffcc00" />
  58. <link rel="shortcut icon" href="favicon.ico">
  59. <meta name="msapplication-config" content="browserconfig.xml">
  60. <meta name="theme-color" content="#ffe57e" />
  61. </head>
  62. <body>
  63. <header>
  64. <div id="aboutbox">
  65. <?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>.'); ?><br />
  66. <?php
  67. if (strlen($NOTICE)):
  68. ?>
  69. <span class="blink">▶</span> <?php echo htmlspecialchars($NOTICE);
  70. endif;
  71. ?>
  72. </div>
  73. <h1 class="title reloadlink"><?php echo I18n::_('PrivateBin'); ?></h1><br />
  74. <h2 class="title"><?php echo I18n::_('Because ignorance is bliss'); ?></h2><br />
  75. <h3 class="title"><?php echo $VERSION; ?></h3>
  76. <noscript><div id="noscript" class="nonworking"><?php echo I18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.'); ?></div></noscript>
  77. <div id="oldienotice" class="nonworking"><?php echo I18n::_('PrivateBin requires a modern browser to work.'); ?></div>
  78. <div id="ienotice"><?php echo I18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:'), PHP_EOL; ?>
  79. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  80. <a href="https://www.opera.com/">Opera</a>,
  81. <a href="https://www.google.com/chrome">Chrome</a>,
  82. <a href="https://www.apple.com/safari">Safari</a>...
  83. </div>
  84. </header>
  85. <section>
  86. <article>
  87. <div id="status"><?php echo htmlspecialchars($STATUS); ?></div>
  88. <div id="errormessage" class="hidden"><?php echo htmlspecialchars($ERROR); ?></div>
  89. <div id="toolbar">
  90. <button id="newbutton" class="reloadlink hidden"><img src="img/icon_new.png" width="11" height="15" alt="" /><?php echo I18n::_('New'); ?></button>
  91. <button id="sendbutton" class="hidden"><img src="img/icon_send.png" width="18" height="15" alt="" /><?php echo I18n::_('Send'); ?></button>
  92. <?php
  93. if ($EXPIRECLONE):
  94. ?>
  95. <button id="clonebutton" class="hidden"><img src="img/icon_clone.png" width="15" height="17" alt="" /><?php echo I18n::_('Clone'); ?></button>
  96. <?php
  97. endif;
  98. ?>
  99. <button id="rawtextbutton" class="hidden"><img src="img/icon_raw.png" width="15" height="15" alt="" /><?php echo I18n::_('Raw text'); ?></button>
  100. <div id="expiration" class="hidden button"><?php echo I18n::_('Expires'); ?>:
  101. <select id="pasteExpiration" name="pasteExpiration">
  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. </div>
  115. <div id="remainingtime" class="hidden"></div>
  116. <div id="burnafterreadingoption" class="button hidden">
  117. <input type="checkbox" id="burnafterreading" name="burnafterreading"<?php
  118. if ($BURNAFTERREADINGSELECTED):
  119. ?> checked="checked"<?php
  120. endif;
  121. ?> />
  122. <label for="burnafterreading"><?php echo I18n::_('Burn after reading'); ?></label>
  123. </div>
  124. <?php
  125. if ($DISCUSSION):
  126. ?>
  127. <div id="opendisc" class="button hidden">
  128. <input type="checkbox" id="opendiscussion" name="opendiscussion"<?php
  129. if ($OPENDISCUSSION):
  130. ?> checked="checked"<?php
  131. endif;
  132. ?> />
  133. <label for="opendiscussion" <?php
  134. if (!$OPENDISCUSSION):
  135. ?> style="color: #BBBBBB;"<?php
  136. endif;
  137. ?>><?php echo I18n::_('Open discussion'); ?></label>
  138. </div>
  139. <?php
  140. endif;
  141. if ($PASSWORD):
  142. ?>
  143. <div id="password" class="hidden">
  144. <input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" size="32" />
  145. </div>
  146. <?php
  147. endif;
  148. ?>
  149. <div id="formatter" class="button hidden"><?php echo I18n::_('Format'); ?>:
  150. <select id="pasteFormatter" name="pasteFormatter">
  151. <?php
  152. foreach ($FORMATTER as $key => $value):
  153. ?>
  154. <option value="<?php echo $key; ?>"<?php
  155. if ($key == $FORMATTERDEFAULT):
  156. ?> selected="selected"<?php
  157. endif;
  158. ?>><?php echo $value; ?></option>
  159. <?php
  160. endforeach;
  161. ?>
  162. </select>
  163. </div>
  164. <?php
  165. if (strlen($LANGUAGESELECTION)):
  166. ?>
  167. <div id="language" class="button">
  168. <select name="lang">
  169. <?php
  170. foreach ($LANGUAGES as $key => $value):
  171. ?>
  172. <option data-lang="<?php echo $key; ?>" value="<?php echo $key; ?>"<?php
  173. if ($key == $LANGUAGESELECTION):
  174. ?> selected="selected"<?php
  175. endif;
  176. ?>><?php echo $value[0]; ?> (<?php echo $value[1]; ?>)</option>
  177. <?php
  178. endforeach;
  179. ?>
  180. </select>
  181. </div>
  182. <?php
  183. endif;
  184. ?>
  185. </div>
  186. <div id="pasteresult" class="hidden">
  187. <div id="deletelink"></div>
  188. <div id="pastelink">
  189. <?php
  190. if (strlen($URLSHORTENER)):
  191. ?>
  192. <button id="shortenbutton" data-shortener="<?php echo htmlspecialchars($URLSHORTENER); ?>"><img src="img/icon_shorten.png" width="13" height="15" /><?php echo I18n::_('Shorten URL'); ?></button>
  193. <?php
  194. endif;
  195. ?>
  196. </div>
  197. </div>
  198. <?php
  199. if ($FILEUPLOAD):
  200. ?>
  201. <div id="attachment" class="hidden"><a><?php echo I18n::_('Download attachment'); ?></a></div>
  202. <div id="attach" class="hidden">
  203. <span id="clonedfile" class="hidden"><?php echo I18n::_('Cloned file attached.'); ?></span>
  204. <span id="filewrap"><?php echo I18n::_('Attach a file'); ?>: <input type="file" id="file" name="file" /></span>
  205. <button id="fileremovebutton"><?php echo I18n::_('Remove attachment'); ?></button>
  206. </div>
  207. <?php
  208. endif;
  209. ?>
  210. <div id="preview" class="hidden">
  211. <button id="messageedit"><?php echo I18n::_('Editor'); ?></button>
  212. <button id="messagepreview"><?php echo I18n::_('Preview'); ?></button>
  213. </div>
  214. <div id="image" class="hidden"></div>
  215. <div id="prettymessage" class="hidden">
  216. <pre id="prettyprint" class="prettyprint linenums:1"></pre>
  217. </div>
  218. <div id="cleartext" class="hidden"></div>
  219. <textarea id="message" name="message" cols="80" rows="25" class="hidden"></textarea>
  220. </article>
  221. </section>
  222. <section>
  223. <div id="discussion" class="hidden">
  224. <h4 class="title"><?php echo I18n::_('Discussion'); ?></h4>
  225. <div id="comments"></div>
  226. </div>
  227. </section>
  228. <div id="cipherdata" class="hidden"><?php echo htmlspecialchars($CIPHERDATA, ENT_NOQUOTES); ?></div>
  229. </body>
  230. </html>