<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>
<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">Stats Settings</font>
			</td>
		</tr>
		<tr>
			<td align="center">
				<div align="center">
					<form name="theForm" action="admin.php?op=updateStatsSettings" method="post" onsubmit="return validateSettings('stats')">
						<table cellpadding="5" cellspacing="0" border="0" width="100%">
							<tr>
								<td colspan="2">
								<div style="width:600px">
									<strong>Overview:</strong><br/>
									This page contains configuration options for the <a href="stats.php?t=all" target="_blank" title="Torrentflux-b4rt stats script">stats.php</a> script.  The stats.php script is used to display various statistics for various aspects of torrentflux-b4rt, including:
									<ul>
										<li><a href="stats.php?t=server" target="_blank" title="Torrentflux-b4rt server stats">Server</a> - up/down bandwidth, net connections, diskspace, etc</li>
										<li><a href="stats.php?t=xfer" target="_blank" title="Torrentflux-b4rt xfer stats">Xfer</a> - totals transferred globally and per user per day/week/month</li>
										<li><a href="stats.php?t=users" target="_blank" title="Torrentflux-b4rt users stats">Users</a> - current online status of torrentflux-b4rt users</li>
										<li><a href="stats.php?t=transfers" target="_blank" title="Torrentflux-b4rt transfers stats">Transfers</a> - current status, up/down bandwidth, estimated time left etc for all transfers in the transfer list</li>
										<li><a href="stats.php?usage" target="_blank" title="Torrentflux-b4rt stats">Transfer</a> - stats for individual transfers in the transfer list</li>
									</ul>
									The stats output is available in RSS, plain text or customized XML.<br/><br/>
									Click below for more information:<br/>
									<a href="stats.php?usage" target="_blank" title="Torrentflux-b4rt stats usage">Stats Script Usage</a><br/>&nbsp;
									</div>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_enable_public"><strong>Publicly Visible Stats:</strong></label><br/>
									Enable/disable publicly visible statistics - if enabled, superadmin level stats (server load, all transfer details, etc) are visible to the public without needing to authenticate.
								</td>
								<td valign="top">
									<select name="stats_enable_public" id="stats_enable_public">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="stats_enable_public" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_show_usage"><strong>Show Usage When Called Without Arguments:</strong></label><br/>
									Enable/disable the option to display usage/help when the stats.php script is called without any arguments in the URL.<br>
									<a href="stats.php?usage" target="_blank">
										<img src="themes/default/images/arrow.gif" width="9" height="9" title="Show Usage" border="0">
										Show Usage
									</a>
								</td>
								<td valign="top">
									<select name="stats_show_usage" id="stats_show_usage">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="stats_show_usage" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_default_compress"><strong>Use Compression:</strong></label><br/>
									Enable/disable the use of compression by default when sending statistics - using compression uses less bandwidth but takes up more CPU time on the server.
								</td>
								<td valign="top">
									<select name="stats_default_compress" id="stats_default_compress">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="stats_default_compress" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_deflate_level"><strong>Compression Level:</strong></label><br/>
									Specify the level of compression to use when transferring data - level 0 = no compression (data is sent out 'as is'), level 9 = maximum compression (data is compressed as small as possible before sending but takes up some minor extra CPU time to compress).
								</td>
								<td valign="top">
									<select name="stats_deflate_level" id="stats_deflate_level">
										<tmpl_loop name="deflate_list">
											<option value="<tmpl_var name="i">"
												<tmpl_if name="is_selected" value="1">
													 selected
												</tmpl_if>
											><tmpl_var name="i"></option>
										</tmpl_loop>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_txt_delim"><strong>Delimiting Character To Use In TXT Mode:</strong></label><br/>
									Specify the character to use for delimiting/separating fields when the format type is 'txt' - this character will be used to split one item in the output from the next.
								</td>
								<td valign="top">
									<input name="stats_txt_delim" id="stats_txt_delim" type="Text" maxlength="1" value="<tmpl_var name="stats_txt_delim">" size="1">
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_default_header"><strong>Send Header Fields In TXT Mode:</strong></label><br/>
									Enable/disable sending of header fields at the top of text mode output - when enabled, each of the statistics column headers will be sent out at the top of the output.<br/><strong>Note:</strong><br/>Only used in txt mode.
								</td>
								<td valign="top">
									<select name="stats_default_header" id="stats_default_header">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="stats_default_header" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_default_type"><strong>Default Statistic Type To Send:</strong></label><br/>
									Specify the default type of statistic to send out.
								</td>
								<td valign="top">
									<select name="stats_default_type" id="stats_default_type">
										<option value="all"
										<tmpl_if name="stats_default_type" value="all">
											 selected
										</tmpl_if>
										>all</option>
										<option value="server"
										<tmpl_if name="stats_default_type" value="server">
											 selected
										</tmpl_if>
										>server</option>
										<option value="xfer"
										<tmpl_if name="stats_default_type" value="xfer">
											 selected
										</tmpl_if>
										>xfer</option>
										<option value="users"
										<tmpl_if name="stats_default_type" value="users">
											 selected
										</tmpl_if>
										>users</option>
										<option value="transfers"
										<tmpl_if name="stats_default_type" value="transfers">
											 selected
										</tmpl_if>
										>transfers</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_default_format"><strong>Default Output Format:</strong></label><br/>
									Specify the default output format to use when sending statistics - rss/txt/xml.
								</td>
								<td valign="top">
									<select name="stats_default_format" id="stats_default_format">
										<option value="xml"
										<tmpl_if name="stats_default_format" value="xml">
											 selected
										</tmpl_if>
										>xml</option>
										<option value="rss"
										<tmpl_if name="stats_default_format" value="rss">
											 selected
										</tmpl_if>
										>rss</option>
										<option value="txt"
										<tmpl_if name="stats_default_format" value="txt">
											 selected
										</tmpl_if>
										>txt</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="left" width="350" valign="top">
									<label for="stats_default_attach"><strong>Send As Attachment:</strong></label><br/>
									Enable/disable sending of statistics as an HTTP attachment - browser client will prompt to save the attachment as a file.
								</td>
								<td valign="top">
									<select name="stats_default_attach" id="stats_default_attach">
										<option value="1">True</option>
										<option value="0"
										<tmpl_if name="stats_default_attach" value="0">
											 selected
										</tmpl_if>
										>False</option>
									</select>
								</td>
							</tr>
						</table>
						<br>
						<input type="Submit" value="Update Settings">
					</form>
				</div>
				<br>
			</td>
		</tr>
	</table>
</div>
<tmpl_include name="inc.subfoot.tmpl">
