1
HFS ~ HTTP File Server / remote upload ?
« on: October 16, 2009, 08:39:27 PM »
hi, rejetto ! i've been wondering will hfs have remote uploading feature to get files from remote storage
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
[file]
<tr><td class=row>%new% <a href="%item-url%">
<script language="javascript">
var c='%item-name%';
switch ( c.substr( c.lastIndexOf('.') ) .toLowerCase() )
{
case '.jpg' : case '.jpeg' : case '.gif' : case '.png' :case '.ico' :case '.bmp' : document.write('<a href="%item-url%" target="_blank"><img align=middle width="286" height="160" src="%item-name%"> </a> ');break;
default : document.write('<img align=middle src="/~img_file"> ');
}
</script>
%item-name%</a>%comment%<td class="row right">%item-size%<td class="row right">%item-modified%<td class="row right">%item-dl-count%
</tr>
$result .= "<li><TABLE border=0 cellspacing=0 cellpadding=0 align=center width=440><TR><TD valign=\"top\" align=\"left\" width=\"35%\"><a href=\"javascript:fullwin('$file')\"><img src=\"images/$file.jpg\" border=\"0\" align=\"absmiddle\" alt=\"File Name $file\"></a></td><TD valign=\"top\" align=\"left\" width=\"65%\"><B>Video:</B> <a href=\"javascript:fullwin('$file')\">$file</a><BR><BR><B>File Size:</B> <FONT COLOR=\"#1185D0\">$fsize</FONT><BR><BR>".@file_get_contents($_SERVER["DOCUMENT_ROOT"]."/demos/feeds/text/$file.txt")."</td></tr></table><hr>\n";
$cnt++;
<?php
//////////////////////////////////////////////
// Pagination object library,
// copyright www.flvhosting.com
// Please do not show source
//////////////////////////////////////////////
/**
* set $items_per_page to how many
* lines of products must be shown on page
*/
$items_per_page = 3 ;
require 'abstract.php' ;
require 'paginate.php' ;
//if ($_POST["url"])
// $url = $_POST["url"];
//else if ($_GET["url"])
// $url = $_GET["url"];
//else
// $url = 'ad.flv';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Video Player </TITLE>
<script language="javascript" src="http://www.revolunet.com/static/download/labo/VLCcontrols/ExternalLibLoader.js"></script>
<style>
* {
font-family:Trebuchet Ms, Arial;
font-size:12px;
}
select, input {
border:1px solid silver;
}
</style>
<script language="javascript" src="http://www.revolunet.com/static/download/labo/VLCcontrols/VLCobject.js"> </script>
<script language="javascript" src="http://www.revolunet.com/static/download/labo/VLCcontrols/VLCcontrols.js"> </script>
<script language="javascript">
var vlc_controls = null;
function init() {
// load plugin
myvlc = new VLCObject("mymovie", "600", "350");
// myvlc.addParam("MRL","http://code.revolunet.com/VLCjs/rambo.mpg");
myvlc.write("vlccontent");
// load controls
vlc_controls = new VLCcontrols(myvlc);
vlc_controls.onready = function () {
vlc_controls.play("http://images.apple.com/movies/wb/i_am_legend/i_am_legend-tlr1_h.480.mov");
}
}
</script>
<body onload="init()">
<style>
<!--
TD {
FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; COLOR: #000000; TEXT-DECORATION: none; FONT-WEIGHT: normal
}
P {
FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; COLOR: #000000; TEXT-DECORATION: none; FONT-WEIGHT: normal
}
DL {
COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; FONT-SIZE: 10pt; TEXT-DECORATION: none; FONT-WEIGHT: normal
}
LI {
COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; FONT-SIZE: 10pt; TEXT-DECORATION: none; FONT-WEIGHT: normal
}
UL {
COLOR: #1185D0; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; FONT-SIZE: 10pt; TEXT-DECORATION: none; FONT-WEIGHT: normal
}
H1 {
COLOR: #1185D0; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; FONT-SIZE: 14pt; FONT-WEIGHT: bolder
}
A:link {
COLOR: #FF0D0D; FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; TEXT-DECORATION: none; FONT-WEIGHT: bold
}
A:visited {
COLOR: #FF0D0D; FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; TEXT-DECORATION: none; FONT-WEIGHT: bold
}
A:active {
COLOR: #FF0D0D; FONT-SIZE: 10pt; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; TEXT-DECORATION: none; FONT-WEIGHT: bold
}
A:hover {
COLOR: #1185D0; FONT-SIZE: 10pt; TEXT-DECORATION: underline; FONT-FAMILY: Verdana, Arial, Helvetica, Tahoma, sans-serif; FONT-WEIGHT: bold
}
//-->
</style>
<script language="JavaScript">
<!--
function fullwin(targeturl){
window.open(targeturl,"", "scrollbars=no,resizable=yes,width=480,height=360")
}
//-->
</script>
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<TABLE border=0 cellspacing=0 cellpadding=0 align=center width="100%" HEIGHT="100%">
<TR>
<TD valign="top" align="center">
<div id="vlccontent">replaced by VLC controller</div>
<?
static $exclude = array(
"." , "..", "player.php", "counter", "text", "index.php", "mwm_flmx_88_31.gif", "readme.txt", "abstract.php", "paginate.php", "ad.flv", " ", "320x240.swf", "listing_example.jpg", "flv.jpg", "popup.swf", "iframe.php", "flash_detection.swf", "alternate.html", "320x240.fla", "popup.fla", "alternate.gif", "mwm_flmx_88_31.gif", "images", "powered_by_php.jpg"
);
function dir_count() {
global $exclude ; $num = 0 ;
$handle=opendir(".");
while ($file = readdir($handle)) {
if(in_array($file, $exclude)) continue;
else $num++;
}
closedir($handle);
return $num;
}
$props = array(
'itemsperpage'=> $items_per_page,
'file'=>basename($_SERVER[PHP_SELF]),
'delimiter'=>' <span style="font-size: 20pt; vertical-align: absmiddle;">·</span> ',
'link_active' => 'font-weight: bold; font-family: Arial, Verdana; color: #1185D0; font-size: 12pt;',
'link_inactive' => 'font-weight: bold; font-family: Arial, Verdana; color: #FF0000; font-size: 12pt;'
);
$pm = paginate(dir_count(),'p',$props);
$range = $pm->get_range();
function directory(&$range) {
global $exclude; $cnt = 0;
$handle=opendir(".");
while ($file = readdir($handle)) {
$fsizebyte = filesize($file);
// Correctly parse the filesize
if ($fsizebyte > 1000) {
$fsizeraw = ($fsizebyte/1000);
$fsizefin = round($fsizeraw, 2);
$fsize = $fsizefin.' <FONT COLOR=#000000>kb</FONT>';
}
if ($fsizebyte > 1048576) {
$fsizeraw = ($fsizebyte/1048576);
$fsizefin = round($fsizeraw, 2);
$fsize = $fsizefin.' <B>mb</B>';
}
if ($fsizebyte < 1024) {
$fsize = $fsizebyte.' bytes';
}
if(in_array($file, $exclude)) {
continue;
}
else {
if(in_array($cnt, $range))
$result .= "<li><TABLE border=0 cellspacing=0 cellpadding=0 align=center width=440><TR><TD valign=\"top\" align=\"left\" width=\"35%\"><a href=\"javascript:fullwin('$file')\"><img src=\"images/$file.jpg\" border=\"0\" align=\"absmiddle\" alt=\"File Name $file\"></a></td><TD valign=\"top\" align=\"left\" width=\"65%\"><B>Video:</B> <a href=\"javascript:fullwin('$file')\">$file</a><BR><BR><B>File Size:</B> <FONT COLOR=\"#1185D0\">$fsize</FONT><BR><BR>".@file_get_contents($_SERVER["DOCUMENT_ROOT"]."/demos/feeds/text/$file.txt")."</td></tr></table><hr>\n";
$cnt++;
}
}
closedir($handle);
return $result;
}
//javascript:fullwin('"$file')
?>
<TABLE border=0 cellspacing=0 cellpadding=0 align=center width=448>
<TR>
<TD valign="top" align="center"><BR>
<h1>Select A Movie Below</h1>
</tr></td>
<tr>
<TD valign="top" align="center">
<ol start="<?=($range[0]+1)?>">
<?
echo directory($range);
?>
</ol>
<?=$pm->show();?>
<BR>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?php
// echo '<pre>' ;
// print_r($range);
?>
attached file
<a href="#" onClick="vlc_controls.play('http://127.0.0.1/video.avi ')"> Video </a>
[file]
<tr><td class="file" colspan="2"><a href=" %item-url% "%comment% style="background-image:url('/~img_file')"%new%>%item-name%</a></td><td class="right">%item-size%</td><td class="right">%item-modified%</td><td class="filehits">%item-dl-count%</td></tr>