<commit_before><?php

/**
 * Name: Theme base
 * Programmer: <NAME>
 * Description: The base theme.
 * Date: 09/30/13
 */

//includes
if(!(defined('ABSPATH'))){
    require_once('./path.php');
}
include_once(ABSPATH.'includes/controllers/get_ip.php');

//Setup the user's Session
if(!(isset($_SESSION))){
    session_start();
}

//Define variables

    //Page Title
    $title = '';

    //Main div id
    $main_id = '';

    //Video details enable
    $details = false;

    //Page to include
    $page = '';

    //Enable/Disable the nav bar
    $nav = true;

//Figure out what the user is requesting
if(isset($_REQUEST['p'])){
    $request = $_REQUEST['p'];
}else{
    $request = 'home';
}

//Send error messages to pages
if(isset($_REQUEST['e'])){
    $_SESSION['e'] = $_REQUEST['e'];

}

//var_dump($_SESSION);

//$_SESSION['user_id'] = '1';
//var_dump(isset($_SESSION['user_id']));
//Figure out if the user is on the local area network
if(!(is_local())){
    if(!(isset($_SESSION['user_id']))){
        $request = 'login';
    }
}

//Determine what page the user is looking for
switch($request){

    case 'login':
        $main_id = 'login';
        $page = 'login_form.php';
        $nav = false;
    break;

    case 'home':
        $main_id = 'home';
        $page = 'home.php';
    break;

    case 'tv':
        $main_id = 'home';
        $page = 'tv.php';
    break;

    case 'video':
        $main_id = 'player';
        $page = 'player.php';<commit_msg>Commented out broken login code.<commit_after><?php

/**
 * Name: Theme base
 * Programmer: <NAME>
 * Description: The base theme.
 * Date: 09/30/13
 */

//includes
if(!(defined('ABSPATH'))){
    require_once('./path.php');
}
include_once(ABSPATH.'includes/controllers/get_ip.php');

//Setup the user's Session
if(!(isset($_SESSION))){
    session_start();
}

//Define variables

    //Page Title
    $title = '';

    //Main div id
    $main_id = '';

    //Video details enable
    $details = false;

    //Page to include
    $page = '';

    //Enable/Disable the nav bar
    $nav = true;

//Figure out what the user is requesting
if(isset($_REQUEST['p'])){
    $request = $_REQUEST['p'];
}else{
    $request = 'home';
}

//Send error messages to pages
if(isset($_REQUEST['e'])){
    $_SESSION['e'] = $_REQUEST['e'];

}

//var_dump($_SESSION);

//$_SESSION['user_id'] = '1';
//var_dump(isset($_SESSION['user_id']));
//Figure out if the user is on the local area network
/*
if(!(is_local())){
    if(!(isset($_SESSION['user_id']))){
        $request = 'login';
    }
}
*/

//Determine what page the user is looking for
switch($request){

    case 'login':
        $main_id = 'login';
        $page = 'login_form.php';
        $nav = false;
    break;

    case 'home':
        $main_id = 'home';
        $page = 'home.php';
    break;

    case 'tv':
        $main_id = 'home';
        $page = 'tv.php';
    break;

    case 'video':
        $main_id = 'player';
        $page = 'player.php';
{'fraction_non_alphanumeric': 0.19271009112386095, 'fraction_numerical': 0.004724940938238272, 'mean_word_length': 2.6234718826405867, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2512782', 'n_tokens_mistral': 1032, 'n_tokens_neox': 999, 'n_words': 251}