Location: PHPKode > projects > ezStats Serverviewer > ezServer/templates/plugin.html
<link rel="stylesheet" href="#PATH#stylesheets/fonts.css">
<link rel="stylesheet" href="#PATH#stylesheets/imageflow.css">
<link rel="stylesheet" href="#PATH#stylesheets/style.php?files=common,plugin" />

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="#PATH#scripts/functions.js"></script>
<script type="text/javascript" src="#PATH#scripts/methods.js"></script>
<script type="text/javascript" src="#PATH#plugins/imageflow.js"></script>
<script type="text/javascript" src="#PATH#plugins/jQuery.tooltip.js"></script>
<script type="text/javascript" src="#PATH#plugins/jQuery.tablesorter.js"></script>

<script type="text/javascript" charset="utf-8">
	// Kompatibilitaet mit anderen JS-Bibliotheken herstellen
	jQuery.noConflict();
	
	(function($) {
		$(document).ready(function(){
			var ezstats = $("#ezStats");
			var list    = $("#ezCompare");
			
			// Funktion fuer das Nachladen der Daten
			$.extend({
				loadHTML: function(options) {
					// Standardsettings, falls sie nicht im Objekt beim Aufruf mitgegeben wurden
					var settings = {
						id:     "1",         // ID des Servers, zu dem Infos abgerufen werden sollen
						action: "infoarea",  // Daten die abgerufen werden sollen
						target: "#ezInfo"    // Evt. vorhandenes Padding
					}
					
					// Falls mit den Optionen kein Objekt uebergeben wird, wird angenommen dass es der Wert fuer "id" ist 
					if (typeof(options) != "object" && options != undefined ) options = {id: options};
					var cfg = $.extend({}, settings, options);
					
					
					// AJAX starten
					$.ajax({
						type:     "POST",
						url:      "#PATH#action.php",
						dataType: "json",
						data:     cfg,
						beforeSend: function() {
							$(cfg.target).html('<div class="ezLoad"></div>'); // Ladeicon einblenden
						},
						error: function(data) {
							if (data && data.responseText) {
								$.clog("Error during parsing action.php:");
								$.clog(data.responseText);
							}
						},
						success: function(data) {
							if (data) {
								if (data.message) $.clog(data.message);
								if (data.html)    $(data.target).html(data.html);
								if (data.href)    document.location.href = data.href;
							}
						}
					});
				}
			});
			
			
			// Ausgabe des ersten Servers
			if ($preset[serv_infoheader] || $preset[serv_settings])			$.loadHTML({ id: $id[0], action: "infoarea",    target: "#ezInfo" });
			if ($preset[serv_description] || $preset[serv_battlelog_url])	$.loadHTML({ id: $id[0], action: "description", target: "#ezDesc" });
			if ($preset[serv_mapcycle])										$.loadHTML({ id: $id[0], action: "mapcycle",    target: "#ezMaps" });
			if ($preset[serv_scoreboard])									$.loadHTML({ id: $id[0], action: "scoretable",  target: "#ezScore" });
																			$.loadHTML({ id: $id[0], action: "serverstats", target: "#ezServstats" });
			
			
			// Server-Auswahlliste
			if ($showserverlist) {
				// Aktiviert Javascript fuer Server-Auswahlliste
				list.mouseenter(function() { $(this).children(".ezDropdown").show(); })
					.mouseleave(function() { $(this).children(".ezDropdown").hide(); });
			}
			
			
			// Server-Auswahl initialisieren
			$('#ezCompare a').on("click", function(e) {
				e.preventDefault();
				var id = $(this).attr("href");
				
				if ($preset[serv_infoheader] || $preset[serv_settings])			$.loadHTML({ id: id, action: "infoarea",    target: "#ezInfo" });
				if ($preset[serv_description] || $preset[serv_battlelog_url])	$.loadHTML({ id: id, action: "description", target: "#ezDesc" });
				if ($preset[serv_mapcycle])										$.loadHTML({ id: id, action: "mapcycle",    target: "#ezMaps" });
				if ($preset[serv_scoreboard])									$.loadHTML({ id: id, action: "scoretable",  target: "#ezScore" });
																				$.loadHTML({ id: id, action: "serverstats", target: "#ezServstats" });
			});
			
			
			// Aside-Toggler
			$(".showme").click(function() { showme = $(this);
				if   (showme.children().hasClass("asc")) { showme.children().removeClass("asc"); showme.prev().slideDown(); } 
				else { showme.children().addClass("asc"); showme.prev().slideUp(); }
			});
		});
	})(jQuery);
</script>

<div id="ezStats">
	<div id="ezCompare"><span>%plugin_text%</span></div>
	<div id="ezInfo"></div>
	<div id="ezDesc"></div>
	<div id="ezMaps"></div>
	<div id="ezScore"></div>
	<div id="ezServstats"></div>
	
	<table style="width: 100%; border: 0 !important">
		<tr>
			<td id="ezAside">
				<ul>
					<li><b>%Leaderboard% %of% $preset[clanname]</b></li>
					<li>%Homepage%: <a href="$preset[clanpage]">$preset[clanpage]</a></li>
					<li>&nbsp;</li>
					<li>%Hits%: $preset[hits]</li>
					<li><a href="#PATH#admin/index.php" target="_blank">%open_adminpanel%</a></li>
					<li>&nbsp;</li>
					<li>%poweredby% <a href="http://www.bf3stats.com">bf3stats.com</a></li>
				</ul>
				<div class="showme"><div class="asc"></div></div>
			</td>
			<td id="ezBrand"><a href="http://www.ezstats.org">ezStats v$preset[version]</a></td>
		</tr>
	</table>
</div>
Return current item: ezStats Serverviewer