diff options
| author | oweissbarth | 2014-03-17 00:38:42 +0100 |
|---|---|---|
| committer | oweissbarth | 2014-03-17 00:38:42 +0100 |
| commit | ac384ab0feee6fc6761d0030273c665264dd33e1 (patch) | |
| tree | 23e03a17bbcd560c8c0ee150b81123073379b9cb /www | |
| parent | d5bd89e1d64d00f0d10926c470bc850646f4a969 (diff) | |
| download | files.iamfabulous.de-ac384ab0feee6fc6761d0030273c665264dd33e1.tar.gz | |
added basic browsing functionality
Diffstat (limited to 'www')
| -rw-r--r-- | www/browse.php | 32 | ||||
| -rwxr-xr-x | www/functions/func_interface.php | 4 | ||||
| -rwxr-xr-x | www/include.php | 1 | ||||
| -rw-r--r-- | www/static/browser.css | 26 | ||||
| -rw-r--r-- | www/static/img/icon_file.svg | 61 | ||||
| -rw-r--r-- | www/static/img/icon_folder.svg | 70 | ||||
| -rwxr-xr-x | www/static/style.css | 3 |
7 files changed, 194 insertions, 3 deletions
diff --git a/www/browse.php b/www/browse.php new file mode 100644 index 0000000..9c37f41 --- /dev/null +++ b/www/browse.php @@ -0,0 +1,32 @@ +<?php + +function print_browser($content){ + + include("static/header.html"); + + $file_list = ""; + foreach($content as $file){ + $file_list .= get_item($file); + } + + echo '<link rel="stylesheet" type="text/css" href="/static/browser.css"> + <table>'.$file_list.'</table>'; + + include("static/footer.html"); +} + +function get_icon($file){ + if($file[4]=="DIRECTORY"){ + return '<td id="icon">'.get_link($file).'<img src="/static/img/icon_folder.svg" width="30px"></a></td>'; + }else{ + return '<td id="icon">'.get_link($file).'<img src="/static/img/icon_file.svg" width="30px"></a></td>'; + } +} + +function get_link($file){ + return '<a href="/'.$_GET["name"].$_GET["folder"].$file[3].'">'; +} + +function get_item($file){ + return '<tr>'.get_icon($file).'<td>'.get_link($file).$file[3].'</a></td></tr>'; +} diff --git a/www/functions/func_interface.php b/www/functions/func_interface.php index 2a8ef34..05f8f3b 100755 --- a/www/functions/func_interface.php +++ b/www/functions/func_interface.php @@ -18,6 +18,6 @@ function collect_content($db){ return $content; } -function print_browser($content){ +/*function print_browser($content){ var_dump($content); -} +}*/ diff --git a/www/include.php b/www/include.php index bb51338..abbe4d9 100755 --- a/www/include.php +++ b/www/include.php @@ -17,4 +17,5 @@ require_once($func_dir . "func_password.php"); // changes the user password require_once("login.php"); // prints the login page require_once("register.php"); // prints the register page +require_once("browse.php"); // prints the file browser page diff --git a/www/static/browser.css b/www/static/browser.css new file mode 100644 index 0000000..21ef4ad --- /dev/null +++ b/www/static/browser.css @@ -0,0 +1,26 @@ +tr:hover{ + background: #CCCCCC; +} +tr{ + width: 100%; + border: none; + +} +table{ +width: 100% +} + +#icon{ + width: 35px; +} + +table tr td { + padding-left: 0; + padding-right: 0; + margin: 0; + +} +a{ + text-decoration: none; + color: black; +} diff --git a/www/static/img/icon_file.svg b/www/static/img/icon_file.svg new file mode 100644 index 0000000..de7eaaa --- /dev/null +++ b/www/static/img/icon_file.svg @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="500" + height="500" + id="svg3794" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="New document 5"> + <defs + id="defs3796" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="168.86431" + inkscape:cy="257.11822" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1440" + inkscape:window-height="841" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" /> + <metadata + id="metadata3799"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-552.36218)"> + <path + style="fill:#eaeaea;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4.80000019;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 83.854547,620.01145 0,378.8125 310.093753,0 0,-317.0625 -61.75,-61.75 -248.343753,0 z" + id="rect3802" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/www/static/img/icon_folder.svg b/www/static/img/icon_folder.svg new file mode 100644 index 0000000..1191fa1 --- /dev/null +++ b/www/static/img/icon_folder.svg @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="500" + height="500" + id="svg2" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="New document 1"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="168.79576" + inkscape:cy="190.80834" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-width="1440" + inkscape:window-height="841" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-552.36218)"> + <path + style="fill:#c4c4c4;fill-opacity:1;stroke:#000000;stroke-width:0.98498851px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 375.00459,685.87976 0,238.79727 -312.375125,0 0,-306.27452 141.237075,0 15.56519,68.24836 z" + id="path2987-3" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" /> + <path + style="fill:#eaeaea;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 51.517779,719.01184 0,242.43661 387.898581,0 0,-323.24881 -214.15234,0 -15.80241,81.59506 z" + id="path2987" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" /> + </g> +</svg> diff --git a/www/static/style.css b/www/static/style.css index 8b07d09..d7be5a2 100755 --- a/www/static/style.css +++ b/www/static/style.css @@ -76,10 +76,11 @@ a.logo:hover{ Content-Area **********************************************************/ #content-area{ - height: 100%; + /*height: 100%;*/ width: 100%; position: absolute; margin-bottom: 0; + top: 80px; } |
