summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
Diffstat (limited to 'application/views')
-rw-r--r--application/views/file/client.php19
-rw-r--r--application/views/file/delete_form.php9
-rw-r--r--application/views/file/deleted.php3
-rw-r--r--application/views/file/footer.php3
-rw-r--r--application/views/file/header.php15
-rw-r--r--application/views/file/html_footer.php5
-rw-r--r--application/views/file/html_header.php21
-rw-r--r--application/views/file/non_existent.php3
-rw-r--r--application/views/file/show_url.php6
-rw-r--r--application/views/file/too_big.php3
-rw-r--r--application/views/file/upload_error.php6
-rw-r--r--application/views/file/upload_form.php100
-rw-r--r--application/views/file_plaintext/client.php12
-rw-r--r--application/views/file_plaintext/delete_form.php2
-rw-r--r--application/views/file_plaintext/deleted.php1
-rw-r--r--application/views/file_plaintext/footer.php0
-rw-r--r--application/views/file_plaintext/header.php0
-rw-r--r--application/views/file_plaintext/html_footer.php1
-rw-r--r--application/views/file_plaintext/html_header.php1
-rw-r--r--application/views/file_plaintext/non_existent.php1
-rw-r--r--application/views/file_plaintext/show_url.php2
-rw-r--r--application/views/file_plaintext/too_big.php2
-rw-r--r--application/views/file_plaintext/upload_error.php2
-rw-r--r--application/views/file_plaintext/upload_form.php2
-rwxr-xr-x[-rw-r--r--]application/views/index.html0
-rw-r--r--application/views/welcome_message.php88
26 files changed, 219 insertions, 88 deletions
diff --git a/application/views/file/client.php b/application/views/file/client.php
new file mode 100644
index 000000000..6069c62b1
--- /dev/null
+++ b/application/views/file/client.php
@@ -0,0 +1,19 @@
+<p><b>Shell:</b></p>
+<pre>
+curl -n -F "file=@/home/user/foo" <?php echo site_url(); ?> (binary safe)
+cat file | curl -n -F "file=@-;filename=stdin" <?php echo site_url(); ?> (binary safe)
+</pre>
+<p><b>Client:</b></p>
+<p>Development (git): <a href="http://git.server-speed.net/users/flo/fb/">http://git.server-speed.net/users/flo/fb/</a><br />
+<?php if($client_link) {?>Latest release: <a href="<?php echo $client_link; ?>"><?php echo $client_link; ?></a>.<br /><?php }; ?>
+GPG sigs, older versions: <a href="<?php echo $client_link_dir; ?>"><?php echo $client_link_dir; ?></a>
+</p>
+<p>If you want to use authentication (needed for deleting) add the following to your ~/.netrc:</p>
+<pre>
+machine paste.xinu.at password my_secret_password
+</pre>
+<p><b>Packages:</b><br />
+Arch Linux: pacman -S fb-client<br />
+Debian: <a href="<?php echo $client_link_deb; ?>"><?php echo $client_link_deb; ?></a><br />
+Slackware: <a href="<?php echo $client_link_slackware; ?>"><?php echo $client_link_slackware; ?></a></p>
+
diff --git a/application/views/file/delete_form.php b/application/views/file/delete_form.php
new file mode 100644
index 000000000..b9819a7c5
--- /dev/null
+++ b/application/views/file/delete_form.php
@@ -0,0 +1,9 @@
+<div style="text-align:center">
+ <?php echo form_open('file/delete/'.$id); ?>
+ <p>
+ <?php if(isset($msg)) echo $msg."<br />"; ?>
+ Password:<input type="password" name="password" size="10" />
+ <input type="submit" value="Delete" name="process" />
+ </p>
+ </form>
+</div>
diff --git a/application/views/file/deleted.php b/application/views/file/deleted.php
new file mode 100644
index 000000000..865b5304a
--- /dev/null
+++ b/application/views/file/deleted.php
@@ -0,0 +1,3 @@
+<div style="text-align:center">
+ <p><?php echo $id; ?> has been deleted.</p>
+</div>
diff --git a/application/views/file/footer.php b/application/views/file/footer.php
new file mode 100644
index 000000000..eda863585
--- /dev/null
+++ b/application/views/file/footer.php
@@ -0,0 +1,3 @@
+ </div>
+</body>
+</html>
diff --git a/application/views/file/header.php b/application/views/file/header.php
new file mode 100644
index 000000000..f6073707a
--- /dev/null
+++ b/application/views/file/header.php
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <title><?php echo isset($title) ? $title : ''; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/default.css" media="screen" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+</head>
+
+<body>
+ <div class="top">
+ <?php echo anchor('file/index', 'New'); ?>
+ </div>
+
+ <div class="content">
diff --git a/application/views/file/html_footer.php b/application/views/file/html_footer.php
new file mode 100644
index 000000000..ddc460a39
--- /dev/null
+++ b/application/views/file/html_footer.php
@@ -0,0 +1,5 @@
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php
new file mode 100644
index 000000000..52ffab007
--- /dev/null
+++ b/application/views/file/html_header.php
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title><?php echo $title; ?></title>
+ <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste.css" />
+ <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste-<?php echo $current_highlight; ?>.css" />
+ </head>
+ <body>
+ <div class="top_bar">
+ <a class="raw_link no" href="<?php echo $new_link; ?>">New</a> |
+ <a class="raw_link no" href="<?php echo $raw_link; ?>">Raw</a> |
+ <a class="raw_link no" href="<?php echo $plain_link; ?>">Plain</a> |
+ Currently: <?php echo $current_highlight; ?> |
+ Timeout: <a class="raw_link no" href="<?php echo $delete_link; ?>" title="delete"><?php echo $timeout; ?></a>
+ <div style="float:right;">
+ <a class="raw_link no" href="<?php echo $auto_link; ?>">Code</a> |
+ <a class="raw_link no" href="<?php echo $rmd_link; ?>">Render Markdown</a>
+ </div>
+ </div>
+ <table class="content">
+ <tr>
diff --git a/application/views/file/non_existent.php b/application/views/file/non_existent.php
new file mode 100644
index 000000000..9f4a79913
--- /dev/null
+++ b/application/views/file/non_existent.php
@@ -0,0 +1,3 @@
+<div style="text-align:center">
+ <p>I'm sorry, but the requested file doesn't exist.</p>
+</div>
diff --git a/application/views/file/show_url.php b/application/views/file/show_url.php
new file mode 100644
index 000000000..e0e3dc8a6
--- /dev/null
+++ b/application/views/file/show_url.php
@@ -0,0 +1,6 @@
+<div style="text-align:center">
+ <p>
+ You can get your file here:<br />
+ <a href="<?php echo $url; ?>"><?php echo $url; ?></a><br />
+ </p>
+</div>
diff --git a/application/views/file/too_big.php b/application/views/file/too_big.php
new file mode 100644
index 000000000..aa5c42835
--- /dev/null
+++ b/application/views/file/too_big.php
@@ -0,0 +1,3 @@
+<div style="text-align:center">
+ <p>Sorry, the file you uploaded is too big.</p>
+</div>
diff --git a/application/views/file/upload_error.php b/application/views/file/upload_error.php
new file mode 100644
index 000000000..9df86b8a8
--- /dev/null
+++ b/application/views/file/upload_error.php
@@ -0,0 +1,6 @@
+<div style="text-align:center">
+ <p>
+ An error occurred while uploading.<br />
+ <?php echo $msg; ?>
+ </p>
+</div>
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
new file mode 100644
index 000000000..47238fbbc
--- /dev/null
+++ b/application/views/file/upload_form.php
@@ -0,0 +1,100 @@
+<div style="margin-top: 100px; text-align:center">
+ <?php echo form_open_multipart('file/do_upload'); ?>
+ <p>
+ File: <input type="file" id="file" name="file" size="30" />
+ <input type="submit" value="Upload" id="upload_button" name="process" /><br />
+ Optional password (for deletion): <input type="password" name="password" size="10" />
+ </p>
+ </form>
+ <script type="text/javascript">
+ /* <![CDATA[ */
+ // check file size before uploading if browser support html5
+ if (window.File && window.FileList) {
+ function checkFileUpload(evt) {
+ var f = evt.target.files[0]; // FileList object
+ if (f.size > <?php echo $max_upload_size; ?>) {
+ document.getElementById('upload_button').value = "File too big";
+ document.getElementById('upload_button').disabled = true;
+ } else {
+ document.getElementById('upload_button').value = "Upload";
+ document.getElementById('upload_button').disabled = false;
+ }
+ }
+
+ document.getElementById('file').addEventListener('change', checkFileUpload, false);
+ }
+
+function encode64(inp){
+ var key="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+ var chr1,chr2,chr3,enc3,enc4,i=0,out="";
+ while(i<inp.length){
+ chr1=inp.charCodeAt(i++);if(chr1>127) chr1=88;
+ chr2=inp.charCodeAt(i++);if(chr2>127) chr2=88;
+ chr3=inp.charCodeAt(i++);if(chr3>127) chr3=88;
+ if(isNaN(chr3)) {enc4=64;chr3=0;} else enc4=chr3&63
+ if(isNaN(chr2)) {enc3=64;chr2=0;} else enc3=((chr2<<2)|(chr3>>6))&63
+ out+=key.charAt((chr1>>2)&63)+key.charAt(((chr1<<4)|(chr2>>4))&63)+key.charAt(enc3)+key.charAt(enc4);
+ }
+ return encodeURIComponent(out);
+}
+
+function gen_boundary() {
+ var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
+ var string_length = 40;
+ var randomstring = '';
+ for (var i=0; i<string_length; i++) {
+ var rnum = Math.floor(Math.random() * chars.length);
+ randomstring += chars.substring(rnum,rnum+1);
+ }
+ return randomstring;
+}
+function do_paste() {
+ var http = new XMLHttpRequest();
+ var url = "<?php echo site_url("file/do_upload/dumb"); ?>";
+ var CRLF = "\r\n";
+ var boundary = "--" + gen_boundary();
+ var body = "--" + boundary + CRLF
+ + 'Content-Disposition: form-data; name="file"; filename="stdin"' + CRLF
+ + "Content-Type: text/plain" + CRLF
+ + CRLF
+ + document.getElementById("textarea").value + CRLF
+ + "--" + boundary + "--" + CRLF + CRLF;
+ http.open("POST", url, true);
+
+ //Send the proper header information along with the request
+ http.setRequestHeader("Content-type", "multipart/form-data; boundary=" + boundary);
+ http.setRequestHeader("Authorization", "Basic " + encode64(":" + document.getElementById("textarea_password").value));
+
+ http.onreadystatechange = function() {//Call a function when the state changes.
+ if(http.readyState == 4 && http.status == 200) {
+ window.location = http.responseText;
+ }
+ }
+ http.send(body);
+}
+
+document.write('\
+ <p><b>OR</b></p>\
+ <form action="javascript: do_paste()">\
+ <p>\
+ <textarea id="textarea" name="content" cols="80" rows="20"></textarea><br />\
+ <div style="display: none">Email: <input type="text" name="email" size="20" /></div>\
+ Optional password (for deletion): <input id="textarea_password" type="password" name="password" size="10" /><br />\
+ <input type="submit" value="Paste" name="process" />\
+ </p>\
+ </form>\
+');
+ /* ]]> */
+ </script>
+</div>
+<br />
+<p>Uploads/pastes are deleted after <?php echo $upload_max_age; ?> days<?php if($small_upload_size > 0): ?>
+ unless they are smaller than <?php echo format_bytes($small_upload_size); ?>
+ <?php endif; ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?></p>
+<p>For shell uploading/pasting and download information for the client go to <a href="<?php echo site_url("file/client"); ?>"><?php echo site_url("file/client"); ?></a></p>
+<br />
+<?php if($contact_me_url) {?><p>If you experience any problems feel free to <a href="<?php echo $contact_me_url; ?>">contact me</a>.</p>
+<br /><?php }; ?>
+<div class="small">
+ <p>This service is provided without warranty of any kind and may not be used to distribute copyrighted content.</p>
+</div>
diff --git a/application/views/file_plaintext/client.php b/application/views/file_plaintext/client.php
new file mode 100644
index 000000000..310d82f3f
--- /dev/null
+++ b/application/views/file_plaintext/client.php
@@ -0,0 +1,12 @@
+Shell:
+ curl -n -F "file=@/home/user/foo" <?php echo site_url(); ?> (binary safe)
+ cat file | curl -n -F "file=@-;filename=stdin" <?php echo site_url(); ?> (binary safe)
+
+Client:
+Development (git): http://git.server-speed.net/users/flo/fb
+Latest release: <?php echo $client_link."\n"; ?>
+GPG sigs, older versions: <?php echo $client_link_dir."\n"; ?>
+
+If you want to use authentication (needed for deleting) add the following to your ~/.netrc:
+ machine paste.xinu.at password my_secret_password
+
diff --git a/application/views/file_plaintext/delete_form.php b/application/views/file_plaintext/delete_form.php
new file mode 100644
index 000000000..ba736078c
--- /dev/null
+++ b/application/views/file_plaintext/delete_form.php
@@ -0,0 +1,2 @@
+<?php if(isset($msg)) echo $msg; ?>
+
diff --git a/application/views/file_plaintext/deleted.php b/application/views/file_plaintext/deleted.php
new file mode 100644
index 000000000..e5683b9d4
--- /dev/null
+++ b/application/views/file_plaintext/deleted.php
@@ -0,0 +1 @@
+<?php echo $id; ?> has been deleted.
diff --git a/application/views/file_plaintext/footer.php b/application/views/file_plaintext/footer.php
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/application/views/file_plaintext/footer.php
diff --git a/application/views/file_plaintext/header.php b/application/views/file_plaintext/header.php
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/application/views/file_plaintext/header.php
diff --git a/application/views/file_plaintext/html_footer.php b/application/views/file_plaintext/html_footer.php
new file mode 100644
index 000000000..d46a93ce4
--- /dev/null
+++ b/application/views/file_plaintext/html_footer.php
@@ -0,0 +1 @@
+<?php include "application/views/file/html_footer.php"; ?>
diff --git a/application/views/file_plaintext/html_header.php b/application/views/file_plaintext/html_header.php
new file mode 100644
index 000000000..5cc4c40a7
--- /dev/null
+++ b/application/views/file_plaintext/html_header.php
@@ -0,0 +1 @@
+<?php include "application/views/file/html_header.php"; ?>
diff --git a/application/views/file_plaintext/non_existent.php b/application/views/file_plaintext/non_existent.php
new file mode 100644
index 000000000..7da92e954
--- /dev/null
+++ b/application/views/file_plaintext/non_existent.php
@@ -0,0 +1 @@
+I'm sorry, but the requested file doesn't exist.
diff --git a/application/views/file_plaintext/show_url.php b/application/views/file_plaintext/show_url.php
new file mode 100644
index 000000000..bb94d7422
--- /dev/null
+++ b/application/views/file_plaintext/show_url.php
@@ -0,0 +1,2 @@
+<?php echo $url; ?>
+
diff --git a/application/views/file_plaintext/too_big.php b/application/views/file_plaintext/too_big.php
new file mode 100644
index 000000000..d27a0295c
--- /dev/null
+++ b/application/views/file_plaintext/too_big.php
@@ -0,0 +1,2 @@
+Sorry, the file you uploaded is too big.
+
diff --git a/application/views/file_plaintext/upload_error.php b/application/views/file_plaintext/upload_error.php
new file mode 100644
index 000000000..c86c56911
--- /dev/null
+++ b/application/views/file_plaintext/upload_error.php
@@ -0,0 +1,2 @@
+An error occurred while uploading. <?php echo $msg; ?>
+
diff --git a/application/views/file_plaintext/upload_form.php b/application/views/file_plaintext/upload_form.php
new file mode 100644
index 000000000..18ff958ce
--- /dev/null
+++ b/application/views/file_plaintext/upload_form.php
@@ -0,0 +1,2 @@
+Uploads/pastes are deleted after <?php echo $upload_max_age; ?> days<?php if($small_upload_size > 0): ?> unless they are smaller than <?php echo format_bytes($small_upload_size); ?><?php endif; ?>.
+Maximum upload size is <?php echo format_bytes($max_upload_size); ?>.
diff --git a/application/views/index.html b/application/views/index.html
index c942a79ce..c942a79ce 100644..100755
--- a/application/views/index.html
+++ b/application/views/index.html
diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php
deleted file mode 100644
index 0bf5a8d2e..000000000
--- a/application/views/welcome_message.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>Welcome to CodeIgniter</title>
-
- <style type="text/css">
-
- ::selection{ background-color: #E13300; color: white; }
- ::moz-selection{ background-color: #E13300; color: white; }
- ::webkit-selection{ background-color: #E13300; color: white; }
-
- body {
- background-color: #fff;
- margin: 40px;
- font: 13px/20px normal Helvetica, Arial, sans-serif;
- color: #4F5155;
- }
-
- a {
- color: #003399;
- background-color: transparent;
- font-weight: normal;
- }
-
- h1 {
- color: #444;
- background-color: transparent;
- border-bottom: 1px solid #D0D0D0;
- font-size: 19px;
- font-weight: normal;
- margin: 0 0 14px 0;
- padding: 14px 15px 10px 15px;
- }
-
- code {
- font-family: Consolas, Monaco, Courier New, Courier, monospace;
- font-size: 12px;
- background-color: #f9f9f9;
- border: 1px solid #D0D0D0;
- color: #002166;
- display: block;
- margin: 14px 0 14px 0;
- padding: 12px 10px 12px 10px;
- }
-
- #body{
- margin: 0 15px 0 15px;
- }
-
- p.footer{
- text-align: right;
- font-size: 11px;
- border-top: 1px solid #D0D0D0;
- line-height: 32px;
- padding: 0 10px 0 10px;
- margin: 20px 0 0 0;
- }
-
- #container{
- margin: 10px;
- border: 1px solid #D0D0D0;
- -webkit-box-shadow: 0 0 8px #D0D0D0;
- }
- </style>
-</head>
-<body>
-
-<div id="container">
- <h1>Welcome to CodeIgniter!</h1>
-
- <div id="body">
- <p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
-
- <p>If you would like to edit this page you'll find it located at:</p>
- <code>application/views/welcome_message.php</code>
-
- <p>The corresponding controller for this page is found at:</p>
- <code>application/controllers/welcome.php</code>
-
- <p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
- </div>
-
- <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
-</div>
-
-</body>
-</html> \ No newline at end of file