{include file="$gentemplates/_header.tpl" pagetitle="$createnewfile"}
{include file="$gentemplates/_navi.tpl" pagetitle="$createnewfile"}
		
<script type="text/javascript">
{literal}
function specifylocation(what){
  window.open(what,"locspec_win","toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=400,height=200")
}
{/literal}
</script>

<form name="f1" action="index.php" method="post" ENCTYPE="multipart/form-data">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}" />
<input type="hidden" name="id" value="{$files.id}" />
<input type="hidden" name="action" value="{$haction}" />

<table width="80%" border="0" cellpadding="0" cellspacing="0">
  <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="60" height="1"></td>
    <td class="tab">&nbsp;</td>
    <td class="tab" colspan="3">&nbsp;</td>
  </tr>

  <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="60" height="1"></td>
    <td class="formhead">{$hashmap.typetext}</td>
    <td class="tab" colspan="3">
      <select name="files[file_type]">
	{html_options options=$filetypes}
      </select>
    </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="60" height="1"></td>
    <td class="formhead">{$hashmap.location}</td>
    <td class="tab" colspan="3">{$resides_in|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="60" height="1"></td>
    <td class="formhead">{$hashmap.name}</td>
    <td class="tab" colspan="3"><input type="text" name="files[file_name]" size="20" maxlength="100" value=""></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="60" height="1"></td>
    <td class="formhead">{$hashmap.projecttext}:</td>
    <td class="formhead" colspan="3">{$projectssb|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>

  <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="60" height="1"></td>
    <td class="formhead">{$hashmap.filecontent}</td>
    <td class="tab" colspan="3"><input type="radio" name="files[file_content]" value="empty">{$hashmap.emptytxtfile}<br />
      <input type="radio" name="files[file_content]" value="specified" checked>{$hashmap.specifyfile}<br />
      <input type="file" name="userfile"></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="60" height="1"></td>
    <td class="formhead">{$hashmap.filepermissions}:</td>
    <td class="formhead">{$hashmap.view}</td>
    <td class="formhead">{$hashmap.edit}</td>
    <td class="formhead">{$hashmap.delete}</td>                
  </tr>


  {foreach from=$groups key=groupid item=group}
  <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">
    <input type="hidden" name="grouprights[{$groupid}][id]" value="{$groupid}" />
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">&nbsp;&nbsp;&nbsp;&nbsp;{$group.description} ({$group.name}):</td>
    <td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][r]" value="on"/></td>
    <td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][w]" value="on"/></td>
    <td class="formhead"><input type="checkbox" name="grouprights[{$groupid}][d]" value="on"/></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="60" height="1"></td>
    <td class="formhead">&nbsp;&nbsp;&nbsp;&nbsp;{$hashmap.allrights}:</td>
    <td class="formhead"><input type="checkbox" name="files[all_rights][r]" value="on" {$files[group_rights][readischecked]}></td>
    <td class="formhead"><input type="checkbox" name="files[all_rights][w]" value="on" {$files[group_rights][writischecked]}></td>
    <td class="formhead"><input type="checkbox" name="files[all_rights][d]" value="on" {$files[group_rights][deleischecked]}></td>                
  </tr>			
  
  <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="60" height="1"></td>
    <td class="formhead">&nbsp;</td>
    <td class="formhead"><input type="submit" name="files[{$suname}]" value="{$hashmap.save}" class="{$suclass}"></td>
    <td class="formhead" colspan="2"><input type="submit" name="files[{$suname}]" value="{$hashmap.abort}" class="{$suclass}"></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}
