<tmpl_include name="inc.head.tmpl">
<tmpl_include name="inc.titleBar.tmpl">
<script src="js/functions.js" type="text/javascript"></script>
<script src="js/adminSettings.js" type="text/javascript"></script>
<div id="content">
	<div id="upload">
		<div id="uploadLast"></div>
		<div id="uploadFirst">
			<span class="upload">
				Stats Settings
			</span>
		</div>
	</div>
	<div class="uploadClass">
		<form name="theForm" action="admin.php?op=updateStatsSettings" method="post" onsubmit="return validateSettings('stats')">
		<div align="left">
			<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 usage">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>
			<table id="settings">
				<tr>
					<td class="settingsTitle">
						<label for="stats_enable_public">Publicly Visible Stats</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						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>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_show_usage">Show Usage When Called Without Arguments</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						Enable/disable the option to display usage/help when the stats.php script is called without any arguments in the URL.<br />
						<a id="closeLink" href="stats.php?usage" target="_blank">Show Usage</a>
					</td>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_default_compress">Use Compression</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						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>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_deflate_level">Compression Level</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						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>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_txt_delim">Delimiting Character To Use In TXT Mode</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						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>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_default_header">Send Header Fields In TXT Mode</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						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>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_default_type">Default Statistic Type To Send</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						Specify the default type of statistic to send out.
					</td>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_default_format">Default Output Format</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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 class="settingsText">
						Specify the default output format to use when sending statistics - rss/txt/xml.
					</td>
				</tr>
				<tr>
					<td class="settingsTitle">
						<label for="stats_default_attach">Send As Attachment</label>
					</td>
					<td class="settingsSetting" rowspan="2">
						<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>
				<tr>
					<td class="settingsText">
						Enable/disable sending of statistics as an HTTP attachment - browser client will prompt to save the attachment as a file.
					</td>
				</tr>
				<tr>
					<td class="settingsTitle">
					</td>
					<td class="settingsSetting">
						<input type="Submit" value="Update Settings">
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div id="uploadBottom"></div>
	<div id="uploadBottomEnd"></div>
	<tmpl_include name="inc.subfoot.tmpl">
</div>
</body>
</html>
