Advertisement
Guest User

Untitled

a guest
Oct 16th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 15.93 KB | None | 0 0
  1. <?php
  2. include('config.php');
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  9. <script src="http://www.google.com/jsapi" type="text/javascript"></script>
  10. <script type="text/javascript">google.load("swfobject", "2.1");</script>
  11. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
  12. <script src="http://www.tracksandclips.com/swfobject.js"type="text/javascript"></script>
  13. <script src="http://www.tracksandclips.com/javascript.js"type="text/javascript"></script>
  14. <script src="http://www.tracksandclips.com/lib_cookie.js" type="text/javascript"></script>
  15. <script type="text/javascript" src="http://www.tracksandclips.com/external.js"></script>
  16. <script src="http://www.tracksandclips.com/mainFunctions.js" type="text/javascript"></script>
  17. <script src="http://www.tracksandclips.com/jquery.colorbox.js" type="text/javascript"></script>
  18. <title>Tracks and Clips - Random music and video's.</title>
  19. <base href="http://www.tracksandclips.com/" />
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  21.  
  22. <meta name="keywords" content="Tracks, Clips, Random, Hits, Random hits, Random Tracks, Random Clips, Music, Video, Music Video, Free Online Music, Free, Online, Music, top 40, Rock, Pop, Jazz, Big Band" />
  23. <meta name="description" content="Tracks And Clips .com is the best site to listen to the best Tracks and Video Clips. We Play a random hit and with this track we play a random video." />
  24. <meta name='Author' content="Stef ter Braak" />
  25. <meta name='Copyright' content="2011 tracksandclips.com" />
  26. <meta name="robots" content="index, follow" />
  27. <meta name="revisit-after" content="7 days" />
  28.  
  29.  
  30.  
  31. <link href="style.css" rel="stylesheet" type="text/css" />
  32. <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
  33. <script type="text/javascript">
  34.  
  35.   var _gaq = _gaq || [];
  36.   _gaq.push(['_setAccount', 'UA-22730916-1']);
  37.   _gaq.push(['_trackPageview']);
  38.  
  39.   (function() {
  40.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  41.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  42.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  43.   })();
  44.  
  45. </script>
  46. <script type="text/javascript">
  47. // JavaScript Document
  48. //Instellingen
  49. //Dit laten zien bij geen vorig liedje beschikbaar
  50. var lineNoPreviousSong = "No previous song available.";
  51. //laatste 20 liedje onthouden die zijn afgespeeld
  52. var songsToRemember = 15;
  53. //liedjes die we niet meer willen.
  54. var dontPlay = 5;
  55. //debug
  56. debug = false;
  57.  
  58.  
  59. //Youtube functies
  60. //Als de video geladen is.
  61. var ytplayer;
  62. function onYouTubePlayerReady(id) {
  63.     ytplayer = document.getElementById(id);
  64.     ytplayer.addEventListener("onStateChange", "onPlayerStateChange");
  65.     ytplayer.addEventListener("onError", "onPlayerError");
  66. }
  67.  
  68. var playerState = 1;
  69. function pauseVideo(imgPause,imgPlay,imgId) {
  70.     if (playerState == 2) {
  71.         ytplayer.playVideo();
  72.         $("#" + imgId).attr("src", imgPause);
  73.     } else {
  74.         ytplayer.pauseVideo();
  75.         $("#" + imgId).attr("src", imgPlay);
  76.     }
  77. }
  78.  
  79. var repeatSongActive = false;
  80. function onPlayerStateChange(state) {
  81.     //laad nieuw liedje wanneer player state = 0 bij einde liedje
  82.     playerState = state;
  83.     if (state == 0) {
  84.         if (repeatSongActive == true) {
  85.             loadYoutubePlayer(activeId, activeArtist, activeSong);
  86.         } else {
  87.             loadPlayer();
  88.         }
  89.     }
  90. }
  91.  
  92. //Deze fucntie wanneer een error voorkomt
  93. function onPlayerError(errorCode) {
  94.     //Nieuw liedje laden
  95.     loadPlayer();
  96. }
  97.  
  98. //Wanneer geladen liedje laden
  99. $(document).ready(function () {
  100.     //Laden met willekeurig liedje
  101.     loadPlayer();
  102. })
  103.  
  104. var count = 1;
  105. var moveList = true;
  106. var activeArtist = "";
  107. var activeSong = "";
  108. var activeId = "";
  109. //Laden van willekeurig liedje en afspelen
  110. function loadPlayer(previousSong) {
  111.     if (repeatSongActive == true) {
  112.         repeatSong(repeatImgId, repeatImgNormal, repeatImgNormal);
  113.     }
  114.     //Legen van musicplayer
  115.     $("#MusicPlayer").html('<div id="youtubePlayer"></div>');
  116.  
  117.     //Nieuw liedje laden dat nog niet gespeeld is
  118.     if (previousSong == null) {
  119.         var check = true
  120.         do {
  121.             var songInformation = getSong();
  122.             check = checkSongPlayedBefore(songInformation)
  123.         } while (check == true);
  124.         var song = songInformation.split(";")[0];
  125.         var title = songInformation.split(";")[1];
  126.         var songName = songInformation.split(";")[2];
  127.  
  128.         //Lijst van laatste liedjes
  129.         if (count > 1) {
  130.             count -= 1
  131.         }
  132.         generateLastSongList(song, title, songName, count);
  133.         if (count == 1 && moveList == false) {
  134.             moveList = true;
  135.         }
  136.  
  137.     } else {
  138.         songInformation = previousSong;
  139.     }
  140.  
  141.     var song = songInformation.split(";")[0];
  142.     var title = songInformation.split(";")[1];
  143.     var songName = songInformation.split(";")[2];
  144.  
  145.     //debug informatie
  146.     if (debug == true) {
  147.         var debugTxt = "Debug mode is on\n\n" + "Last " + songsToRemember + " songs Played:\n\n";
  148.  
  149.         var z = 1;
  150.         for (i = 1; i <= songsToRemember; i++) {
  151.             var valueToShift = $.cookie("song" + i);
  152.             if (valueToShift == null) {
  153.                 valueToShift = ";;";
  154.             }
  155.             debugTxt += z + ". " + valueToShift.split(";")[1] + " - " + valueToShift.split(";")[2] + "\n";
  156.             z += 1;
  157.         }
  158.  
  159.         debugTxt += "\nSong playing now:\n"
  160.         debugTxt += title + " - " + songName;
  161.  
  162.         alert(debugTxt);
  163.  
  164.     }
  165.  
  166.     //Liedje laden in youtube
  167.     loadYoutubePlayer(song, title, songName);
  168.     activeArtist = title;
  169.     activeSong = songName;
  170.     activeId = song;
  171. }
  172.  
  173. function loadYoutubePlayer(song, title, songName) {
  174.     swfobject.embedSWF("http://www.youtube.com/v/" + song + "&enablejsapi=1&playerapiid=youtubePlayer&autoplay=1&rel=0", "youtubePlayer", "426", "356", "9", null, {}, { allowScriptAccess: "always", wmode: 'transparent' }, { id: "youtubePlayer" });
  175.     $("#videoInfo").html(title + " - " + songName );
  176. }
  177.  
  178. //Om te kijken of liedje al gespeeld is
  179. function checkSongPlayedBefore(songInformation) {
  180.  
  181.     var PlayedBefore = false;
  182.     for (i = songsToRemember; i > 0; i--) {
  183.         var valueToShift = $.cookie("song" + (i - 1));
  184.         if (valueToShift == songInformation) {
  185.             PlayedBefore = true;
  186.         }
  187.     }
  188.     return PlayedBefore;
  189. }
  190.  
  191. //Lijst van laatste liedjes
  192. function generateLastSongList(song, title, songName, position) {
  193.  
  194.     if (position == 1 && moveList == true) {
  195.         for (i = songsToRemember; i > 0; i--) {
  196.             var valueToShift = $.cookie("song" + (i - 1));
  197.  
  198.             if (valueToShift == null) {
  199.                 valueToShift = ";;"
  200.             }
  201.             $.cookie("song" + i, valueToShift);
  202.         }
  203.     }
  204.     $.cookie("song" + position, song + ";" + title + ";" + songName);
  205. }
  206.  
  207. //Speel laatste liedje
  208. function playPreviousSong() {
  209.     moveList = false;
  210.     count += 1
  211.     song = $.cookie("song" + count);
  212.     if (song == ";;") {
  213.         count -= 1
  214.         alert(lineNoPreviousSong);
  215.     } else {
  216.         loadPlayer(song);
  217.     }
  218.  
  219. }
  220.  
  221. //Repeat
  222. var repeatImgNormal;
  223. var repeatImgId;
  224. function repeatSong(imgId, img_normal, img_active) {
  225.     repeatImgNormal = img_normal;
  226.     repeatImgId = imgId;
  227.     if (repeatSongActive == true) {
  228.         repeatSongActive = false;
  229.         $("#" + imgId).attr("src", img_normal);
  230.     } else {
  231.         repeatSongActive = true;
  232.         $("#" + imgId).attr("src", img_active);
  233.     }
  234. }
  235.  
  236. //Willekeurig liedje genereren
  237. function getSong() {
  238.  
  239.  
  240.         <?php
  241.         $sql = mysql_query('SELECT id, link, artiest, titel, ind FROM songs WHERE ind = "true" ') or trigger_error(mysql_error());
  242.         while($fetch = mysql_fetch_array($sql)) {
  243.         ?>
  244.         song[<?php echo $fetch['id']; ?>]="<?php echo $fetch['link'].';'.$fetch['artiest'].';'.$fetch['titel']; ?>"
  245.         <?php  
  246.         }
  247.         ?>
  248.         var songToPlay = song[Math.round(Math.random() * 445)];
  249.         return songToPlay;
  250.     }
  251. </script>
  252.  
  253. </head>
  254.  
  255. <body>
  256. <div id="container">
  257.     <div id="flags">
  258.         <a href="http://tracksandclips.com"><img src="images/flags/us.png" width="20" height="13" border="0" /></a>
  259.     </div>
  260.     <div is="google-ads">    
  261. <script type="text/javascript"><!--
  262. google_ad_client = "pub-2551796150259317";
  263. /* 728x90, created 8/7/11 */
  264. google_ad_slot = "5478828692";
  265. google_ad_width = 728;
  266. google_ad_height = 90;
  267. //-->
  268. </script>
  269. <script type="text/javascript"
  270. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  271. </script>
  272.     </div>
  273.  
  274. <div id="content-top"> </div>
  275.   <div id="content-middle">
  276.     <div id="random-image">
  277.     <a href="random-music-and-video's/"><img src="images/random-image.png" title="Next Random Song!" alt="New Song!" /></a>
  278.     </div>
  279.     <div id="image-music"></div>
  280.     <div id="logo">
  281.     <a href="random-music-and-video's/"><img src="images/logo.png" alt="Tracksandclips" /></a>
  282.     </div>
  283.     <div id="song">  
  284.       <h3><span id="videoInfo"></span>
  285. <a href="javascript:socialMedia('facebook');"><img src="images/facebook-icon.png" alt="Facebook" title="Facebook" border="0"/></a>      
  286. <a href="javascript:socialMedia('twitter');"><img src="images/twitter-icon.gif" alt="Twitter" title="Twitter" border="0"/></a>
  287.  
  288. </h3>
  289.     </div>
  290.       <div id="linker-buttons">
  291.         <ul id="genres-links">
  292.           <li><a href="http://www.tracksandclips.com/golden-oldies/">Golden Oldies</a></li>
  293.           <li><a href="http://www.tracksandclips.com/90's/">90's</a></li>
  294.           <li><a href="http://www.tracksandclips.com/zeroes/">Zeroes</a></li>
  295.           <li><a href="http://www.tracksandclips.com/top-40/">Top 40</a></li>
  296.           <li><a href="http://www.tracksandclips.com/hip-hop/">Hip Hop</a></li>
  297.           <li><a href="http://www.tracksandclips.com/dance/">Dance</a></li>
  298.           <li><a href="http://www.tracksandclips.com/rock/">Rock</a></li>
  299.           <li><a href="http://www.tracksandclips.com/jazz/">Jazz</a></li>
  300.           <li><a href="http://www.tracksandclips.com/blues/">Blues</a></li>
  301.           <li><a href="http://www.tracksandclips.com/classical/">Classical</a></li>            
  302.         </ul>
  303.         <img onclick="javascript:showInlinePage('verstuur_report.php','500','500')" title="Error in video!" src="http://www.tracksandclips.com/images/error-image.png" width="43" height="44" border="0"/>
  304.         <img onclick="javascript:showInlinePage('verstuur_request.php','500','500')" title="Reguest a song!" src="http://www.tracksandclips.com/images/wdyw-image.png" width="43" height="44" border="0"/>
  305.         <img onclick="javascript:repeatSong('Image','http://www.tracksandclips.com/images/repeat-image.png','http://www.tracksandclips.com/images/repeat-image-on.png');" title="Video Repeat On/Off" id="Image" src="http://www.tracksandclips.com/images/repeat-image.png" width="43" height="44" border="0"/>
  306.  
  307.       </div>
  308.        <div id="MusicPlayer"></div>
  309.        
  310.        
  311.        
  312.       <div id="rechter-buttons">  
  313.       <ul id="genres-rechts">
  314.           <li><a href="http://www.tracksandclips.com/latin/">Latin</a></li>
  315.           <li><a href="http://www.tracksandclips.com/pop/">Pop</a></li>
  316.           <li><a href="http://www.tracksandclips.com/reggae/">Reggae</a></li>
  317.           <li><a href="http://www.tracksandclips.com/soul/">Soul</a></li>
  318.           <li><a href="http://www.tracksandclips.com/country/">Country</a></li>
  319.           <li><a href="http://www.tracksandclips.com/big-band/">Big Band</a></li>
  320.           <li><a href="http://www.tracksandclips.com/summer-hits/">Summer Hits</a></li>
  321.           <li><a href="http://www.tracksandclips.com/kids/">Kids</a></li>
  322.           <li><a href="http://www.tracksandclips.com/christmas/">Christmas</a></li>
  323.           <li><a href="http://www.tracksandclips.com/sing-and-songwriter/">Sing And Songwriter</a></li>          
  324.         </ul>        
  325.         <img onclick="javascript:playPreviousSong();" title="Back" src="http://www.tracksandclips.com/images/back-image.png" width="42" height="44" border="0" />
  326.         <img onclick="javascript:pauseVideo('http://www.tracksandclips.com/images/pause-image.png','http://www.tracksandclips.com/images/pause-image-on.png','Image9');" title="Pause/Play" id="Image9" src="http://www.tracksandclips.com/images/pause-image.png" width="42" height="44" border="0" />
  327.         <img onclick="javascript:loadPlayer();" title="F$#k this song! Next!" src="images/next-image.png" width="42" height="44" border="0" />
  328.       </div>
  329.      
  330.       <div id="facebooklike">
  331.       <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftracksandclips.com&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
  332.       </div>
  333.      <div id="twitter">
  334.       <a href="http://twitter.com/#!/stefdevnl" target="_blank"><img src="images/twitter.png" title="Follow Us On Twitter!" width="180" height="60" border="0" /></a>
  335.       </div>
  336.     </div>
  337.      
  338.   <div id="content-bottom"> </div>
  339.       <div id="googlead">
  340.         <script type="text/javascript"><!--
  341.     google_ad_client = "pub-2551796150259317";
  342.     /* 468x60, created 4/11/11 */
  343.     google_ad_slot = "6973400481";
  344.     google_ad_width = 468;
  345.     google_ad_height = 60;
  346.     //-->
  347.       </script>
  348.         <script type="text/javascript"
  349.     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  350.       </script>
  351.       </div>
  352.       <div>
  353.       &nbsp;
  354.       &nbsp;
  355.       &nbsp;
  356.       </div>
  357.       <div id="content-text">
  358.       </p>
  359.       </p>
  360.       <h1>Music Portal</h1>
  361.  
  362. Tracks and clips.com is a music portal with all categories playing random hits.
  363. On the main page you'll find many styles of music mixed together for you to enjoy your daily music needs. You can also play any category you like by clicking on the category you wish. Always random the best new hits en best oldies all time!
  364. </p>
  365. <h2>Tracks</h2>
  366.  
  367. The best tracks in all history. We sort all tracks ever made and we’ve placed the best hits ever recorded into one music portal for every age. If you have suggestions for your favorite tracks, you can suggest them by mail form! If you don’t like the track you hear you can simply click on the next button. See tracksandclips as an mood agent. Click on the category fitting your current mood and you will experience a surprisingly good music flow.
  368. </p>
  369. <h2>Clips</h2>
  370.  
  371. With every track there is a clip. Sometimes music video clips and sometimes a clip without the video. We add the clips with the best quality of music for an optimal experience.
  372. There even are clips with a lyric so you can finally understand that one word you’ve always wondered what it was or just to sing along an oldie. If you’ve noticed a better clip you can contact us so we can upload this.
  373. </p>
  374. <h2>Random music</h2>
  375.  
  376. Tracksandclips plays random music in every category on the index page. We pick the best hits in almost every category and place this on our home page. For more specified random music you can click the category you like. The fun of listening to random music is the surprise factor. Because every song you hear is a hit, it’s most likely you know every song and if not it’s time to know the song! Tracks and clips random music and video’s wishes you a great time on this website!  
  377.  
  378.       </div>
  379.       <div id="copyright"> &copy;<?php echo date(Y) ?> <a href="http://tracksandclips.com" target="_blank">Tracksandclips.com</a> - info@tracksandclips.com - Hosted by: <a href="http://www.stefdev.nl" target="_blank">StefDev.nl</a></div>
  380.     </div>
  381.   </div>
  382. </div>
  383. </body>
  384. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement