<html>
||include||meta.tpl||
<head>
<link rel="stylesheet" type="text/css" href="||nwimg||||tpl_color||/surge.css" />

||ifequal||attaching||true||
	||ifequal||isbulletin||true||
		<title>||cust_title|| - ||lang_str||Create new bulletin||</title>
	||else||
		<title>||cust_title|| - ||lang_str||Create new message||</title>
	||endif||
||else||
	<title>||cust_title|| - ||lang_str||Filestore||</title>
||endif||
<script type="text/javascript" src="||common_files||/util.js"></script>
<script type="text/javascript" src="||nwimg||/layout.js"></script>
<script type="text/javascript" src="||nwimg||/fileshare.js"></script>
<script type="text/javascript">
<!--
var x_att = "||lang_str||Attaching|| ";
var x_upl = "||lang_str||Uploading|| ";
var x_rtn = "||lang_str||Returning to message|| ";
//-->
</script>

</head>
<body class="body" onload="doresize();" onresize="doresize()">

||include||_layout_start.tpl||

||ifdef||error||
	||include||_errorinline.tpl||
||endif||
||ifdef||msg||
	||include||_msginline.tpl||
||endif||


<center>
||ifequal||attaching||true||
<form name="fileshare2" method="post" enctype="multipart/form-data" action="||action||">
<input type="hidden" name="force_connection" value="true" />
<input type="hidden" name="attaching" value="||attaching||" />
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="share_fld" value="||share_fld||" />
<input type="hidden" name="cmd" value="" />
<input type="hidden" name="answered" value="||answered||" />
<input type="hidden" name="attach_id" value="||attach_id||" />
<input type="hidden" name="to" value="||html_text||to||" />
<input type="hidden" name="cc" value="||html_text||cc||" />
<input type="hidden" name="bcc" value="||html_text||bcc||" />
<input type="hidden" name="subject" value="||html_text||subject||" />
<input type="hidden" name="from" value="||html_text||from||" />
<input type="hidden" name="confirm" value="||confirm||" />
<input type="hidden" name="isbulletin" value="||isbulletin||" />
<input type="hidden" name="message" value="||html_line||message||" />
<input type="hidden" name="priority" value="||priority||" />
<input type="hidden" name="msg_alternative" value="||msg_alternative||" />
<input type="hidden" name="page" value="" />
<input type="hidden" name="process" value="" />
<input type="hidden" name="share_file" value="" />
<input type="hidden" name="return_attach" value="true" />
<input type="hidden" name="content_type" value="||content_type||" />
<input type="hidden" name="copyself" value="||copyself||" />
<input type="hidden" name="pgp_type" value="||pgp_type||" />
<input type="hidden" name="fld" value="||fld||" />
<input type="hidden" name="valid_day" value="||valid_day||" />
<input type="hidden" name="valid_month" value="||valid_month||" />
<input type="hidden" name="valid_year" value="||valid_year||" />

<div class="c LF b">||lang_str||Attach Files to this message||<br>
<input NAME="button_return" type="button" class="btn" value="||lang_str||Return to message||" onclick="returnToMessage()" /></div>
<P>
<TABLE>
<TR>
	<TD WIDTH="50%" VALIGN="TOP">
		<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="bg1" width="250" height="190">
		<TR>||ifndef||attach_total_ksize|| ||define||attach_total_ksize||0|| ||endif||
			<TD class="c LF">
			<b>||lang_str||Attached Files||</b><p>
			||lang_str||Total attached size|| ||attach_total_ksize||k<p>
			<select style="width:95%" name="selected_attach" size="6">
				||begin_attach||
					||undef||empty||
					<option value="||href_text||attach_fname||">||attach_name|| (||attach_ksize||k)</option>
				||end_attach||
			</select><p>
			<INPUT TYPE="submit" class="btn" name="attach_del" VALUE="||lang_str||Delete||">
			</TD>
		</TR>
		</TABLE>
	</TD>

	<TD WIDTH="50%" VALIGN="TOP">
		<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="bg1" height="190">
		<TR>
			<TD class="LF c" nowrap>
			<b>||lang_str||Upload/Attach File||(s)</b><p>
			||lang_str||Select the files to upload/attach||<BR>
			(||lang_str||You can select up to 3 files at a time||)<p>
			File 1: <INPUT TYPE="file" NAME="attach" size="24"><br>
			File 2: <INPUT TYPE="file" NAME="attach" size="24"><br>
			File 3: <INPUT TYPE="file" NAME="attach" size="24"><p>
			<INPUT TYPE="submit" class="btn" NAME="attach_send" VALUE="||lang_str||Attach File||(s)" onclick="atting()">
			<INPUT TYPE="submit" class="btn" name="fileshare_add" VALUE="||lang_str||Upload File||(s)" onclick="uploading()">
			</TD>
		</TR>
		</TABLE>

	</TD>
</TR>
</TABLE>
</form>
<p>
<div class="c LF">||lang_str||Attach files from your filestore||</div>


||else||

	<p><div class="LF b">||lang_str||Filestore||</div></p>

||ifinstr||share_fld||web/private||
||else||
<table cellpadding="2">
<tr class="L0new">
	<td class="b">
	||lang_str||People can view these files at||
<script type="text/javascript">
<!--
||ifnempty||surgeplus_url||
	var s_url = "||surgeplus_url||/users/||current_user||@||domain||/";
||else||
	var s_url = "http://||current_host||/users/||current_user||@||domain||/";
||endif||
	var s_fld = "||share_fld||/";
	var re = new RegExp(" ", "g");
	if (s_fld.substr(0,4)=='web/'){
		s_url+=s_fld.substr(4);
	}
	s_url=s_url.replace(re, "+");
	document.write('&nbsp;<a class="b" target="_blank" href="'+s_url+'">'+s_url+'</a>');
//-->
</script>
	</td>
</tr>
</table>
||endif||

||endif||
<p>

<form name="fileshare" method="post" action="||action||">
<input type="hidden" name="force_connection" value="true" />
<input type="hidden" name="attaching" value="||attaching||" />
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="share_fld" value="||encode_text||share_fld||" />
<input type="hidden" name="encode_text" value="share_fld" />
<input type="hidden" name="cmd" value="" />
||ifequal||attaching||true||
	<input type="hidden" name="answered" value="||answered||" />
	<input type="hidden" name="attach_id" value="||attach_id||" />
	<input type="hidden" name="to" value="||html_text||to||" />
	<input type="hidden" name="cc" value="||html_text||cc||" />
	<input type="hidden" name="bcc" value="||html_text||bcc||" />
	<input type="hidden" name="subject" value="||html_text||subject||" />
	<input type="hidden" name="from" value="||html_text||from||" />
	<input type="hidden" name="confirm" value="||confirm||" />
	<input type="hidden" name="isbulletin" value="||isbulletin||" />
	<input type="hidden" name="message" value="||html_line||message||" />
	<input type="hidden" name="priority" value="||priority||" />
	<input type="hidden" name="msg_alternative" value="||msg_alternative||" />
	<input type="hidden" name="page" value="" />
	<input type="hidden" name="process" value="" />
	<input type="hidden" name="share_file" value="" />
	<input type="hidden" name="return_attach" value="true" />
	<input type="hidden" name="content_type" value="||content_type||" />
	<input type="hidden" name="copyself" value="||copyself||" />
	<input type="hidden" name="pgp_type" value="||pgp_type||" />
	<input type="hidden" name="fld" value="||fld||" />
	<input type="hidden" name="valid_day" value="||valid_day||" />
	<input type="hidden" name="valid_month" value="||valid_month||" />
	<input type="hidden" name="valid_year" value="||valid_year||" />
||endif||
<table width="95%">
<tr>
	<td valign="top" width="200">
<table class="LT" cellpadding="0" cellspacing="0">
<tr class="bg1">
	<th>||lang_str||Folders||</th>
</tr>
||begin_fileshare_fld||
	||ifequal||fld_name||web||
		||define||fld_name_short||(||lang_str||shared||)||
	||endif||
	||undef||icon||
	||define||space_width||0||
	||ifinstr||fld_name||web/private||
		||define||fld_sub_count||(||sub||fld_sub_count||1||)||
	||endif||
	||ifgreater||fld_sub_count||0||
		||define||icon||<b>:..</b>||
		||begin_for||1||fld_sub_count||
			||define||space_width||(||add||space_width||10||)||
		||end_for||
	||endif||
	||undef||space||
	||ifnequal||space_width||0||
		||define||icon||(<img border="0" src="||nwimg||/space.gif" height="1" width="||space_width||"/>||icon||)||
	||endif||
<tr>
||ifequal||share_fld||fld_name||
	<td class="b L0new" style="height: auto" nowrap>||icon|| ||lang||fld_name_short||</td>
	||define||this_fld_title||fld_name_short||
||else||
	<td nowrap><a href="javascript:chFld('||encode_text||fld_name||');">||icon|| ||lang||fld_name_short||</a></td>
||endif||
</tr>
||end_fileshare_fld||

</table>
	</td>

	<td valign="top" class="c">
<table class="LT" cellpadding="0" cellspacing="0">
<tr class="bg1">
	<th>||lang_str||Select||</th>
||ifequal||attaching||true||
	<th>||lang_str||Name|| &nbsp;(||lang_str||Click on the file name to attach||)
||else||
	<th>||lang_str||Name|| &nbsp;(||lang_str||Click on the file name to download||)
||endif||
</th>
	<th>||lang_str||Size||</th>
	<th nowrap> ||lang_str||Last Modified|| </th>
</tr>

||define||color||1||
||define||empty||true||

||begin_fileshare_files||

||undef||empty||
<tr class="L||color||">
||ifequal||color||1||
	||define||color||0||
||else||
	||define||color||1||
||endif||
	<td><input type="checkbox" name="sel_||href_text||full_file_name||" value="on"></td>
||ifequal||attaching||true||
	<td><a href="javascript:attFile('||message_text||full_file_name||');">||file_name||</a></td>
||else||
	<td><a href="javascript:G2('fileshare_get&share_file=||href_text||(||href_text||full_file_name||)||');">||file_name||</a></td>
||endif||
	<td>||file_size|| </td>
	<td> ||file_date_day|| ||file_date_time|| </td>
</tr>

||end_fileshare_files||

||ifdef||empty||
	<tr class="L||color||">
		<td></td>
		<td>||lang_str||This Folder Contains No Files||</td>
		<td>
||ifnempty||share_fld||
||ifnequal||share_fld||web||
||ifnequal||share_fld||web/Private||
		<input class="btn" type="submit" name="fileshare_fld_delete" value="||lang_str||Delete Folder||" />
||endif||
||endif||
||endif||
		</td>
		<td></td>
	</tr>
||else||
	<tr class="L||color||">
		<td colspan="2"><input name="allbox" type="checkbox" onClick="CheckAll();" />||lang_str||Click to select all files in this folder||</td>
		<td colspan="2">
			<input class="btn" type="submit" name="fileshare_file_delete" value="||lang_str||Delete selected files||" />
		</td>
	</tr>
||endif||
</table>

	</td>
</tr>
</table>
</form>
||ifnequal||attaching||true||

<P>
<form name="fileshare2" method="post" enctype="multipart/form-data" action="||action||">
<input type="hidden" name="force_connection" value="true" />
<input type="hidden" name="attaching" value="||attaching||" />
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="share_fld" value="||encode_text||share_fld||" />
<input type="hidden" name="encode_text" value="share_fld" />
<input type="hidden" name="cmd" value="" />
<TABLE>
<TR>
	<TD WIDTH="50%" VALIGN="TOP">
		<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="bg1">
		<TR>
			<TD class="LF c">
			<b>||lang_str||Create a new folder||</b><p>
			||lang_str||Enter a name for your new folder in the space below||<br>
			(||lang_str||The new folder will be created inside|| '||lang||this_fld_title||')<p>
			<INPUT TYPE="Text" NAME="fld_name" SIZE="30"> <INPUT TYPE="Submit" class="btn" name="fileshare_fld_add" VALUE="||lang_str||Create||">
			</TD>
		</TR>
		</TABLE>
	</TD>

	<TD WIDTH="50%" VALIGN="TOP">
		<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="bg1">
		<TR>
			<TD class="LF c">
			<b>||lang_str||Upload File||(s)</b><p>
			||lang_str||Select the files to upload||<BR>
			(||lang_str||You can select up to 3 files at a time||)<p>
			File 1: <INPUT TYPE="file" NAME="attach" size="24"><br>
			File 2: <INPUT TYPE="file" NAME="attach" size="24"><br>
			File 3: <INPUT TYPE="file" NAME="attach" size="24"><p>
			<INPUT TYPE="Submit" class="btn" name="fileshare_add" VALUE="||lang_str||Upload File||(s)" onclick="uploading()">
			</TD>
		</TR>
		</TABLE>

	</TD>
</TR>
</TABLE>
</form>

||endif||

</body>
</html>
