TVProjects top



TVProjects bottom
You are not registered.
Registration allows you to subscribe to projects, open projects, and more. Click here to register.

Website Source Code
<< Back

source.php

<?php
    
function get_source()
    {
        
$folders = array('css''projects_images''images''projects_media''projects_logos''tiny_mce''templates');
        
$files = array('.htaccess''admin.php''comments.php''bugtracker.php''create.php''config.php''downloads.php''db.php''index.php''my_profile.php''media.php''profile.php''news.php''register.php''project.php''search.php''rss.php''source.php''templates.php''subscriptions.php''users.php');
        
        
$list '';
        if (isset(
$_GET['show']))
        {
            
$file $_GET['show'];
            
            if (
$file == 'htaccess')
                
$file '.htaccess';
            
            
$list .= '<a href="source/"> << Back</a><br /><br />';
            
$list .= '<span style="font-size: 20px">'.htmlentities($file).'</span><br /><hr />';
            
$list .= '<div style="background-color: #eeeeee">';
            
            if (
$file == 'config.php')
                
$list .= '<i>Forbidden.</i>';
            elseif (
in_array($file$files))
                
$list .= highlight_string(file_get_contents($file), true);
            else
                
$list .= 'Not in allowed files list.';
            
            
$list .= '</div>';
        }
        else
        {
            foreach (
$folders as $folder)
            {
                
$list .= '<div style="float: left; width: 200px"><img src="images/folder.png" alt="folder" style="vertical-align: middle" /> <a href="'$folder '/">'.$folder.'</a></div>';
            }
            
            foreach (
$files as $file)
            {
                
$list .= '<div style="float: left; width: 200px"><img src="images/php_file.jpg" alt="file" style="vertical-align: middle; margin-bottom: 5px" /> <a href="source/'. ($file == '.htaccess' 'htaccess' $file) . '">'.$file.'</a></div>';
            }
        }
        
        
$vars['LIST'] = $list;
        return 
get_template('source'$vars);
    }
?>