Location: PHPKode > projects > Esvon Personals > esvon-personals/tpl/admin/media_files_upload.htm
<hr size=1 />

<table border=0 width="100%">
<tr height=5>
<td></td>
</tr>
<tr class=ex_row>
<td>&nbsp;Upload {##media_id|ucwords##}</td>
</tr>
<tr>
<td class=txt8>

<!-- IF ##files_id## == "0" -->
Also you will be able to upload {##media_id##} to your {item} once it has been posted.
<!-- ENDIF -->

</td>
</tr>
</table>


<!-- IF ##files_id## -->


<script type="text/javascript">

function FileEvent_##media_id##(id){
  var ctl_f = document.frm.hi_##media_id##_file;
  if(ctl_f.selectedIndex<0 || !ctl_f.options[ctl_f.selectedIndex].value){
    alert('No File');
    return false;
  }

  if(id=='hi_delete') return(confirm('Delete ?'));
  else if(id=='hi_down') return 1;
  else if(id=='hi_up') return 1;
  else if(id=='edit_txt') popUp('##REQUEST_URI##&act=media_info&media=##media_id##&f='+ctl_f.options[ctl_f.selectedIndex].value,'EditTxtWin', 50, 50, 600, 550);
  else if(id=='preview') popUp('##FILE_URL##'+ctl_f.options[ctl_f.selectedIndex].value,'PreviewWin', 100, 100, 600, 400);
}

function FileClick_##media_id##(f){
  var ctl_f = document.frm.hi_##media_id##_file;  
  if(ctl_f.value != f) ctl_f.value = f;
  else FileEvent_##media_id##('preview');
}

function FileAll_##media_id##() {
  var block = 'hi_##media_id##_del_files';
  var on = document.frm.hi_##media_id##_all.checked;
  var el = document.frm.elements;
  for (var i=0; i<el.length; i++) {
    if (el[i].name.substr(0,block.length)== block && !el[i].disabled) el[i].checked=on;
  }
}


</SCRIPT>


<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td valign=bottom>

<b>{##media_id|ucwords##} :</b><br />

<select name=hi_##media_id##_file style="width:160">

<!-- TPL_INSERT : hawk_file_s -->
<!-- TPL_CELL : def -->

<option value="##file##">##file##

<!-- /TPL_CELL : def -->
<!-- /TPL_INSERT : hawk_file_s -->

</select>

<input type=button value="View" onClick="FileEvent_##media_id##('preview')"
class=button><!-- IF ##en_txt## --><input type=button value="Text" onClick="FileEvent_##media_id##('edit_txt')"
class=button><!-- ENDIF --><input type=submit name=hi_##media_id##_delete value="Delete" class=button 
onClick="return(FileEvent_##media_id##('hi_delete'))">

</td>
<td>&nbsp;</td>
<td valign=bottom>

<font class=txt8 color=blue>Location/Priority</font><br />

<input type=submit name=hi_##media_id##_up value="Up" onClick="return(FileEvent_##media_id##('hi_up'))"
class=button><input type=submit name=hi_##media_id##_down value="Down" class=button 
onClick="return(FileEvent_##media_id##('hi_down'))">

</td>
</tr>
</table>

<!-- ENDIF -->
	
<table border=0 width=100% cellpadding=0 cellspacing=0>

<tr height=25><td colspan=2>
<font color=blue class=txt8>Upload {##media_id##} (you have ##files_amt## of ##files_max## {##media_id##} allowed)</font>
</td></tr> 

<!-- TPL_INSERT : file_upload -->

<!-- TPL_CELL : row -->
<tr><td>File ##file_no##</td>
<td><input type=file name=hi_##media_id##_upload##file_no## size=35></td>
</tr>
<!-- /TPL_CELL : row -->


<!-- TPL_CELL : url -->
<tr><td><i>or File ##file_no## URL</td>
<td><input name=hi_##media_id##_upload##file_no##_url value="##file_url##" size=35></td>
</tr>
<!-- /TPL_CELL : url -->

<!-- TPL_CELL : txt -->
<tr><td>Description</td>
<td><input name=hi_##media_id##_upload##file_no##_txt value="##file_txt##" size=35></td>
</tr>
<!-- /TPL_CELL : txt -->

<!-- /TPL_INSERT : file_upload -->

</table>

<!-- IF ##files_amt## -->

<br />

<font color=blue class=txt8>
To delete multiple {##media_id##} at once, mark the necessary checkboxes and click "Submit"
</font>

<br />

&nbsp;&nbsp;&nbsp;<font color=blue>Check All</font>
<input type=checkbox name="hi_##media_id##_all" value=1 OnClick="FileAll_##media_id##()">

<!-- ENDIF -->


<table border=0 cellpadding=0 cellspacing=5>
<tr>

<!-- TPL_INSERT : hawk_file -->

<!-- TPL_CELL : default -->

<td><center>

<!-- IF ##preview_url## -->

<a href="javascript:FileClick_##media_id##('##file##')"><img src="##preview_url####file##" border=0><br />
<font class=txt8 color=0000FF>##file##</font></a>

<!-- ELSE -->

<b><a href="javascript:FileClick_##media_id##('##file##')">##file##</a></b>

<!-- ENDIF -->

<br />
<input type=checkbox name="hi_##media_id##_del_files[]" value="##file##">

</td>

<!-- /TPL_CELL : default -->

<!-- TPL_CELL : br -->
</tr>
<tr>
<!-- /TPL_CELL : br -->

<!-- TPL_CELL : blank -->
<td>&nbsp;</td>
<!-- /TPL_CELL : blank -->

<!-- /TPL_INSERT : hawk_file -->

</tr>
</table>
Return current item: Esvon Personals