{include file="$gentemplates/_header.tpl" pagetitle="$file_details_header"}

<style>
{literal}
td.file_content { color:#000000; background-color: #eeeeee; margin: 0px, 10px, 10px, 0px; padding: 10px; }
td.file_content table { color:#000000; }
pre.file_content { font-family: monospace; font-weight: normal; }
{/literal}
</style>	
<script type="text/javascript">
{literal}
function specifylocation(){
  window.open("{/literal}{$index_url}&mode=specloc{literal}","locspec_win","toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=400,height=200")
}
{/literal}
</script>

{include file="$gentemplates/_navi.tpl" pagetitle="$file_details_header"}
		
<form name="f1" action="index.php" method="post" ENCTYPE="multipart/form-data">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}" />
<input type="hidden" name="action" value="{$haction}" />

<input type="hidden" name="files[fileId]" value="{$files.id}" />
<input type="hidden" name="files[file_type]" value="{$files.type}" />
<input type="hidden" name="files[old_file_name]" value="{$files.name}" />
<input type="hidden" name="files[old_file_location]" value="{$files.resides_in}" />
<input type="hidden" name="files[mime_type]" value="{$files.mime_type}" />      

<table border="0" cellpadding="0" cellspacing="0" width="80%">
  <tr><td class="lines2" height="2" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2"></td></tr>
  <tr align="left">
    <td class="tab" height="20" width="20"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="tab">&nbsp;</td>
    <td class="tab" colspan="3">&nbsp;</td>
  </tr>

  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.name}:</td>
    <td class="tab" colspan="3"><input type="text" name="files[file_name]" size="20" value="{$files.name}" /></td>
  </tr>
  
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.location}:</td>
    <td class="tab" colspan="3">{$resides_in|smarty:nodefaults}</td>
  </tr>

  {if $projectssb neq ''}
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.projecttext}:</td>
    <td class="formhead" colspan="3">{$projectssb|smarty:nodefaults}</td>
  </tr>
  
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.tasktext}:</td>
    <td class="formhead" colspan="3">{$taskssb|smarty:nodefaults}</td>
  </tr>
  
  {/if}


  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.categorytext}:</td>
    <td class="formhead" colspan="3">{$categoriessb|smarty:nodefaults}</td>
  </tr>
  
  {if $mode eq "editfile"}
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.mimetype}:</td>
    <td class="tab" colspan="3">{$files.mime_type}</pre></td>
  </tr>	
  {/if}

  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.filecontent}:</td>
    <td class="tab" colspan="3">{$output|smarty:nodefaults}</td>
  </tr>

  {if $mode eq "editfile"}
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.newfilecontent}:</td>
    <td class="formhead" colspan="2"><input type="file" name="userfile"></td>
    <td class="tab">&nbsp;</td>
  </tr>
  {/if}

  {if $isowner}
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.fileowner}:</td>
    <td class="tab">{$selectnewowner|smarty:nodefaults}</td>
    <td class="tab" colspan="2">&nbsp;</td>
  </tr>

  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">{$hashmap.filepermissions}:</td>
    <td class="formhead">
      <table border="0" width="200"><tr>
	<td class="formhead">{$hashmap.view}</td>
	<td class="formhead">{$hashmap.edit}</td>
	<td class="formhead">{$hashmap.delete}</td>
      </tr></table>
    </td>
    <td class="tab" colspan="2">&nbsp;</td>
  </tr>

  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  
  {foreach from=$groups key=groupid item=group}
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">&nbsp;&nbsp;&nbsp;&nbsp;{$group.description} ({$group.name}):</td>
    <td class="formhead">
      <table border="0" width="200"><tr>
        <input type="hidden" name="grouprights[{$groupid}][id]" value="{$groupid}" />
	<td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][r]" value="on" {$group.read}></td>
	<td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][w]" value="on" {$group.writ}></td>
	<td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][d]" value="on" {$group.dele}></td>
      </tr></table>
    </td>
    <td class="tab" colspan="2">&nbsp;</td>
  </tr>		    	
  {/foreach}
  

  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">&nbsp;&nbsp;&nbsp;&nbsp;{$hashmap.allrights}:</td>
    <td class="formhead">
      <table border="0" width="200"><tr>
	<td class="formhead"><input type="checkbox" name="files[all_rights][r]" value="on" {$files.all_rights.readischecked}></td>
	<td class="formhead"><input type="checkbox" name="files[all_rights][w]" value="on" {$files.all_rights.writischecked}></td>
	<td class="formhead"><input type="checkbox" name="files[all_rights][d]" value="on" {$files.all_rights.deleischecked}></td>
      </tr></table>
    </td>
    <td class="tab" colspan="2">&nbsp;</td>
  </tr>		
  {/if}	

  <tr><td class="lines2" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="30" height="1"></td>
    <td class="formhead">&nbsp;</td>
    <td class="formhead"><input type="submit" name="files[{$suname}]" value="{$hashmap.save}" class="submit">&nbsp;&nbsp;&nbsp;<input type="submit" name="files[{$suname}]" value="{$hashmap.abort}" class="submit"></td>
    <td class="tab" colspan="2">&nbsp;</td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td></tr>

</table>
</form>

{include file="$gentemplates/_footer.tpl" aktUser=$username}
