summaryrefslogtreecommitdiffstats
path: root/application/views/file_plaintext
diff options
context:
space:
mode:
Diffstat (limited to 'application/views/file_plaintext')
-rw-r--r--application/views/file_plaintext/client.php12
-rw-r--r--application/views/file_plaintext/deleted.php8
-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.php18
-rw-r--r--application/views/file_plaintext/upload_history.php19
12 files changed, 66 insertions, 0 deletions
diff --git a/application/views/file_plaintext/client.php b/application/views/file_plaintext/client.php
new file mode 100644
index 000000000..b37fd81bd
--- /dev/null
+++ b/application/views/file_plaintext/client.php
@@ -0,0 +1,12 @@
+Shell (binary safe):
+ curl -n -F "file=@/home/user/foo" <?php echo site_url()."\n"; ?>
+ cat file | curl -n -F "file=@-;filename=stdin" <?php echo site_url()."\n"; ?>
+
+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"; ?>
+
+To authenticate add the following to your ~/.netrc:
+ machine paste.xinu.at login my_username password my_secret_password
+
diff --git a/application/views/file_plaintext/deleted.php b/application/views/file_plaintext/deleted.php
new file mode 100644
index 000000000..347766092
--- /dev/null
+++ b/application/views/file_plaintext/deleted.php
@@ -0,0 +1,8 @@
+<?php if (!empty($errors)) {
+ echo implode("\n", $errors);
+} ?>
+<?php if (!empty($msgs)) {
+ echo implode("\n", $msgs);
+} ?>
+
+<?php echo $deleted_count; ?> of <?php echo $total_count; ?> 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..7fe3aa801
--- /dev/null
+++ b/application/views/file_plaintext/upload_form.php
@@ -0,0 +1,18 @@
+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); ?>.
+
+How to link your uploads:
+ - "/<ID>/" automatically highlight the uploads
+ - "/<ID>" set the detected MIME type and let the browser do the rest
+ - "/<ID>/plain" force the MIME type to be text/plain
+ - "/<ID>/<file extension>" override auto detection and use the supplied
+ file extension or language name for highlighting
+ - "/<ID>/qr" display a qr code containing a link to /<ID>/
+ - "/<ID>/rmd" convert markdown to HTML
+ - "/<ID>/ascii" convert text with ANSI (shell) escape codes to HTML
+ - "/<ID>/info" display some information about the ID
+
+If your upload is not detected as text, only "/<ID>/qr", "/<ID>/plain"
+and "/<ID>/info" will work as above and all others will simply return
+the file with the detected MIME type.
+
diff --git a/application/views/file_plaintext/upload_history.php b/application/views/file_plaintext/upload_history.php
new file mode 100644
index 000000000..87586babd
--- /dev/null
+++ b/application/views/file_plaintext/upload_history.php
@@ -0,0 +1,19 @@
+<?php
+echo
+ mb_str_pad($fields["id"], $lengths["id"])." | "
+ .mb_str_pad($fields["filename"], $lengths["filename"])." | "
+ .mb_str_pad($fields["mimetype"], $lengths["mimetype"])." | "
+ .mb_str_pad($fields["date"], $lengths["date"])." | "
+ .mb_str_pad($fields["hash"], $lengths["hash"])." | "
+ .mb_str_pad($fields["filesize"], $lengths["filesize"])."\n";
+
+foreach($query as $key => $item) {
+ echo
+ mb_str_pad($item["id"], $lengths["id"])." | "
+ .mb_str_pad($item["filename"], $lengths["filename"])." | "
+ .mb_str_pad($item["mimetype"], $lengths["mimetype"])." | "
+ .$item["date"]." | "
+ .$item["hash"]." | "
+ .$item["filesize"]."\n";
+}
+