<tmpl_include name="inc.head.tmpl">
<tmpl_include name="inc.subhead.tmpl">
<tmpl_include name="inc.adminmenu.tmpl">
<script src="js/functions.js" type="text/javascript"></script>
<script src="js/adminSettings.js" type="text/javascript"></script>
<table width="100%" border="2" bgcolor="#829FB5" bordercolor="#829FB5" cellpadding="2" cellspacing="0">
	<tr>
		<td>
			<div align="center">
				<a href="index.php?iid=serverStats&type=xfer"><font class="adminlink">show stats</font></a>
				|
				<tmpl_var name="SuperAdminLink">
			</div>
		</td>
	</tr>
</table>
<br>
<div align="center">
	<table width="100%" border=1 bordercolor="<tmpl_var name="table_admin_border">" cellpadding="2" cellspacing="0" bgcolor="<tmpl_var name="table_data_bg">">
		<tr>
			<td bgcolor="<tmpl_var name="table_header_bg">" background="themes/default/images/bar.gif">
				<img src="themes/default/images/properties.png" border=0>&nbsp;&nbsp;<font class="title">Xfer (Data Transfer) Settings</font>
			</td>
		</tr>
		<tr>
			<td align="center">
				<div align="center">
					<form name="theForm" action="admin.php?op=updateXferSettings" method="post" onsubmit="return validateSettings('xfer')">
						<table cellpadding="5" cellspacing="0" border="0" width="100%">
							<tr><td colspan="2" align="center" bgcolor="<tmpl_var name="table_header_bg">"><strong>Xfer (Data Transfer) Statistics General Settings</strong></td></tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="enable_xfer"><strong>Enable Xfer Statistics:</strong></label><br/>
									Enable/disable logging of data transfer stats - when disabled no transfer data statistics will be recorded.
								</td>
								<td valign="top">
									<select name="enable_xfer" id="enable_xfer">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="enable_xfer" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="xfer_realtime"><strong>Realtime Xfer Statistics:</strong></label><br/>
									Enable/disable update of xfer stats in realtime - when enabled, data transfer statistics will be updated on every index page reload.
								</td>
								<td valign="top">
									<select name="xfer_realtime" id="xfer_realtime">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="xfer_realtime" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="enable_public_xfer"><strong>Public Xfer Statistics:</strong></label><br/>
									Enable/disable display of public xfer stats - when enabled, data transfer statistics will be visible for all users.
								</td>
								<td valign="top">
									<select name="enable_public_xfer" id="enable_public_xfer">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="enable_public_xfer" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr><td colspan="2" align="center" bgcolor="<tmpl_var name="table_header_bg">"><strong>Xfer (Data Transfer) Limit Settings</strong></td></tr>
							<tr>
								<td colspan="2">
								<div style="width:600px">
									<strong>Overview:</strong><br/>
									Data transfer (xfer) limits can be configured in this section for daily, weekly and monthly consumption of bandwidth. Xfer limits have the effect of adding an xfer limit bar to the torrentflux-b4rt frontend to indicate how much bandwidth data can still be transferred for each period until the respective data transfer limit is reached. <br/><br/>
									<strong>Notes:</strong>
									<ul>
										<li>The totals apply globally - ie for all users.</li>
										<li>The limits are specified in megabytes - 1024 =~ 1Gb, 1048576 =~ 1Tb.</li>
										<li><strong>Limits are not enforced automatically!</strong><br/>
										To enforce xfer limits, the fluxcli.php script must be run via a scheduled job (ie cron) in 'xfer' mode - ie 'fluxcli.php xfer [period]', where [period] is one of day/week/month.  This will check if the associated xfer limit has already been met for the period and if true, stop all currently running transfers.
										</li>
									</ul>
								</div>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="xfer_total"><strong>Xfer Limit - Total:</strong></label><br/>
									Specify total xfer limit in megabytes - the data transfer limit for all periods<br/>(guide: 1Gb = 1024, 1Tb = 1048576).
								</td>
								<td valign="top">
									<input name="xfer_total" id="xfer_total" type="Text" maxlength="20" value="<tmpl_var name="xfer_total">" size="20">
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="xfer_month"><strong>Xfer Limit - Month:</strong></label><br/>
									Specify monthly xfer limit in megabytes - the monthly data transfer limit<br/>(guide: 1Gb = 1024, 1Tb = 1048576).
								</td>
								<td valign="top">
									<input name="xfer_month" "xfer_month" type="Text" maxlength="20" value="<tmpl_var name="xfer_month">" size="20">
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="xfer_week"><strong>Xfer Limit - Week:</strong></label><br/>
									Specify weekly xfer limit in megabytes - the weekly data transfer limit<br/>(guide: 1Gb = 1024, 1Tb = 1048576).
								</td>
								<td valign="top">
									<input name="xfer_week" id="xfer_week" type="Text" maxlength="20" value="<tmpl_var name="xfer_week">" size="20">
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="xfer_day"><strong>Xfer Limit - Day:</strong></label><br/>
									Specify daily xfer limit in megabytes - the daily data transfer limit<br/>(guide: 1Gb = 1024, 1Tb = 1048576).
								</td>
								<td valign="top">
									<input name="xfer_day" id="xfer_day" type="Text" maxlength="20" value="<tmpl_var name="xfer_day">" size="20">
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="week_start"><strong>Xfer Stats - Week Start:</strong></label><br/>
									Specify the first day of the week for stats tracking purposes - the day of the week that transfer statistics will be counted from.
								</td>
								<td valign="top">
									<select name="week_start" id="week_start">
										<option value="Monday"
										<tmpl_if name="week_start" value="Monday">
											 selected
										</tmpl_if>
										>Monday</option>
										<option value="Tuesday"
										<tmpl_if name="week_start" value="Tuesday">
											 selected
										</tmpl_if>
										>Tuesday</option>
										<option value="Wednesday"
										<tmpl_if name="week_start" value="Wednesday">
											 selected
										</tmpl_if>
										>Wednesday</option>
										<option value="Thursday"
										<tmpl_if name="week_start" value="Thursday">
											 selected
										</tmpl_if>
										>Thursday</option>
										<option value="Friday"
										<tmpl_if name="week_start" value="Friday">
											 selected
										</tmpl_if>
										>Friday</option>
										<option value="Saturday"
										<tmpl_if name="week_start" value="Saturday">
											 selected
										</tmpl_if>
										>Saturday</option>
										<option value="Sunday"
										<tmpl_if name="week_start" value="Sunday">
											 selected
										</tmpl_if>
										>Sunday</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="month_start"><strong>Xfer Stats - Month Start:</strong></label><br/>
									Specify the first day of the month for stats tracking purposes - the day of the month that transfer statistics will be counted from.
								</td>
								<td valign="top">
									<select name="month_start" id="month_start">
										<tmpl_loop name="month_list">
											<option value="<tmpl_var name="i">"
												<tmpl_if name="month_start_true" value="1">
													 selected
												</tmpl_if>
											><tmpl_var name="i"></option>
										</tmpl_loop>
									</select>
								</td>
							</tr>
						</table>
						<br>
						<input type="Submit" value="Update Settings">
					</form>
				</div>
				<br>
			</td>
		</tr>
	</table>
</div>
<tmpl_include name="inc.subfoot.tmpl">
