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