View file system/inc/classes/files.class.php

File size: 6.13Kb
<?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['name'].'" />
                    <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><div class="line_file"></div>';

            }
            elseif($file == 'mp4' or $file == 'flv' or $file == 'avi' or $file == '3gp' or $file == 'mpg')
            {
                echo '<object width="500" height="321">
                    <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-1216.txt&amp;file=/download/files_obmen/'.$files['name'].'" />
                    <embed src="uppod.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" flashvars="st=/download/video127-1216.txt&amp;file=/download/files_obmen/'.$files['name'].'width="566" height="221"" >
                    </embed>
                    </object><div class="line_file"></div>';
            }

        }
		
		public function files_icon($icons_file)
		{
		global $file_while;
		global $timedate;
		    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> 
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }
            elseif($icons_file == 'png'){
	            echo '<div class="posts"><img  src="icons/png.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }
            elseif($icons_file == 'gif'){
	            echo '<div class="posts"> <img src="icons/gif.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }
            elseif($icons_file == 'jpg'){
	            echo '<div class="posts"> <img src="icons/jpg.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }
            elseif($icons_file == 'jpeg'){
	            echo '<div class="posts"> <img src="icons/jpeg.png"/><a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</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>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }
            else{
	            echo '<div class="posts"><img src="icons/file.png"/> <a href="files.php?id='.$file_while['id'].'">'.$file_while['names'].'</a>
				<span class="maintime">'.size($file_while['size']).'</span><br/>
				</div>';
	        }

		}
    }
?>