page.php 8.2 KB

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