page.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="robots" content="noindex" />
  6. <title><?php echo PrivateBin\i18n::_('PrivateBin'); ?></title>
  7. <link type="text/css" rel="stylesheet" href="css/privatebin.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  8. if ($SYNTAXHIGHLIGHTING): ?>
  9. <link type="text/css" rel="stylesheet" href="css/prettify/prettify.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  10. if (strlen($SYNTAXHIGHLIGHTINGTHEME)): ?>
  11. <link type="text/css" rel="stylesheet" href="css/prettify/<?php echo rawurlencode($SYNTAXHIGHLIGHTINGTHEME); ?>.css?<?php echo rawurlencode($VERSION); ?>" /><?php
  12. endif;
  13. endif; ?>
  14. <script type="text/javascript" src="js/jquery-1.11.3.js"></script>
  15. <script type="text/javascript" src="js/sjcl-1.0.4.js"></script>
  16. <script type="text/javascript" src="js/base64-<?php echo rawurlencode($BASE64JSVERSION); ?>.js"></script>
  17. <script type="text/javascript" src="js/rawdeflate-0.5.js"></script>
  18. <script type="text/javascript" src="js/rawinflate-0.3.js"></script><?php
  19. if ($SYNTAXHIGHLIGHTING): ?>
  20. <script type="text/javascript" src="js/prettify.js?<?php echo rawurlencode($VERSION); ?>"></script><?php
  21. endif;
  22. if ($MARKDOWN): ?>
  23. <script type="text/javascript" src="js/showdown-1.4.1.js"></script><?php
  24. endif; ?>
  25. <script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>"></script>
  26. <!--[if lt IE 10]>
  27. <style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
  28. <![endif]-->
  29. <link rel="apple-touch-icon" href="apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
  30. <link rel="icon" type="image/png" href="favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
  31. <link rel="icon" type="image/png" href="favicon-16x16.png?<?php echo rawurlencode($VERSION); ?>" sizes="16x16" />
  32. <link rel="manifest" href="manifest.json?<?php echo rawurlencode($VERSION); ?>" />
  33. <link rel="mask-icon" href="safari-pinned-tab.svg?<?php echo rawurlencode($VERSION); ?>" color="#ffcc00" />
  34. <link rel="shortcut icon" href="favicon.ico">
  35. <meta name="msapplication-config" content="browserconfig.xml">
  36. <meta name="theme-color" content="#ffe57e" />
  37. </head>
  38. <body>
  39. <header>
  40. <div id="aboutbox">
  41. <?php echo PrivateBin\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 /><?php
  42. if (strlen($NOTICE)): ?>
  43. <span class="blink">▶</span> <?php echo htmlspecialchars($NOTICE);
  44. endif; ?>
  45. </div>
  46. <h1 class="title reloadlink"><?php echo PrivateBin\i18n::_('PrivateBin'); ?></h1><br />
  47. <h2 class="title"><?php echo PrivateBin\i18n::_('Because ignorance is bliss'); ?></h2><br />
  48. <h3 class="title"><?php echo $VERSION; ?></h3>
  49. <noscript><div id="noscript" class="nonworking"><?php echo PrivateBin\i18n::_('Javascript is required for PrivateBin to work.<br />Sorry for the inconvenience.'); ?></div></noscript>
  50. <div id="oldienotice" class="nonworking"><?php echo PrivateBin\i18n::_('PrivateBin requires a modern browser to work.'); ?></div>
  51. <div id="ienotice"><?php echo PrivateBin\i18n::_('Still using Internet Explorer? Do yourself a favor, switch to a modern browser:'); ?>
  52. <a href="https://www.mozilla.org/firefox/">Firefox</a>,
  53. <a href="https://www.opera.com/">Opera</a>,
  54. <a href="https://www.google.com/chrome">Chrome</a>,
  55. <a href="https://www.apple.com/safari">Safari</a>...
  56. </div>
  57. </header>
  58. <section>
  59. <article>
  60. <div id="status"><?php echo htmlspecialchars($STATUS); ?></div>
  61. <div id="errormessage" class="hidden"><?php echo htmlspecialchars($ERROR); ?></div>
  62. <div id="toolbar">
  63. <button id="newbutton" class="reloadlink hidden"><img src="img/icon_new.png" width="11" height="15" alt="" /><?php echo PrivateBin\i18n::_('New'); ?></button>
  64. <button id="sendbutton" class="hidden"><img src="img/icon_send.png" width="18" height="15" alt="" /><?php echo PrivateBin\i18n::_('Send'); ?></button><?php
  65. if ($EXPIRECLONE): ?>
  66. <button id="clonebutton" class="hidden"><img src="img/icon_clone.png" width="15" height="17" alt="" /><?php echo PrivateBin\i18n::_('Clone'); ?></button><?php
  67. endif; ?>
  68. <button id="rawtextbutton" class="hidden"><img src="img/icon_raw.png" width="15" height="15" alt="" /><?php echo PrivateBin\i18n::_('Raw text'); ?></button>
  69. <div id="expiration" class="hidden button"><?php echo PrivateBin\i18n::_('Expires'); ?>:
  70. <select id="pasteExpiration" name="pasteExpiration"><?php
  71. foreach ($EXPIRE as $key => $value): ?>
  72. <option value="<?php echo $key; ?>"<?php
  73. if ($key == $EXPIREDEFAULT): ?> selected="selected"<?php
  74. endif; ?>><?php echo $value; ?></option><?php
  75. endforeach; ?>
  76. </select>
  77. </div>
  78. <div id="remainingtime" class="hidden"></div>
  79. <div id="burnafterreadingoption" class="button hidden">
  80. <input type="checkbox" id="burnafterreading" name="burnafterreading" <?php
  81. if ($BURNAFTERREADINGSELECTED): ?> checked="checked"<?php
  82. endif; ?> />
  83. <label for="burnafterreading"><?php echo PrivateBin\i18n::_('Burn after reading'); ?></label>
  84. </div><?php
  85. if ($DISCUSSION): ?>
  86. <div id="opendisc" class="button hidden">
  87. <input type="checkbox" id="opendiscussion" name="opendiscussion" <?php
  88. if ($OPENDISCUSSION): ?> checked="checked"<?php
  89. endif; ?> />
  90. <label for="opendiscussion" <?php
  91. if (!$OPENDISCUSSION): ?> style="color: #BBBBBB;"<?php
  92. endif; ?>><?php echo PrivateBin\i18n::_('Open discussion'); ?></label>
  93. </div><?php
  94. endif;
  95. if ($PASSWORD): ?>
  96. <div id="password" class="hidden">
  97. <input type="password" id="passwordinput" placeholder="<?php echo PrivateBin\i18n::_('Password (recommended)'); ?>" size="32" />
  98. </div><?php
  99. endif; ?>
  100. <div id="formatter" class="button hidden"><?php echo PrivateBin\i18n::_('Format'); ?>:
  101. <select id="pasteFormatter" name="pasteFormatter"><?php
  102. foreach ($FORMATTER as $key => $value): ?>
  103. <option value="<?php echo $key; ?>"<?php
  104. if ($key == $FORMATTERDEFAULT): ?> selected="selected"<?php
  105. endif; ?>><?php echo $value; ?></option><?php
  106. endforeach; ?>
  107. </select>
  108. </div><?php
  109. if (strlen($LANGUAGESELECTION)): ?>
  110. <div id="language" class="button">
  111. <select name="lang"><?php
  112. foreach ($LANGUAGES as $key => $value): ?>
  113. <option class="reloadlink" onclick="document.cookie='lang=<?php echo $key; ?>';" value="<?php echo $key; ?>"<?php
  114. if ($key == $LANGUAGESELECTION): ?> selected="selected"<?php
  115. endif; ?>><?php echo $value[0]; ?> (<?php echo $value[1]; ?>)</option><?php
  116. endforeach; ?>
  117. </select>
  118. </div><?php
  119. endif; ?>
  120. </div>
  121. <div id="pasteresult" class="hidden">
  122. <div id="deletelink"></div>
  123. <div id="pastelink"><?php
  124. if (strlen($URLSHORTENER)): ?>
  125. <button id="shortenbutton" data-shortener="<?php echo htmlspecialchars($URLSHORTENER); ?>"><img src="img/icon_shorten.png" width="13" height="15" /><?php echo PrivateBin\i18n::_('Shorten URL'); ?></button><?php
  126. endif; ?>
  127. </div>
  128. </div><?php
  129. if ($FILEUPLOAD): ?>
  130. <div id="attachment" class="hidden"><a><?php echo PrivateBin\i18n::_('Download attachment'); ?></a></div>
  131. <div id="attach" class="hidden">
  132. <span id="clonedfile" class="hidden"><?php echo PrivateBin\i18n::_('Cloned file attached.'); ?></span>
  133. <span id="filewrap"><?php echo PrivateBin\i18n::_('Attach a file'); ?>: <input type="file" id="file" name="file" /></span>
  134. <button id="fileremovebutton"><?php echo PrivateBin\i18n::_('Remove attachment'); ?></button>
  135. </div><?php
  136. endif; ?>
  137. <div id="preview" class="hidden">
  138. <button id="messageedit"><?php echo PrivateBin\i18n::_('Editor'); ?></button>
  139. <button id="messagepreview"><?php echo PrivateBin\i18n::_('Preview'); ?></button>
  140. </div>
  141. <div id="image" class="hidden"></div>
  142. <div id="prettymessage" class="hidden">
  143. <pre id="prettyprint" class="prettyprint linenums:1"></pre>
  144. </div>
  145. <div id="cleartext" class="hidden"></div>
  146. <textarea id="message" name="message" cols="80" rows="25" class="hidden"></textarea>
  147. </article>
  148. </section>
  149. <section>
  150. <div id="discussion" class="hidden">
  151. <h4 class="title"><?php echo PrivateBin\i18n::_('Discussion'); ?></h4>
  152. <div id="comments"></div>
  153. </div>
  154. </section>
  155. <div id="cipherdata" class="hidden"><?php echo htmlspecialchars($CIPHERDATA, ENT_NOQUOTES); ?></div>
  156. </body>
  157. </html>