Location: PHPKode > scripts > ezStats for PlayStation Network > ezStats2_psn/admin/templates/settings.html
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		(function($) {
			$.extend({
				save_settings: function(elem) {
					// AJAX starten
					$.ajax({
						type:     "POST",
						url:      "action.php",
						dataType: "json",
						data: {
							action: "settings",
							sid:    "$sid",
							input:  {
								name: elem.attr("name"),
								value:  elem.val()
							}
						},
						beforeSend: function() {
							$('aside').stop(true, true).hide().text('%saving% ...').fadeIn();
						},
						error: function(data) {
							if (data && data.responseText)
								$('aside').text("").html(data.responseText).fadeIn();
						},
						success:    function(data) {
							if (data && data.message) 
								 $('aside').text(data.message);
							else $('aside').fadeOut();
							
							// Weiterleiten, falls Parameter uebergeben wurde
							if (data && data.href) document.location.href = data.href;
						}
					});
				}
			});
		})(jQuery);
		
		$(':input').bind("keyup change", function(e) {
			$.save_settings($(this));
		});
	});
</script>

<section>
	<h1>%settings%</h1>
	<form>
		<fieldset>
			<ul>
				<li>
					<label for="clanname">%settings_clanname%:</label>
					<input type="text" size="30" name="clanname" id="clanname" value="$preset[clanname]" />
					<legend>%settings_clanname_desc%</legend>
				</li>
				<li>
					<label for="clanpage">%settings_clanpage%:</label>
					<input type="text" size="30" name="clanpage" id="clanpage" value="$preset[clanpage]" />
					<legend>%settings_clanpage_desc%</legend>
				</li>
				<li>
					<label for="clantag">%settings_clantag%:</label>
					<input type="text" size="10" name="clantag" id="clantag" value="$preset[clantag]" />
					<legend>%settings_clantag_desc%</legend>
				</li>
				<li>
					<label for="language">%settings_language%:</label>
					<select name="language" id="language"></select>
					<legend>%settings_language_desc%</legend>
				</li>
				<li>
					<label for="timezone">%settings_timezone%:</label>
					<select name="timezone" id="timezone"></select>
					<legend>%settings_timezone_desc%</legend>
				</li>
				<li>
					<label for="selfadd">%settings_selfadd%:</label>
					<input type="radio" name="selfadd" value="0" /> %selfadd_only_admin% 
					<input type="radio" name="selfadd" value="1" /> %selfadd_with_link%
					<input type="radio" name="selfadd" value="2" /> %selfadd_without_link%
					<legend>%settings_selfadd_desc% (<a href="index.php?selfadd">URL</a>)</legend>
				</li>
				<li>
					<label for="ov_averages">%settings_ov_averages%:</label>
					<input type="radio" name="ov_averages" value="1" /> %yes% 
					<input type="radio" name="ov_averages" value="0" /> %no% 
					<legend>%settings_ov_averages_desc%</legend>
				</li>
				<li>
					<label for="ov_median">%settings_ov_median%:</label>
					<input type="radio" name="ov_median" value="1" /> %yes% 
					<input type="radio" name="ov_median" value="0" /> %no% 
					<legend>%settings_ov_median_desc%</legend>
				</li>
				<li>
					<label for="ov_summary">%settings_ov_summary%:</label>
					<input type="radio" name="ov_summary" value="1" /> %yes% 
					<input type="radio" name="ov_summary" value="0" /> %no% 
					<legend>%settings_ov_summary_desc%</legend>
				</li>
				<li>
					<label for="ov_adminlink">%settings_ov_infobox%:</label>
					<input type="radio" name="ov_infobox" value="1" /> %yes% 
					<input type="radio" name="ov_infobox" value="0" /> %no% 
					<legend>%settings_ov_infobox_desc%</legend>
				</li>
				<li>
					<label for="ov_brand">%settings_ov_brand%:</label>
					<input type="radio" name="ov_brand" value="1" /> %yes% 
					<input type="radio" name="ov_brand" value="0" /> %no% 
					<legend>%settings_ov_brand_desc%</legend>
				</li>
				<li>
					<label for="debug">%settings_debug%:</label>
					<input type="radio" name="debug" value="1" /> %on% 
					<input type="radio" name="debug" value="0" /> %off% 
					<legend>%settings_debug_desc%</legend>
				</li>
			</ul>
		</fieldset>
	</form>
</section>
Return current item: ezStats for PlayStation Network