Просмотр файла system/inc/classes/files.class.php

Размер файла: 6.8Kb
  1. <?php
  2. class files
  3. {
  4.  
  5. public function file($file,$files)
  6. {
  7. global $files;
  8.  
  9. if($file == 'mp3' or $file == 'midi' or $file == 'wav' or $file == 'wma')
  10. {
  11. echo '<object width="500" height="41">
  12. <param name="allowFullScreen" value="true" />
  13. <param name="allowScriptAccess" value="always" />
  14. <param name="wmode" value="transparent" />
  15. <param name="movie" value="uppod.swf" />
  16. <param name="flashvars" value="st=/download/audio127-501.txt&amp;file=/download/files_obmen/'.$files.'" />
  17. <embed src="uppod.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" flashvars="st=/download/audio127-501.txt&amp;file=/download/files_obmen/'.$files['name'].'" width="500" height="41">
  18. </embed>
  19. </object><div class="line_file"></div>';
  20.  
  21. }
  22. elseif($file == 'mp4' or $file == 'flv' or $file == 'avi' or $file == '3gp' or $file == 'mpg')
  23. {
  24. echo '<object >
  25. <param name="allowFullScreen" value="true" />
  26. <param name="allowScriptAccess" value="always" />
  27. <param name="wmode" value="transparent" />
  28. <param name="movie" value="uppod.swf" />
  29. <param name="flashvars" value="st=/download/video127-1094.txt&amp;file=/download/files_obmen/'.$files.'" />
  30. <embed src="uppod.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" flashvars="st=/download/video127-1094.txt&amp;file=/download/files_obmen/'.$files['name'].'" width="500" height="310">
  31. </embed>
  32. </object><div class="line_file"></div>';
  33. }
  34.  
  35. }
  36. public function files_icon($icons_file)
  37. {
  38. global $file_while;
  39. global $timedate;
  40. if($icons_file == 'exe'){
  41. echo '<div class="posts"><img src="icons/exe.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a> <span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  42. Размер:'.size($file_while['size']).'</div>';
  43. }
  44. elseif($icons_file == 'zip'){
  45. echo '<div class="posts"><img src="icons/zip.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  46. Размер:'.size($file_while['size']).'</div>';
  47. }
  48. elseif($icons_file == 'rar'){
  49. echo '<div class="posts"><img src="icons/zip.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  50. Размер:'.size($file_while['size']).'</div>';
  51. }
  52. elseif($icons_file == 'txt'){
  53. echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  54. Размер:'.size($file_while['size']).'</div>';
  55. }
  56. elseif($icons_file == 'sql'){
  57. echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  58. Размер:'.size($file_while['size']).'</div>';
  59. }
  60. elseif($icons_file == 'jar'){
  61. echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  62. Размер:'.size($file_while['size']).'</div>';
  63. }
  64. elseif($icons_file == 'png'){
  65. echo '<div class="posts"><img src="icons/png.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  66. Размер:'.size($file_while['size']).'</div>';
  67. }
  68. elseif($icons_file == 'gif'){
  69. echo '<div class="posts"> <img src="icons/gif.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  70. Размер:'.size($file_while['size']).'</div>';
  71. }
  72. elseif($icons_file == 'jpg'){
  73. echo '<div class="posts"> <img src="icons/jpg.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  74. Размер:'.size($file_while['size']).'</div>';
  75. }
  76. elseif($icons_file == 'jpeg'){
  77. echo '<div class="posts"> <img src="icons/jpeg.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  78. Размер:'.size($file_while['size']).'</div>';
  79. }
  80. elseif($icons_file == 'swf'){
  81. echo '<div class="posts"><img src="icons/flash.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  82. Размер:'.size($file_while['size']).'</div>';
  83. }
  84. elseif($icons_file == 'php'){
  85. echo '<div class="posts"><img src="icons/php.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  86. Размер:'.size($file_while['size']).'</div>';
  87. }
  88. elseif($icons_file == 'mp3'){
  89. echo '<div class="posts"><img src="icons/mp3.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  90. Размер:'.size($file_while['size']).'</div>';
  91. }
  92. elseif($icons_file == 'mp4'){
  93. echo '<div class="posts"><img src="icons/mp4.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  94. Размер:'.size($file_while['size']).'</div>';
  95. }
  96. else{
  97. echo '<div class="posts"><img src="icons/file.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><span class="maintime">'.$timedate->times($file_while['time']).'</span><br/>
  98. Размер:'.size($file_while['size']).'</div>';
  99. }
  100.  
  101. }
  102. }
  103. ?>