diff options
Diffstat (limited to 'system/application')
-rw-r--r-- | system/application/controllers/file.php | 16 | ||||
-rw-r--r-- | system/application/views/file/client.php | 20 | ||||
-rw-r--r-- | system/application/views/file/header.php | 2 | ||||
-rw-r--r-- | system/application/views/file/upload_form.php | 29 |
4 files changed, 37 insertions, 30 deletions
diff --git a/system/application/controllers/file.php b/system/application/controllers/file.php index 18e322f97..7d0943bdd 100644 --- a/system/application/controllers/file.php +++ b/system/application/controllers/file.php @@ -48,15 +48,25 @@ class File extends Controller { } } + function client() + { + $data['title'] = 'Client'; + $data['client_link'] = base_url().'data/client/fb-'.$this->var->latest_client.'.tar.gz'; + $data['client_link_dir'] = base_url().'data/client/'; + $data['client_link_deb'] = base_url().'data/client/deb/'; + $data['client_link_slackware'] = base_url().'data/client/slackware/'; + + $this->load->view('file/header', $data); + $this->load->view('file/client', $data); + $this->load->view('file/footer', $data); + } + function upload_form() { $data = array(); $data['title'] = 'Upload'; $data['small_upload_size'] = $this->config->item('small_upload_size'); $data['max_upload_size'] = $this->config->item('upload_max_size'); - $data['client_link'] = base_url().'data/client/fb-'.$this->var->latest_client.'.tar.gz'; - $data['client_link_deb'] = base_url().'data/client/deb/'; - $data['client_link_slackware'] = base_url().'data/client/slackware/'; $this->load->view('file/header', $data); $this->load->view('file/upload_form', $data); diff --git a/system/application/views/file/client.php b/system/application/views/file/client.php new file mode 100644 index 000000000..d9470a216 --- /dev/null +++ b/system/application/views/file/client.php @@ -0,0 +1,20 @@ +<p><b>Shell:</b></p> +<pre> +curl -n -F "content=<-" <?php echo base_url(); ?> < file (not binary safe) +cat file | curl -n -F "content=<-" <?php echo base_url(); ?> (not binary safe) +curl -n -F "file=@/home/user/foo" <?php echo base_url(); ?> (binary safe) +</pre> +<p><b>Client:</b><br /> +<p>Development (git): <a href="http://git.server-speed.net/users/flo/fb/">http://git.server-speed.net/users/flo/fb/</a><br /> +Latest release: <a href="<?php echo $client_link; ?>"><?php echo $client_link; ?></a>.<br /> +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/system/application/views/file/header.php b/system/application/views/file/header.php index aba7283a7..f6073707a 100644 --- a/system/application/views/file/header.php +++ b/system/application/views/file/header.php @@ -11,7 +11,5 @@ <div class="top"> <?php echo anchor('file/index', 'New'); ?> </div> - - <div class="clearer" ></div> <div class="content"> diff --git a/system/application/views/file/upload_form.php b/system/application/views/file/upload_form.php index ef424b496..ec7ab53de 100644 --- a/system/application/views/file/upload_form.php +++ b/system/application/views/file/upload_form.php @@ -1,13 +1,11 @@ -<div style="text-align:center"> +<div style="margin-top: 100px; text-align:center"> <?php echo form_open_multipart('file/do_upload'); ?> <p> File: <input type="file" name="file" size="30" /> <input type="submit" value="Upload" name="process" /> </p> </form> - <br /> - <p>OR</p> - <br /> + <p><b>OR</b></p> <?php echo form_open_multipart('file/do_paste'); ?> <p> <textarea name="content" cols="80" rows="20"></textarea><br /> @@ -15,33 +13,14 @@ </p> </form> </div> -<br /><br /> +<br /> <p>Uploads/pastes are deleted after 5 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> -<br /> -<p>For shell uploading/pasting use:</p> -<pre> -curl -n -F "content=<-" <?php echo base_url(); ?> < file (not binary safe) -cat file | curl -n -F "content=<-" <?php echo base_url(); ?> (not binary safe) -curl -n -F "file=@/home/user/foo" <?php echo base_url(); ?> (binary safe) -</pre> -<br /> -<p>If you want to use authentication add the following to your ~/.netrc:</p> -<pre> -machine paste.xinu.at password my_secret_password -</pre> -<br /> -<p>If you want to you can use this script to upload files, paste text or delete your uploads:<br /> -<a href="<?php echo $client_link; ?>"><?php echo $client_link; ?></a></p> -<p>Arch Linux users: pacman -S fb-client<br /> -Debian users: <a href="<?php echo $client_link_deb; ?>"><?php echo $client_link_deb; ?></a><br /> -Slackware users: <a href="<?php echo $client_link_slackware; ?>"><?php echo $client_link_slackware; ?></a></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 /> <p>If you experience any problems feel free to <a href="http://bluewind.at/?id=1">contact me</a>.</p> <br /> -<br /> <div class="small"> <p>This service is provided without warranty of any kind and may not be used to distribute copyrighted content.</p> </div> |