Пример #1
0
// limitations under the License.
define('TUBEX_CONTROL_PANEL', true);
require_once 'includes/cp-global.php';
if (Config::Get('db_username') !== null) {
    include_once 'install-already-installed.php';
} else {
    if (isset($_REQUEST['db_username'])) {
        if (DatabaseTest()) {
            $control_panel_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . "/index.php";
            $password = InitializeTables();
            Config::Save($_REQUEST);
            TemplateRecompileAll();
            include_once 'install-complete.php';
        }
    } else {
        if (PreTest()) {
            $_REQUEST['db_hostname'] = 'localhost';
            include_once 'install-main.php';
        }
    }
}
function PreTest()
{
    $errors = array();
    // Test template file permissions
    foreach (glob(TEMPLATES_DIR . '/*.*') as $filename) {
        if (!is_writeable($filename)) {
            $errors[] = "Template file {$filename} has incorrect permissions; change to 666";
        }
    }
    // Test other file permissions
Пример #2
0
<div class="container">  

<div class="row">
<?php 
include_once 'top_nav.php';
?>
</div>  <!--row-->




<div class="row" > 

<?php 
if (is_online()) {
    echo 'Application is :ONLINE <br/>';
}
PreTest();
?>



</div><!--toprow-->   



</div><!--container-->  
    
   
</body>
</html>