diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-11-09 23:07:50 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-11-09 23:07:50 +0100 |
commit | 50c24f38f25d312ed37c56a307e31be50e39c3f5 (patch) | |
tree | f7955f85d182a69f566dd8f9b0d9083510598b4f | |
parent | d9540210f6baaad022220762412673d80f9843bb (diff) |
Rework file/client page
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | application/controllers/file.php | 6 | ||||
-rw-r--r-- | application/views/file/client.php | 45 |
2 files changed, 38 insertions, 13 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index bd56c92df..435cc409a 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -320,6 +320,12 @@ class File extends CI_Controller { $this->data['client_link_deb'] = base_url().'data/client/deb/'; $this->data['client_link_slackware'] = base_url().'data/client/slackware/'; + if(preg_match('#^https?://(.*?)/.*$#', site_url(), $matches) === 1) { + $this->data["domain"] = $matches[1]; + } else { + $this->data["domain"] = "unknown domain"; + } + if (!is_cli_client()) { $this->load->view('header', $this->data); } diff --git a/application/views/file/client.php b/application/views/file/client.php index b507c5f1e..ac9aeddb2 100644 --- a/application/views/file/client.php +++ b/application/views/file/client.php @@ -1,19 +1,38 @@ -<p><b>Shell:</b></p> +<h1>Client</h1> + +<p> + Development (git): <?php echo anchor("http://git.server-speed.net/users/flo/fb/"); ?><br /> + Latest release: <?php echo $client_link ? anchor($client_link) : "unknown"; ?><br /> + GPG sigs, older versions: <a href="<?php echo $client_link_dir; ?>"><?php echo $client_link_dir; ?></a> +</p> + +<p>To authenticate add the following to your ~/.netrc:</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) +machine <?php echo $domain; ?> login my_username password my_secret_password </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> + +<?php /* +<p> + If you are using fb-client ≥1.1 you can also use + <code>~/.config/fb-client/config</code>. Please refer to + <code>man 1 fb</code> for further details. </p> -<p>To authenticate add the following to your ~/.netrc:</p> + */ +?> + +<h2>Packages</h2> + +<p> + Arch Linux: pacman -S fb-client<br /> + Debian: <?php echo anchor($client_link_deb); ?><br /> + Slackware: <?php echo anchor($client_link_slackware); ?> +</p> + +<h1>Shell</h1> + <pre> -machine paste.xinu.at login my_username password my_secret_password +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>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> |