Z Protone\'a do Dyny


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
  2. <head>
  3. <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
  4. <meta name="Description" content=" [wstaw tu opis strony] ">
  5. <meta name="Keywords" content=" [wstaw tu slowa kluczowe] ">
  6. <meta name="Author" content=" [dane autora] ">
  7. <meta name="Generator" content="kED2">
  8.  
  9. <title> [tytu� strony] </title>
  10.  
  11. <link rel="stylesheet" href=" [nazwa_arkusza_stylow.css] " type="text/css">
  12. </head>
  13. <body>
  14.  
  15. <?php
  16.  
  17. $link = mysql_pconnect('localhost', 'root', '')
  18. or die('Nie moŹna si� po-�czyŠ: ' . mysql_error());
  19. mysql_select_db("protone");
  20.  
  21. $result2 = mysql_query('SELECT * FROM files ORDER BY ID ASC LIMIT 0,1');
  22. while ($row2 = mysql_fetch_array($result2))
  23. {
  24.  
  25. $lensec = end(explode(".",$row2['FILE_LENGTH_SEC']));
  26. $lenmin = substr($row2['FILE_LENGTH_TXT'],0,5);
  27. $len=$lenmin.'.'.$lensec;
  28.  
  29.  
  30. $id_pliku = $row2['ID'];
  31. $artist_id= $row2['ARTIST_ID'];
  32. $opis .= "Lit=\n";
  33. $opis .= "ENG=\n";
  34. $opis .= "CRD=\n";
  35. $opis .= "Tyt=".stripslashes($row2['TITLE'])."\n";
  36. $opis .= "Pta=\n";
  37.  
  38. $result3 = mysql_query('SELECT * FROM station_files WHERE ID = "'.$id_pliku.'" LIMIT 0,1');
  39. while ($row3 = mysql_fetch_array($result3))
  40. {
  41. //cue
  42. $startsec = end(explode(".",$row3['CUE_START_SEC']));
  43. $startsek = $row3['CUE_START_SEC'];
  44. $startmin = substr($row3['CUE_START_TXT'],0,5);
  45. $start=$startmin.'.'.$startsec;
  46.  
  47. $introsec = end(explode(".",$row3['CUE_INTRO_SEC']));
  48. $intromin = substr($row3['CUE_INTRO_TXT'],0,5);
  49. $intro=$intromin.'.'.$introsec;
  50.  
  51. $endsec = end(explode(".",$row3['CUE_END_SEC']));
  52. $endsek = $row3['CUE_END_SEC'];
  53. $endmin = substr($row3['CUE_END_TXT'],0,5);
  54. $end=$endmin.'.'.$endsec;
  55.  
  56. $mixsec = end(explode(".",$row3['CUE_MIX_SEC']));
  57.  
  58. $mixsek = $row3['CUE_MIX_SEC'];
  59. $mixmin = substr($row3['CUE_MIX_TXT'],0,5);
  60. $mix=$mixmin.'.'.$mixsec;
  61.  
  62.  
  63. $miks = ($endsek-$mixsek);
  64. echo $miks;
  65.  
  66. $miks = ($endsek-$mixsek);
  67.  
  68. $czlon=explode(".",$miks);
  69. $miksuj = "00:";
  70. if ($czlon[0]<10) $miksuj .= "0".$miks;
  71. else $miksuj .= $miks;
  72. }
  73.  
  74.  
  75. $result3 = mysql_query('SELECT * FROM artists WHERE id = '.$artist_id.' LIMIT 0,1');
  76. while ($row3 = mysql_fetch_array($result3))
  77. {
  78. //artist
  79. $wykon=$row3['name'];
  80. }
  81.  
  82.  
  83.  
  84. $opis .= "Wyk=".stripslashes($wykon)."\n";
  85.  
  86.  
  87. $opis .= "Sol=\n";
  88. $opis .= "Kom=\n";
  89. $opis .= "Aut=\n";
  90. $opis .= "Pro=\n";
  91. $opis .= "Wyd=\n";
  92. $opis .= "Rok=\n";
  93. $opis .= "Kod=\n";
  94. $opis .= "Ktg=\n";
  95. $opis .= "BPM=\n";
  96. $opis .= "Zak=\n";
  97. $opis .= "Tmc=\n";
  98. $opis .= "Tmi=\n";
  99. $opis .= "Tmo=\n";
  100. $opis .= "Gen=\n";
  101. $opis .= "Era=\n";
  102. $opis .= "Typ=\n";
  103. $opis .= "Nas=\n";
  104. $opis .= "Nar=\n";
  105. $opis .= "Jak=\n";
  106. $opis .= "Klu=\n";
  107. $opis .= "Fil=\n";
  108. $opis .= "PTY=0\n";
  109. $opis .= "PS1=\n";
  110. $opis .= "PS2=\n";
  111. $opis .= "PS3=\n";
  112. $opis .= "PS4=\n";
  113. $opis .= "PLK=".$id_pliku."\n";
  114.  
  115. $opis .= "Tot=".$len."\n";
  116. $opis .= "Int=".$intro."\n";
  117. $opis .= "Out=00:00.000\n";
  118. $opis .= "Mix=".$miksuj."\n";
  119. $opis .= "Mik=".$mix."\n";
  120. $opis .= "NwP=".$start."\n";
  121. $opis .= "NwK=".$end."\n";
  122. $opis .= "FIn=00:00.000\n";
  123. $opis .= "FOu=00:00.000\n";
  124. $opis .= "LpP=-00:00.001\n";
  125. $opis .= "LpK=-00:00.001\n";
  126. $opis .= "FrP=-00:00.001\n";
  127. $opis .= "FrK=-00:00.001\n";
  128. $opis .= "Zaa=\n";
  129.  
  130.  
  131.  
  132.  
  133. }
  134.  
  135. $fp = fopen(''.$id_pliku.'.DAT', 'w');
  136. fwrite($fp, $opis);
  137. fclose($fp);
  138.  
  139. // ha!
  140. ?>
  141.  
  142.  
  143. </body>
  144. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.