Location: PHPKode > scripts > ezStats for PlayStation Network > ezStats2_psn/admin/templates/edituser.html
<script type="text/javascript" charset="utf-8">
	(function($) {
		$.extend({
			load_user: function() {
				$.ajax({
					type:     "POST",
					url:      "action.php",
					dataType: "html",
					data: {
						sid: "$sid",
						action: "load_user"
					},
					error: function(data) {
						if (data && data.responseText) $('aside').text("").html(data.responseText).fadeIn();
					},
					success: function(data) {
						$('#userlist').find('tbody').html(data);
					}
				});
			},
			
			delete_user: function(input) {
				$.ajax({
					type:     "POST",
					url:      "action.php",
					dataType: "json",
					data: {
						sid: "$sid",
						action: "delete_user",
						input: input
					},
					error: function(data) {
						if (data && data.responseText) $('aside').text("").html(data.responseText).fadeIn();
					},
					success: function(data) {
						// Ergebnis ausgeben
						if (data && data.message) {
							$('aside').stop(true, true).hide().text(data.message).fadeIn().delay(2000).fadeOut();
						}
						
						// Spieleruebersicht aktualisieren, falls Funktion geladen wurde
						if (typeof $.load_user() == "function") $.load_user();
					}
				});
			}
		});
	})(jQuery);
	
	
	$(document).ready(function(){
		// Spieleruebersicht aktualisieren
		$.load_user();
		
		// Loeschfunktion aktivieren
		$('#userlist').find('[action=delete]').live("click", function(e) {
			e.preventDefault();
			var link = $(this);
			
			link
				.addClass("delete")
				.text(link.attr("delphrase"))
				.mouseout(function() {
					$(this)
						.removeClass("delete")
						.text(link.attr("defphrase"))
						.unbind();
				})
				.click(function() {
					$.delete_user({
						id:   link.attr("userid"),
						name: link.attr("username")
					});
				});
		});
	});
</script>

<section id="userlist">
	<h2>%edit_user%</h2>
	<table class="userlist">
		<thead>
			<tr class="tleft">
				<th>%name%</th>
				<th>%user_rights%</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>
</section>
Return current item: ezStats for PlayStation Network