<?php
    class files
    {

        public function file($file,$files)
        {
        global $files;

            if($file == 'mp3' or $file == 'midi' or $file == 'wav' or $file == 'wma')
            {
			    echo '<object width="500" height="41">
                    <param name="allowFullScreen" value="true" />
                    <param name="allowScriptAccess" value="always" />
                    <param name="wmode" value="transparent" />
                    <param name="movie" value="uppod.swf" />
                    <param name="flashvars" value="st=/download/audio127-501.txt&amp;file=/download/files_obmen/'.$files.'" />
                    <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">
                    </embed>
                </object>';

            }
            elseif($file == 'mp4' or $file == 'flv' or $file == 'avi' or $file == '3gp')
            {
                echo '<object width="500" height="375">
                    <param name="allowFullScreen" value="true" />
                    <param name="allowScriptAccess" value="always" />
                    <param name="wmode" value="transparent" />
                    <param name="movie" value="uppod.swf" />
                    <param name="flashvars" value="st=/download/video127-1094.txt&amp;file=/download/files_obmen/'.$files.'" />
                    <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="375">
                    </embed>
                    </object>';
            }

        }
		
		public function files_icon($icons_file)
		{
		global $file_while;
		    if($icons_file == 'exe'){
                echo '<div class="posts"><img src="icons/exe.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'zip'){
	            echo '<div class="posts"><img src="icons/zip.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'rar'){
	            echo '<div class="posts"><img src="icons/zip.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'txt'){
	            echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'sql'){
	            echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'jar'){
	            echo '<div class="posts"><img src="icons/txt.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'png'){
	            echo '<div class="posts"><img src="icons/image.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'gif'){
	            echo '<div class="posts"><img width="50" height="40" src="../download/files_obmen/'.$file_while['name'].'"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'jpg'){
	            echo '<div class="posts"><img width="50" height="40" src="../download/files_obmen/'.$file_while['name'].'"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'jpeg'){
	            echo '<div class="posts"><img width="50" height="40" src="../download/files_obmen/'.$file_while['name'].'"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'swf'){
	            echo '<div class="posts"><img src="icons/flash.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'php'){
	            echo '<div class="posts"><img src="icons/php.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'mp3'){
	            echo '<div class="posts"><img src="icons/mp3.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            elseif($icons_file == 'mp4'){
	            echo '<div class="posts"><img src="icons/mp4.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }
            else{
	            echo '<div class="posts"><img src="icons/file.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a><br/>Размер:'.size($file_while['size']).'</div>';
	        }

		}
    }
?>