PageRenderTime 100ms CodeModel.GetById 28ms app.highlight 2ms RepoModel.GetById 66ms app.codeStats 0ms

/index.php

https://github.com/ohrobot/animationfloor
PHP | 148 lines | 97 code | 18 blank | 33 comment | 10 complexity | 76c4bde44ba220e55813eb1ea4211aec MD5 | raw file
  1<?php 
  2include_once "inc.config.php";
  3include_once "inc.data.php";
  4//include "draw.php";
  5?>
  6
  7<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  8<html>
  9	<head>
 10		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 11		<link rel="icon" href="favicon.ico" type="image/ico">
 12		<link rel="alternate" type="application/rss+xml" title="ANIMATION FLOOR - RSS Feed" href="http://blog.plontsch.de/feed.php" />
 13		<link rel="stylesheet" type="text/css" href="style.css">
 14		<title>ANIMATION FLOOR, a blog by Bernd Plontsch</title>
 15		<script src="js/jquery-1.2.6.min.js" type="text/javascript" charset="utf-8"></script>
 16		<script src="js/jquery.preload-min.js" type="text/javascript" charset="utf-8"></script>
 17		<script src="js/jquery.jplayer.js" type="text/javascript" charset="utf-8"></script> 		
 18		<script type="text/javascript" charset="utf-8"> 
 19		  
 20		// PRELOADER 
 21
 22		// jQuery(function( $ ){
 23		// 
 24		// 	$('#summary').fadeIn('slow');
 25		// 	$.preload( '.entry img', {//the first argument is a selector to the images
 26		// 		onRequest:request,
 27		// 		onComplete:complete,
 28		// 		onFinish:finish,
 29		// 		placeholder:'js/loader.gif',//this is the really important option
 30		// 		notFound:'js/missing.gif',//optional image if an image wasn't found
 31		// 		threshold: 5 //'2' is the default, how many at a time, to load.
 32		// 	});
 33		// 	function update( data ){
 34		// 	 	$('#done').html( ''+data.done );
 35		// 	 	$('#total').html( ''+data.total );
 36		// 	 };
 37		// 	function complete( data ){
 38		// 	 	update( data );
 39		// 	};
 40		// 	function request( data ){
 41		// 	 	update( data );
 42		// 	};
 43		// 	function finish(){//hide the summary
 44		// 	 	$('#summary').fadeOut('slow');
 45		// 	};
 46		// 
 47		// });   
 48
 49				
 50		$(document).ready(function(){	 
 51	 
 52		//NON-JAVASCRIPT COMPATABILITY
 53
 54	    $(".entry a").attr("href", "#");
 55
 56		//GOOGLE ANALYTICS LINK TRACKING
 57		
 58		$("a").click(function(){
 59            pageTracker._trackPageview('/links/'+ $(this).attr('href'));
 60		});
 61		
 62		//JPLAYER
 63	
 64		$("#jquery_jplayer").jPlayer({
 65				ready: function () {
 66		 }
 67		}).onProgressChange( function(lp,ppr,ppa,pt,tt) {
 68			$("#pcent").text(parseInt(ppa)+"%");
 69		 });
 70	
 71		function playthis($soundfile) {
 72		 $("#jquery_jplayer").setFile($soundfile).play();
 73		 return false;
 74		}   
 75	
 76		function splitpath(fullpath){
 77			var patha = fullpath;
 78			var pathb = patha.split("/");
 79			var pathc = pathb[1].split(".");
 80			var pathd = pathc[0].split("_");
 81			var pathe = pathd[1];	
 82		return pathe;
 83		} 
 84
 85		var playing = ''; //init playing
 86
 87		$(".soundcontrol").click(function() {
 88			 console.log(this.id);	
 89			 $("#trackname").text($(this.id).text());
 90			 if (playing == this.id) {
 91				var status = "#"+splitpath(this.id);           
 92				$(status).attr("src", "js/headphone.gif");
 93		        $("#jquery_jplayer").stop();
 94			 	console.log("stop "+this.id);	
 95				playing = 0;
 96			} else {
 97			 	$("#jquery_jplayer").setFile(this.id).play(); 
 98				var status = "#"+splitpath(this.id);           
 99				$(".soundstatus").attr("src", "js/headphone.gif"); 	//reset status img
100				$(status).attr("src", "js/headphone_play.gif");		//set stop image
101			 	console.log("play "+this.id);		
102			 	playing = this.id;
103			}
104			 	return false;
105			});  
106		});  
107 
108		</script>
109	</head>
110	<body>      
111
112	<div id="jquery_jplayer" style="position: absolute; top: 0px; left: 0px;">
113	<embed height="0" width="0" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="id=jquery_jplayer&amp;fid=jqjp_flash_1&amp;vol=80" quality="high" bgcolor="#ffffff" src="js/Jplayer.swf" id="jqjp_flash_1" name="jqjp_flash_1"/>
114	<div id="jqjp_force_1" style="text-indent: -9999px;">0.9782846976523163
115	</div>
116	</div>
117		<div>
118			<?php include 'inc.draw.php'; ?>              
119		</div>                            
120		<div style="clear:both;"></div>
121		<div>
122			<ul id="pagination">        
123			<?php    
124			 //Pagination
125			 $x = new ListEntry(1,9999,$path);   //start, items, path
126			 $count = count($x->content);
127			 $pages = ceil($count/$itemsperpage);
128			 for($i=1; $i<=$pages; $i++) {
129				$style = '';
130				if ($i == $_GET['page'] || ((!isset($_GET['page']) && ($i == 1)))) {
131					$style = 'id ="current"';
132				} 
133			 	echo '<a class="paginator" '.$style.'" href="?page='.$i.'">'.$i.'</a> ';
134			 }              
135			?>   
136			</ul>  	
137			<div id="summary" style="display:none;">loading ... <span id="done"></span> of <span id="total"></span></div>
138			<div><h1>this is my blog. welcome! click on posts marked with a "<img src="js/headphone_black.gif" alt="headphone"/>" to listen to additional field recordings :: <strong>bernd plontsch</strong> :: <a href="mailto:bernd@plontsch.de" onclick="pageTracker._trackEvent('index', 'external link', 'mail');">mail</a> :: <a href="http://wiki.github.com/ohrobot/animationfloor" onclick="pageTracker._trackEvent('index', 'external link', 'script');">script</a> :: <a href="http://plontsch.de" onclick="pageTracker._trackEvent('index', 'external link', 'projects');">projects</a><h1></div>
139		</div>
140		
141		<?php
142		//include google analytics code
143        if (file_exists('inc.googleanalytics-code.php')) { 
144            include 'inc.googleanalytics-code.php'; 
145        }
146		?>		
147	</body>
148</html>