rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: peter.1992 on January 29, 2010, 03:16:06 AM

Title: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 03:16:06 AM
Ok i want to embed the ability to let the user change his or her password by using the menu could someone please edit the below code with the feature? :)

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--{.comment|--><h1 style='margin-bottom:100em'>WARNING: this template is only to be used with HFS 2.3 (and macros enabled)</h1> <!--.} -->
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <link rel="stylesheet" href="/~style.menu.css" type="text/css">
  <title>HFS %folder%</title>
  <link rel="shortcut icon" href="/favicon.ico">

<!--[if lte IE 5.5]>
<style type="text/css">
.menu ul li a, .menu ul li a:visited { width:151px; w\idth:139px; }
</style>
<![endif]-->

{.comment| Thanks to the following line, you can customize the appearance of the original template by right click on the root -> advanced -> diff template
then type [style.user] followed by all the CSS commands you want. This way you will stay up to date while the original template improves.} 
<style type="text/css">{.$style.user.}</style>

<script>
function _(id) { return typeof id == 'string' ? document.getElementById(id) : id; }

function addValueToForm(form,name,value) {
    i = document.createElement('input');
    i.setAttribute('name', name);
    i.setAttribute('value', value);
    i.setAttribute('type', 'hidden');
    _(form).appendChild(i);
} // addValueToForm

function submitAdding(form, data, action) {
    form = _(form);
    for (var i in data) {
        var es = form.getElementsByTagName('input');
        for (var j=0; j < es.length; j++) {
            var e = es[j];
            if (e.name == i)
                e.parentNode.removeChild(e);
        }
    }
    for (var i in data)
        addValueToForm(form, i, data[i]);
    if (typeof action != 'undefined')
        form.setAttribute('action', action);
    form.submit();
    return false;
} // submitAdding


function doArchive() {
    if (!confirm("Are you sure?")) return false;
    var allIncluded = true;
    var is = document.getElementsByName("selection");
    for (var i=0; i < is.length; i++)
        if (!is[i].checked) {
            allIncluded = false;
            break;
        }
    // if all are selected, we disable it temporarily
    if (allIncluded)
        for (var i=0; i < is.length; i++)
            is[i].checked = false;
    submitAdding("filelist", {"action":"archive"}, "~folder.tar?recursive&{.substring|?||%url%|include=none.}");
    if (allIncluded)
        for (var i=0; i < is.length; i++)
            is[i].checked = true;
    return false;
} // doArchive

</script>

</head>
<body>
<table width='100%'>
<tr>
  <td width='95%'>
    <div id='folderlabel'>{.!folder.}</div>
    <div id='folder'>{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!Home.}.}/</a>:} .}</div>
{.if| %user% |
  <td nowrap>
    <div class='button'><img src="/~img27"> {.!user.}: %user%</div>
/if.}
{.if| {.get|can recur.} |
  <td nowrap>
    <div class='button'>
    <form style='width:160px'>
    <input name='search' size='10' value="{.?search.}">
    <input type='submit' value="{.!search.}">
    </form>
    </div>
/if.}
  <td nowrap>
    <div class="menu">
    <ul>
    <li class='last'><a href="#"><span style='position:relative; top:5px; left:35px;'>{.!menu.}</span><!--[if IE 7]><!--></a><!--<![endif]-->
    <!--[if lte IE 6]><table><tr><td><![endif]-->
    <ul>
{.if not| %user%          | <li><a href="~login"><img src="/~img27"> Login</a></li> .}
{.if| {.get|can upload.}  | <li><a href="~upload"><img src="/~img32"> Upload</a></li> .}
{.if|%number%             | <li class="last"><a href="{.get|url|tpl=list{.if not|{.?search.}|{:|folders-filter=\|recursive:}.}.}">File list</a></li> .}
    </ul>
    <!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li>
    </ul>
    </div>

</table>

<form method='post' id='filelist'>
<div id='body'>
  {.if| %folder-item-comment% | <div id='foldercomment'>%folder-item-comment%</div> .}
  {.if| {.?search.} | <a class='big' href="."><img src="/~img14"> {.!BACK.}</a>
    | {.if| {.%folder% != / .} | <a class='big' href=".."><img src="/~img14"> {.!UP.}</a> .}
  /if.}
  {.if not| %number% | <div class='big'>{.!No files.}</div> |{:
    <div id='folderstats'>%number-folders% {.!folders.},  %number-files% {.!files.} - {.!Total.}: %total-size%</div>
    <table id='files' cellpadding='5'>
    {.set|sortlink| {:<a href="{.trim|
{.get|url|sort=$1| {.if| {.{.?sort.} = $1.} |  rev={.not|{.?rev.} .} /if.} /get.}
/trim.}">{.!$2.}{.if| {.{.?sort.} = $1.} | &{.if|{.?rev.}|u|d.}arr;.}</a>:} .}
    <th>{.^sortlink|n|Filename.}{.^sortlink|e|.ext.}
    <th>{.^sortlink|s|Filesize.}
    <th>{.^sortlink|t|Filetime.}
    <th>{.^sortlink|d|Hits.}
    %list%
    </table>
{.if|{.get|can delete.}{.get|can archive.}|
<div style='margin-top:2em;'>
<input type='checkbox' onclick='var is = document.getElementsByName("selection"); for (var i=0; i < is.length; i++) is[i].checked = this.checked;'> All
    {.if|{.get|can delete.}|
<input style='margin-left:1em' type='button' value='Delete selected' onclick='return confirm("Are you sure?") && submitAdding("filelist", {"action":"delete"}, "")'>
.}
    {.if|{.get|can archive.}|
<input style='margin-left:1em' type='button' value='Archive' onclick='return doArchive();'>
.}
</div>
/if.}

  :}/if not.}
</div>
</form>

<div id='footer'>
  <a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
  <br>{.!Servertime.}: %timestamp%
  <br>{.!Uptime.}: %uptime%
</div>

</body>
</html>
<!-- Build-time: %build-time% -->

[style.css|no log]
body, th { font-family:tahoma, verdana, arial, helvetica, sans; font-weight:normal; font-size:9pt; }
body { background-color:#DDF; padding:10px; }
body, p, form { margin:0 }
a { text-decoration:none;  background-color:Transparent; color:#05F; }
a:visited { color:#55F; }
a:hover { background-color:#EEF; }
img { border-style:none }
#files td { font-size:10pt; background:#FFF; border:1px solid #BBF }
#files td img { vertical-align:top }
#files th, th a, th a:visited { color:#555; font-size:13pt; font-weight:bold; padding-bottom:0; }
#foldercomment { font-size:10pt; color:#888; background:#EEE; padding:3px; border:1px solid #DDD; border-bottom:3px solid #DDD; margin-top:2px; }
#folder, .big { font-size:14pt; font-weight:bold;  }
#folderlabel, #folderstats, #footer { font-size: 8pt; }
#body {
  border-bottom: 4px solid #BBF;
     border-top: 4px solid #BBF;
    border-left: 1px dotted #BBF;
   border-right: 1px dotted #BBF;
  background:#F3F3FF;
  padding:15px;
  margin:15px;
}
.comment { font-size:7pt; color:#888; background:#EEE; padding:3px; border:1px solid #DDD; margin-top:2px; }
.button { height:24px; padding:4px 10px; margin:5px; border:2px solid black; background:white; font-size:8pt; font-weight:bold; }
a.button { padding:8px 10px; }
a.button img { vertical-align:text-bottom; }
.flag { font-weight:bold; font-size:8pt; background:white; color:red; text-align:center; border:1px solid red; }
.item-folder { font-size:smaller; margin-top:4px; }

[style.menu.css|no log]
/* ================================================================
This copyright notice must be untouched at all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/drop_examples.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
=================================================================== */
 /* common styling */
.menu { margin:0; width:150px; position:relative; font-size:10pt; z-index:100; clear:both; /* for this page only */ }
.menu ul { padding:0; margin:0; list-style-type: none; }
.menu ul li { float:left; position:relative; font-weight:bold; }
.menu li.last { border-bottom:2px solid #000; margin:0; }
.menu ul li a, .menu ul li a:visited { line-height:20px; height:32px; display:block; text-decoration:none; color:#000; width:139px; color:#000; border:2px solid #000; border-width:2px 2px 0 2px; padding-left:10px; background:#fff; }
.menu ul li ul { display: none; }
.menu table { margin:-1px; border-collapse:collapse;font-size:1em; } /* specific to non IE and IE7 browsers */
.menu ul li:hover a { color:#c00; }
.menu ul li:hover ul { display:block; position:absolute; top:33px; margin-top:1px; left:0; width:150px; height:auto; }
.menu ul li:hover ul li ul { display: none; }
.menu ul li:hover ul li a { line-height:15px; display:block; background:#ddd; color:#000; height:auto; padding:5px 10px; width:129px; }
.menu ul li a:hover ul li a.drop,
.menu ul li:hover ul li a.drop { background:#ddd; }
.menu ul li:hover ul li:hover ul li:hover a, /* for IE5.x and IE6 browsers only */
.menu ul li a:hover ul li a:hover,
.menu ul li:hover ul li:hover a { background:#888; color:#fff; }
.menu ul li a:hover ul li a.drop:hover,
.menu ul li:hover ul li:hover a.drop { background:#888; }
.menu ul li:hover ul li:hover ul { display:block; position:absolute; left:150px; top:-1px; width:150px; }
.menu ul li:hover ul li:hover ul li a { background:#ddd; color:#000; }
.menu ul li a:hover { color:#c00; background:#eee; }
.menu ul li a:hover ul { display:block; position:absolute; top:29px; left:0; background:#eee; margin-top:0; marg\in-top:1px; }
.menu ul li a:hover ul li a { height:20px; hei\ght:20px; line-height:15px; display:block; background:#ddd; color:#000; padding:5px 10px; width:151px; w\idth:129px; }
.menu ul li a:hover ul li a ul { visibility:hidden; position:absolute; height:0; width:0; }
.menu ul li a:hover ul li a:hover ul { visibility:visible; position:absolute; top:0; t\op:-1px; color:#000; left:150px; }
hr { clear:both; margin-bottom:30px; }
.left { clear:both; }

[file=folder=link]
  <tr><td>
  {.if|{.get|can delete.}{.and|{.get|can access.}|{.get|can archive item.}.}| <input type='checkbox' name='selection' value="%item-url%"> .}
  {.if|{.get|is new.}|<span class='flag'>&nbsp;NEW&nbsp;</span>.}
  {.if not|{.get|can access.}|<img src='/~img_lock'>.}
  <a href="%item-url%"><img src="%item-icon%"> %item-name%</a>
  {.if| {.?search.} |{:{.123 if 2|<div class='item-folder'>{.!item folder.} |{.breadcrumbs|{:<a href="%bread-url%">%bread-name%/</a>:}|from={.count substring|/|%folder%.}/breadcrumbs.}|</div>.}:} .}
  {.if| %item-comment% | <div class='comment'>%item-comment%</div> .}

[+file]
<td align='right'>%item-size%<td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+folder]
<td align='center'><i>folder</i><td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+link]
<td colspan='3' align='center'><i>link</i>

[error-page]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <style type="text/css">
  {.$style.css.}
  {.$style.user.}
  </style>
  </head>
<body>
%content%
<hr>
<div style="font-family:tahoma, verdana, arial, helvetica, sans; font-size:8pt;">
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>%timestamp%
</div>
</body>
</html>

[not found]
<h1>{.!Not found.}</h1>
<a href="/">{.!go to root.}</a>

[overload]
<h1>{.!Server busy.}</h1>
{.!retry later.}

[max contemp downloads]
<h1>Download limit</h1>
{.!max s dl msg.}

[unauthorized]
<h1>Unauthorized</h1>
Your username and password don't match, or you are not allowed to access this resource.

[deny]
<h1>Unallowed</h1>
{.or|%reason%|This resource is not accessible..}

[ban]
<h1>You are banned.</h1>
%reason%

[upload]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
  <title>HFS %folder%</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <style type="text/css">{.$style.user.}</style>
</head>
<body>
<script language="javascript">
var s1, s2;
if (window.parent.progress) s1 = '" target=_parent', s2 = '{.!CLOSE PROGRESS FRAME.}';
else s1 = '+progress"', s2= '{.!ADD PROGRESS FRAME.}';
document.write('<a href="~upload'+s1+' class="button" onClick="if (frm.upbtn.disabled) return false;"><img src="/~img10"> '+s2+'</a>');

var fired = 0;
window.onbeforeunload = function () {
if  (document.frm.upbtn.disabled) fired++;
// the first time it is fired, it is the submit itself. following calls are of the user leaving.
if (fired > 1) return 'This upload will be interrupted';
}

</script>
<a href="." target='_parent' class='button'><img src="/~img21"> {.!CANCEL UPLOAD.}</a>
<div style="margin-top:25px" id='folderlabel'>{.!folder.}</div>
<div id='folder'>%folder%</div>
<div id='body'>
<form name='frm' action="." target='_parent' method='post' enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;">
%upload-files%
<input name='upbtn' type='submit' value="{.!Upload files.}">
</form>
<br>{.!progress advice.}
</div>
<div id='footer'>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>{.!Servertime.}: %timestamp%
<br>{.!Uptime.}: %uptime%
<br>{.!Disk space.}: %diskfree%
</div>
</body>
</html>

[upload-file]
<input name='fileupload%idx%' size='70' type='file'><br>

[upload-results]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <title>HFS %folder%</title>
  <style type="text/css">{.$style.user.}</style>
</head>
<body>
<div style="margin-top:25px" id='folderlabel'>{.!folder.}</div>
<div id='folder'>%folder%</div>
<div id='body'>
%uploaded-files%
<br><br>
<a href="." target='_parent' class='big'><img src="/~img14"> {.!Back to the folder.}</a>
</div>
<div class='footer'>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>{.!Servertime.}: %timestamp%
<br>{.!Uptime.}: %uptime%
<br>{.!Disk space.}: %diskfree%
</div>
</body>
</html>

[upload-success]
<li><a href='%item-url%'>%item-name%</a>: <b>{.!OK.}</b> --- %item-size%  ({.!Speed.} %speed% KB/s)
{.if| %user% |{: {.append| %folder-resource%\hfs.comments.txt |{.filename|%item-resource%.}=uploaded by %user%
/append.} :}/if.}

[upload-failed]
<li>%item-name%: <b>{.!FAILED.}</b> ---  {.!%reason%.}

[upload+progress]
<html>
<head>
<frameset cols='200,*'>
  <frame name='progress' src="/~progress" scrolling='auto' marginwidth='0'>
  <frame src="~upload-no-progress" scrolling='auto'>
</frameset>
</head>
<body>
</body>
</html>

[progress]
<html>
<head>
  <meta http-equiv="Refresh" content="7;URL=/~progress">
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <style>
  .filename { font-weight:bold; font-size:8pt; }
  .bytes { font-size:7pt; }
  .perc { font-size:14px; vertical-align:middle; }
  .out_bar { width:100px; font-size:15px; background:black; border:black 1px solid; margin-right:5px; float:left; }
  .in_bar { height:16px; background:white; color:white;  }
  #body { margin-left:0; margin-right:0; }
  body { padding:2px; }
  #graph { border:white outset 2px; }
  {.$style.user.}
  </style>
  <title>HFS - {.!Progress status.}</title>
</head>
<body>
<div class='big'>{.!Progress status.}</div>
{.!Auto-refresh.}: 7 {.!seconds.}
<br><br><img src="/~img_graph190x40" id="graph">
<div id='body'>
%progress-files%
</div>
<div id='footer'>{.!Uptime.}: %uptime%</div>
</body>
</html>

[progress-nofiles]
<div class='big'>No file exchange in progress.</div>

[progress-upload-file]
<span class='flag'>&nbsp;up&nbsp;</span>
<span class='filename'>%filename%</span>
<div class='bytes'>
%done-bytes% / %total-bytes% bytes
<br>Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> <span class='perc'>%perc%%</span>
</div>

[progress-download-file]
<span class='flag'>&nbsp;down&nbsp;</span>
<span class='filename'>%filename%</span>
<div class='bytes'>
%done-bytes% / %total-bytes% bytes
<br>Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> <span class='perc'>%perc%%</span>
</div>

[special:strings]
menu=.: Menu :.
max s dl msg=On this server there is a limit on the number of <b>simultaneous</b> downloads.<br>This limit has been reached. Retry later.
retry later=Please, retry later.
progress advice=Before uploading you may want to open a <a target='_blank' href="/~progress">progress status window</a>.
item folder=in folder
Title: Re: Password Changer help :)
Post by: Mars on January 29, 2010, 08:21:33 AM
welcome boy

do some search on the forum about "admin panel", you will find some template including that.
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 12:26:30 PM
I dont need a panel tho.... What i want is a simple change password link allowen a use to open a little window to type in your the users new pw and repeat then change but i want that under the Menu.
Title: Re: Password Changer help :)
Post by: Roessi on January 29, 2010, 01:23:39 PM
http://www.rejetto.com/forum/index.php/topic,7997.msg1048225.html#msg1048225 ^^
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 01:25:18 PM
Im not using RAWR themes tho...

and i have no idea on how to add the codes anyway :(
Title: Re: Password Changer help :)
Post by: Roessi on January 29, 2010, 01:35:16 PM
how do you want to have it displayed ?
.. i could fgive it a try if you attach you tpl
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 01:37:20 PM
Well id like the change pw link where you click menu and it drops down.

Im using the latest beta version btw :)

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!--{.comment|--><h1 style='margin-bottom:100em'>WARNING: this template is only to be used with HFS 2.3 (and macros enabled)</h1> <!--.} -->
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <link rel="stylesheet" href="/~style.menu.css" type="text/css">
  <title>HFS %folder%</title>
  <link rel="shortcut icon" href="/favicon.ico">

<!--[if lte IE 5.5]>
<style type="text/css">
.menu ul li a, .menu ul li a:visited { width:151px; w\idth:139px; }
</style>
<![endif]-->

{.comment| Thanks to the following line, you can customize the appearance of the original template by right click on the root -> advanced -> diff template
then type [style.user] followed by all the CSS commands you want. This way you will stay up to date while the original template improves.} 
<style type="text/css">{.$style.user.}</style>

<script>
function _(id) { return typeof id == 'string' ? document.getElementById(id) : id; }

function addValueToForm(form,name,value) {
    i = document.createElement('input');
    i.setAttribute('name', name);
    i.setAttribute('value', value);
    i.setAttribute('type', 'hidden');
    _(form).appendChild(i);
} // addValueToForm

function submitAdding(form, data, action) {
    form = _(form);
    for (var i in data) {
        var es = form.getElementsByTagName('input');
        for (var j=0; j < es.length; j++) {
            var e = es[j];
            if (e.name == i)
                e.parentNode.removeChild(e);
        }
    }
    for (var i in data)
        addValueToForm(form, i, data[i]);
    if (typeof action != 'undefined')
        form.setAttribute('action', action);
    form.submit();
    return false;
} // submitAdding


function doArchive() {
    if (!confirm("Are you sure?")) return false;
    var allIncluded = true;
    var is = document.getElementsByName("selection");
    for (var i=0; i < is.length; i++)
        if (!is[i].checked) {
            allIncluded = false;
            break;
        }
    // if all are selected, we disable it temporarily
    if (allIncluded)
        for (var i=0; i < is.length; i++)
            is[i].checked = false;
    submitAdding("filelist", {"action":"archive"}, "~folder.tar?recursive&{.substring|?||%url%|include=none.}");
    if (allIncluded)
        for (var i=0; i < is.length; i++)
            is[i].checked = true;
    return false;
} // doArchive

</script>

</head>
<body>
<table width='100%'>
<tr>
  <td width='95%'>
    <div id='folderlabel'>{.!folder.}</div>
    <div id='folder'>{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!Home.}.}/</a>:} .}</div>
{.if| %user% |
  <td nowrap>
    <div class='button'><img src="/~img27"> {.!user.}: %user%</div>
/if.}
{.if| {.get|can recur.} |
  <td nowrap>
    <div class='button'>
    <form style='width:160px'>
    <input name='search' size='10' value="{.?search.}">
    <input type='submit' value="{.!search.}">
    </form>
    </div>
/if.}
  <td nowrap>
    <div class="menu">
    <ul>
    <li class='last'><a href="#"><span style='position:relative; top:5px; left:35px;'>{.!menu.}</span><!--[if IE 7]><!--></a><!--<![endif]-->
    <!--[if lte IE 6]><table><tr><td><![endif]-->
    <ul>
{.if not| %user%          | <li><a href="~login"><img src="/~img27"> Login</a></li> .}
{.if| {.get|can upload.}  | <li><a href="~upload"><img src="/~img32"> Upload</a></li> .}
{.if|%number%             | <li class="last"><a href="{.get|url|tpl=list{.if not|{.?search.}|{:|folders-filter=\|recursive:}.}.}">File list</a></li> .}
    </ul>
    <!--[if lte IE 6]></td></tr></table></a><![endif]-->
    </li>
    </ul>
    </div>

</table>

<form method='post' id='filelist'>
<div id='body'>
  {.if| %folder-item-comment% | <div id='foldercomment'>%folder-item-comment%</div> .}
  {.if| {.?search.} | <a class='big' href="."><img src="/~img14"> {.!BACK.}</a>
    | {.if| {.%folder% != / .} | <a class='big' href=".."><img src="/~img14"> {.!UP.}</a> .}
  /if.}
  {.if not| %number% | <div class='big'>{.!No files.}</div> |{:
    <div id='folderstats'>%number-folders% {.!folders.},  %number-files% {.!files.} - {.!Total.}: %total-size%</div>
    <table id='files' cellpadding='5'>
    {.set|sortlink| {:<a href="{.trim|
{.get|url|sort=$1| {.if| {.{.?sort.} = $1.} |  rev={.not|{.?rev.} .} /if.} /get.}
/trim.}">{.!$2.}{.if| {.{.?sort.} = $1.} | &{.if|{.?rev.}|u|d.}arr;.}</a>:} .}
    <th>{.^sortlink|n|Filename.}{.^sortlink|e|.ext.}
    <th>{.^sortlink|s|Filesize.}
    <th>{.^sortlink|t|Filetime.}
    <th>{.^sortlink|d|Hits.}
    %list%
    </table>
{.if|{.get|can delete.}{.get|can archive.}|
<div style='margin-top:2em;'>
<input type='checkbox' onclick='var is = document.getElementsByName("selection"); for (var i=0; i < is.length; i++) is[i].checked = this.checked;'> All
    {.if|{.get|can delete.}|
<input style='margin-left:1em' type='button' value='Delete selected' onclick='return confirm("Are you sure?") && submitAdding("filelist", {"action":"delete"}, "")'>
.}
    {.if|{.get|can archive.}|
<input style='margin-left:1em' type='button' value='Archive' onclick='return doArchive();'>
.}
</div>
/if.}

  :}/if not.}
</div>
</form>

<div id='footer'>
  <a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
  <br>{.!Servertime.}: %timestamp%
  <br>{.!Uptime.}: %uptime%
</div>

</body>
</html>
<!-- Build-time: %build-time% -->

[style.css|no log]
body, th { font-family:tahoma, verdana, arial, helvetica, sans; font-weight:normal; font-size:9pt; }
body { background-color:#DDF; padding:10px; }
body, p, form { margin:0 }
a { text-decoration:none;  background-color:Transparent; color:#05F; }
a:visited { color:#55F; }
a:hover { background-color:#EEF; }
img { border-style:none }
#files td { font-size:10pt; background:#FFF; border:1px solid #BBF }
#files td img { vertical-align:top }
#files th, th a, th a:visited { color:#555; font-size:13pt; font-weight:bold; padding-bottom:0; }
#foldercomment { font-size:10pt; color:#888; background:#EEE; padding:3px; border:1px solid #DDD; border-bottom:3px solid #DDD; margin-top:2px; }
#folder, .big { font-size:14pt; font-weight:bold;  }
#folderlabel, #folderstats, #footer { font-size: 8pt; }
#body {
  border-bottom: 4px solid #BBF;
     border-top: 4px solid #BBF;
    border-left: 1px dotted #BBF;
   border-right: 1px dotted #BBF;
  background:#F3F3FF;
  padding:15px;
  margin:15px;
}
.comment { font-size:7pt; color:#888; background:#EEE; padding:3px; border:1px solid #DDD; margin-top:2px; }
.button { height:24px; padding:4px 10px; margin:5px; border:2px solid black; background:white; font-size:8pt; font-weight:bold; }
a.button { padding:8px 10px; }
a.button img { vertical-align:text-bottom; }
.flag { font-weight:bold; font-size:8pt; background:white; color:red; text-align:center; border:1px solid red; }
.item-folder { font-size:smaller; margin-top:4px; }

[style.menu.css|no log]
/* ================================================================
This copyright notice must be untouched at all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/drop_examples.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
=================================================================== */
 /* common styling */
.menu { margin:0; width:150px; position:relative; font-size:10pt; z-index:100; clear:both; /* for this page only */ }
.menu ul { padding:0; margin:0; list-style-type: none; }
.menu ul li { float:left; position:relative; font-weight:bold; }
.menu li.last { border-bottom:2px solid #000; margin:0; }
.menu ul li a, .menu ul li a:visited { line-height:20px; height:32px; display:block; text-decoration:none; color:#000; width:139px; color:#000; border:2px solid #000; border-width:2px 2px 0 2px; padding-left:10px; background:#fff; }
.menu ul li ul { display: none; }
.menu table { margin:-1px; border-collapse:collapse;font-size:1em; } /* specific to non IE and IE7 browsers */
.menu ul li:hover a { color:#c00; }
.menu ul li:hover ul { display:block; position:absolute; top:33px; margin-top:1px; left:0; width:150px; height:auto; }
.menu ul li:hover ul li ul { display: none; }
.menu ul li:hover ul li a { line-height:15px; display:block; background:#ddd; color:#000; height:auto; padding:5px 10px; width:129px; }
.menu ul li a:hover ul li a.drop,
.menu ul li:hover ul li a.drop { background:#ddd; }
.menu ul li:hover ul li:hover ul li:hover a, /* for IE5.x and IE6 browsers only */
.menu ul li a:hover ul li a:hover,
.menu ul li:hover ul li:hover a { background:#888; color:#fff; }
.menu ul li a:hover ul li a.drop:hover,
.menu ul li:hover ul li:hover a.drop { background:#888; }
.menu ul li:hover ul li:hover ul { display:block; position:absolute; left:150px; top:-1px; width:150px; }
.menu ul li:hover ul li:hover ul li a { background:#ddd; color:#000; }
.menu ul li a:hover { color:#c00; background:#eee; }
.menu ul li a:hover ul { display:block; position:absolute; top:29px; left:0; background:#eee; margin-top:0; marg\in-top:1px; }
.menu ul li a:hover ul li a { height:20px; hei\ght:20px; line-height:15px; display:block; background:#ddd; color:#000; padding:5px 10px; width:151px; w\idth:129px; }
.menu ul li a:hover ul li a ul { visibility:hidden; position:absolute; height:0; width:0; }
.menu ul li a:hover ul li a:hover ul { visibility:visible; position:absolute; top:0; t\op:-1px; color:#000; left:150px; }
hr { clear:both; margin-bottom:30px; }
.left { clear:both; }

[file=folder=link]
  <tr><td>
  {.if|{.get|can delete.}{.and|{.get|can access.}|{.get|can archive item.}.}| <input type='checkbox' name='selection' value="%item-url%"> .}
  {.if|{.get|is new.}|<span class='flag'>&nbsp;NEW&nbsp;</span>.}
  {.if not|{.get|can access.}|<img src='/~img_lock'>.}
  <a href="%item-url%"><img src="%item-icon%"> %item-name%</a>
  {.if| {.?search.} |{:{.123 if 2|<div class='item-folder'>{.!item folder.} |{.breadcrumbs|{:<a href="%bread-url%">%bread-name%/</a>:}|from={.count substring|/|%folder%.}/breadcrumbs.}|</div>.}:} .}
  {.if| %item-comment% | <div class='comment'>%item-comment%</div> .}

[+file]
<td align='right'>%item-size%<td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+folder]
<td align='center'><i>folder</i><td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+link]
<td colspan='3' align='center'><i>link</i>

[error-page]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <style type="text/css">
  {.$style.css.}
  {.$style.user.}
  </style>
  </head>
<body>
%content%
<hr>
<div style="font-family:tahoma, verdana, arial, helvetica, sans; font-size:8pt;">
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>%timestamp%
</div>
</body>
</html>

[not found]
<h1>{.!Not found.}</h1>
<a href="/">{.!go to root.}</a>

[overload]
<h1>{.!Server busy.}</h1>
{.!retry later.}

[max contemp downloads]
<h1>Download limit</h1>
{.!max s dl msg.}

[unauthorized]
<h1>Unauthorized</h1>
Your username and password don't match, or you are not allowed to access this resource.

[deny]
<h1>Unallowed</h1>
{.or|%reason%|This resource is not accessible..}

[ban]
<h1>You are banned.</h1>
%reason%

[upload]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
  <title>HFS %folder%</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <style type="text/css">{.$style.user.}</style>
</head>
<body>
<script language="javascript">
var s1, s2;
if (window.parent.progress) s1 = '" target=_parent', s2 = '{.!CLOSE PROGRESS FRAME.}';
else s1 = '+progress"', s2= '{.!ADD PROGRESS FRAME.}';
document.write('<a href="~upload'+s1+' class="button" onClick="if (frm.upbtn.disabled) return false;"><img src="/~img10"> '+s2+'</a>');

var fired = 0;
window.onbeforeunload = function () {
if  (document.frm.upbtn.disabled) fired++;
// the first time it is fired, it is the submit itself. following calls are of the user leaving.
if (fired > 1) return 'This upload will be interrupted';
}

</script>
<a href="." target='_parent' class='button'><img src="/~img21"> {.!CANCEL UPLOAD.}</a>
<div style="margin-top:25px" id='folderlabel'>{.!folder.}</div>
<div id='folder'>%folder%</div>
<div id='body'>
<form name='frm' action="." target='_parent' method='post' enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;">
%upload-files%
<input name='upbtn' type='submit' value="{.!Upload files.}">
</form>
<br>{.!progress advice.}
</div>
<div id='footer'>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>{.!Servertime.}: %timestamp%
<br>{.!Uptime.}: %uptime%
<br>{.!Disk space.}: %diskfree%
</div>
</body>
</html>

[upload-file]
<input name='fileupload%idx%' size='70' type='file'><br>

[upload-results]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <title>HFS %folder%</title>
  <style type="text/css">{.$style.user.}</style>
</head>
<body>
<div style="margin-top:25px" id='folderlabel'>{.!folder.}</div>
<div id='folder'>%folder%</div>
<div id='body'>
%uploaded-files%
<br><br>
<a href="." target='_parent' class='big'><img src="/~img14"> {.!Back to the folder.}</a>
</div>
<div class='footer'>
<a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a>
<br>{.!Servertime.}: %timestamp%
<br>{.!Uptime.}: %uptime%
<br>{.!Disk space.}: %diskfree%
</div>
</body>
</html>

[upload-success]
<li><a href='%item-url%'>%item-name%</a>: <b>{.!OK.}</b> --- %item-size%  ({.!Speed.} %speed% KB/s)
{.if| %user% |{: {.append| %folder-resource%\hfs.comments.txt |{.filename|%item-resource%.}=uploaded by %user%
/append.} :}/if.}

[upload-failed]
<li>%item-name%: <b>{.!FAILED.}</b> ---  {.!%reason%.}

[upload+progress]
<html>
<head>
<frameset cols='200,*'>
  <frame name='progress' src="/~progress" scrolling='auto' marginwidth='0'>
  <frame src="~upload-no-progress" scrolling='auto'>
</frameset>
</head>
<body>
</body>
</html>

[progress]
<html>
<head>
  <meta http-equiv="Refresh" content="7;URL=/~progress">
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="/~style.css" type="text/css">
  <style>
  .filename { font-weight:bold; font-size:8pt; }
  .bytes { font-size:7pt; }
  .perc { font-size:14px; vertical-align:middle; }
  .out_bar { width:100px; font-size:15px; background:black; border:black 1px solid; margin-right:5px; float:left; }
  .in_bar { height:16px; background:white; color:white;  }
  #body { margin-left:0; margin-right:0; }
  body { padding:2px; }
  #graph { border:white outset 2px; }
  {.$style.user.}
  </style>
  <title>HFS - {.!Progress status.}</title>
</head>
<body>
<div class='big'>{.!Progress status.}</div>
{.!Auto-refresh.}: 7 {.!seconds.}
<br><br><img src="/~img_graph190x40" id="graph">
<div id='body'>
%progress-files%
</div>
<div id='footer'>{.!Uptime.}: %uptime%</div>
</body>
</html>

[progress-nofiles]
<div class='big'>No file exchange in progress.</div>

[progress-upload-file]
<span class='flag'>&nbsp;up&nbsp;</span>
<span class='filename'>%filename%</span>
<div class='bytes'>
%done-bytes% / %total-bytes% bytes
<br>Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> <span class='perc'>%perc%%</span>
</div>

[progress-download-file]
<span class='flag'>&nbsp;down&nbsp;</span>
<span class='filename'>%filename%</span>
<div class='bytes'>
%done-bytes% / %total-bytes% bytes
<br>Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> <span class='perc'>%perc%%</span>
</div>

[special:strings]
menu=.: Menu :.
max s dl msg=On this server there is a limit on the number of <b>simultaneous</b> downloads.<br>This limit has been reached. Retry later.
retry later=Please, retry later.
progress advice=Before uploading you may want to open a <a target='_blank' href="/~progress">progress status window</a>.
item folder=in folder
Title: Re: Password Changer help :)
Post by: Roessi on January 29, 2010, 02:54:40 PM
k finished :) juste copy everything from the zip archiv in the hfs root folder and change the tpl file in hfs
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 03:07:48 PM
I LOVE it lolz thanks for your help.
Title: Re: Password Changer help :)
Post by: Roessi on January 29, 2010, 03:21:04 PM
no problem ;)
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 03:43:53 PM
Is there a way to make it compatible with internet explorer? cuz wen u hover over change pw the menu closes.
Title: Re: Password Changer help :)
Post by: Roessi on January 29, 2010, 03:51:22 PM
i give it a try
Title: Re: Password Changer help :)
Post by: peter.1992 on January 29, 2010, 03:51:49 PM
k tyvm :)
Title: Re: Password Changer help :)
Post by: Roessi on January 30, 2010, 01:15:57 PM
now it works in ie too
and u can delete the template folder ... now u just need the tpl file :)
Title: Re: Password Changer help :)
Post by: peter.1992 on January 30, 2010, 08:41:18 PM
I love the work u did :) but is it posible to make "Change password" closed instead of opened so when some1 click on it it opens up so u can change pw? like not open in a window.
Title: Re: Password Changer help :)
Post by: Mars on January 30, 2010, 11:19:58 PM
inside a macro IF , when you insert some macro, don't forget to add always QUOTE

Quote
{.if|{.{.postvar|action.}=changepass.}|{:

<script type="text/javascript">
{.if|{.{.postvar|newpass.}={.postvar|newpasscon.}.}|   
      {:document.write('<div id=\"pwchanged\" style=\"border: 1px solid red;\"><center>Your Password had succesfully been changed.</center></div>');   
      {.set account|%user%|password={.postvar|newpass.}.}
      :}|{:
document.write('<div id=\"pwchanged\" style=\"border: 1px solid red;\"><center>Your Passwords don match.</center></div>');   
:}.}
</script>
:}.}
Title: Re: Password Changer help :)
Post by: peter.1992 on January 30, 2010, 11:23:20 PM
Would you be able to edit the TPL for me? cuz looking at to much code hurts my eyes DX and would that do wat i asked?
Title: Re: Password Changer help :)
Post by: Mars on January 30, 2010, 11:31:15 PM
attached
Title: Re: Password Changer help :)
Post by: peter.1992 on January 30, 2010, 11:36:12 PM
yea that dident do wat i needed it to do DX hold on ill post an example of wat im tryen to explain.

like in the pic i added i want it like that as soon as u click on menu then it open up as (In the 2nd pic)
Title: Re: Password Changer help :)
Post by: Roessi on January 31, 2010, 05:49:01 AM
attached ^^ sry i thought i cahnged the style="display:none" already ;) now its closed on page load
@mars
thx :)
but ... could u sometime explain me why ? i dunno much bout rejettos scripting language :) thx in advance :)
Title: Re: Password Changer help :)
Post by: peter.1992 on January 31, 2010, 05:51:03 AM
can u re upload the completed tpl please and thxs :)
Title: Re: Password Changer help :)
Post by: peter.1992 on February 02, 2010, 12:32:57 PM
grrrr found another problem DX now it wont load in Firefox DX i need it to work with Firefox and IE.
Title: Re: Password Changer help :)
Post by: Roessi on February 02, 2010, 12:42:11 PM
O.o for me it works in firefox AND Ie but ill take a look on it when i come back home ;)
Title: Re: Password Changer help :)
Post by: peter.1992 on February 02, 2010, 12:42:39 PM
k thanks :)
Title: Re: Password Changer help :)
Post by: Roessi on February 02, 2010, 04:44:24 PM
err could you say What doesnt work ? for me everything works fine O.o
Title: Re: Password Changer help :)
Post by: peter.1992 on February 02, 2010, 04:52:23 PM
Thats odd O_O cuz i try loading the site in firefox and the page is white and when i load it in IE it loads perfectly DX

(Sent u a message)
Title: Re: Password Changer help :)
Post by: Roessi on February 03, 2010, 12:20:41 PM
k modified the other version again :) shouldwork for you too :) its only that your able to create folders too ^^
i dont find whats wrong in the template i modified for you ^^
http://www.rejetto.com/forum/index.php/topic,8143.msg1048457.html#msg1048457