<commit_before><?php
require_once("includes/dvrui_hdhrjson.php");
require_once("includes/dvrui_common.php");
require_once("vars.php");
clearCache();
echo '<pre>';
echo "---------- OS and ENV VARIABLES ------------------------------------------------\n";
echo 'Operating System = ' . php_uname() . "\n";
echo 'HTTP_HOST = ' . getenv('HTTP_HOST') . "\n";
echo 'SERVER_NAME = ' . getenv('SERVER_NAME') . "\n";
echo 'SERVER_ADDR = ' . getenv('SERVER_ADDR') . "\n";
echo 'SERVER_SOFTWARE = ' . getenv('SERVER_SOFTWARE') . "\n";
echo 'SYS TEMP = ' . sys_get_temp_dir() . "\n";
echo "---------- PHP INFO -------------------------------------------------------------\n";
echo 'php version = ' . phpversion() . "\n";
echo 'php.ini file = ' . php_ini_loaded_file() . "\n";
echo 'php.ini date.timezone = ' . ini_get('date.timezone') . "\n";
echo 'date_default_timezone_get() = ' . date_default_timezone_get() . "\n";
echo "---------- DVRUI VARS -----------------------------------------------------------\n";
echo 'DVRUI_name = ' . DVRUI_Vars::DVRUI_name . "\n";
echo 'DVRUI_version = ' . DVRUI_Vars::DVRUI_version . "\n";
echo 'DVRUI_TZ = ' . DVRUI_Vars::DVRUI_TZ . "\n";
echo 'DVRUI_discover_cache = ' . DVRUI_Vars::DVRUI_discover_cache . "\n";
echo 'DVRUI_upcoming_cache = ' . DVRUI_Vars::DVRUI_upcoming_cache . "\n";
echo "---------- PERMISSIONS -----------------------------------------------------------\n";
echo 'style = ' . substr(sprintf('%o', fileperms('style')), -4) . "\n";
echo 'themes = ' . substr(sprintf('%o', fileperms('themes')), -4) . "\n";
echo 'themes/default = ' . substr(sprintf('%o', fileperms('themes/default')), -4) . "\n";
echo 'themes/default/style.css = ' . substr(sprintf('%o', fileperms('themes/default/style.css')), -4) . "\n";
echo 'themes/default/m_style.css = ' . substr(sprintf('%o', fileperms('themes/default/m_style.css')), -4) . "\n";

$hdhr = new DVRUI_HDHRjson();
$devices =  $hdhr->device_count();
$hdhr_data = '';
echo "---------- HDHR TUNERS-----------------------------------------------------------\n";
for ($i=0; $i < $devices; $i++) {
	echo 'tuner(' . $i . ') id: ' . $hdhr->get_device_id($i) . "\n";
	echo 'tuner(' . $i . ') model: ' . $hdhr->get_device_model($i) . "\n";
	echo 'tuner(' . $i . ') firmware: ' . $hdhr->get_device_firmware($i) . "\n";
	echo 'tuner(' . $i . ') baseurl: ' . $hdhr->get_device_baseurl($i) . "\n";
}

echo "---------- HDHR DVR ENGINES------------------------------------------------------\n";
$engines = $hdhr->engine_count();
for ($i=0; $i < $engines; $i++) {
	echo 'dvr(' . $i . ') name: ' . $hdhr->get_engine_name($i) . "\n";
	echo 'dvr(' . $i . ') version: ' . $hdhr->get_engine_version($i) . "\n";
	echo 'dvr(' . $i . ') discover URL: ' . $hdhr->get_engine_discoverURL($i) . "\n";
	echo 'dvr(' . $i . ') storage URL: ' . $hdhr->get_engine_storage_url($i) . "\n";
	echo 'dvr(' . $i . ') storage ID: ' . $hdhr->get_engine_storage_id($i) . "\n";
	echo 'dvr(' . $i . ') local IP: ' . $hdhr->get_engine_local_ip($i) . "\n";

}<commit_msg>Add auth strings to diagnostics page<commit_after><?php
require_once("includes/dvrui_hdhrjson.php");
require_once("includes/dvrui_common.php");
require_once("vars.php");
clearCache();
echo '<pre>';
echo "---------- OS and ENV VARIABLES ------------------------------------------------\n";
echo 'Operating System = ' . php_uname() . "\n";
echo 'HTTP_HOST = ' . getenv('HTTP_HOST') . "\n";
echo 'SERVER_NAME = ' . getenv('SERVER_NAME') . "\n";
echo 'SERVER_ADDR = ' . getenv('SERVER_ADDR') . "\n";
echo 'SERVER_SOFTWARE = ' . getenv('SERVER_SOFTWARE') . "\n";
echo 'SYS TEMP = ' . sys_get_temp_dir() . "\n";
echo "---------- PHP INFO -------------------------------------------------------------\n";
echo 'php version = ' . phpversion() . "\n";
echo 'php.ini file = ' . php_ini_loaded_file() . "\n";
echo 'php.ini date.timezone = ' . ini_get('date.timezone') . "\n";
echo 'date_default_timezone_get() = ' . date_default_timezone_get() . "\n";
echo "---------- DVRUI VARS -----------------------------------------------------------\n";
echo 'DVRUI_name = ' . DVRUI_Vars::DVRUI_name . "\n";
echo 'DVRUI_version = ' . DVRUI_Vars::DVRUI_version . "\n";
echo 'DVRUI_TZ = ' . DVRUI_Vars::DVRUI_TZ . "\n";
echo 'DVRUI_discover_cache = ' . DVRUI_Vars::DVRUI_discover_cache . "\n";
echo 'DVRUI_upcoming_cache = ' . DVRUI_Vars::DVRUI_upcoming_cache . "\n";
echo "---------- PERMISSIONS -----------------------------------------------------------\n";
echo 'style = ' . substr(sprintf('%o', fileperms('style')), -4) . "\n";
echo 'themes = ' . substr(sprintf('%o', fileperms('themes')), -4) . "\n";
echo 'themes/default = ' . substr(sprintf('%o', fileperms('themes/default')), -4) . "\n";
echo 'themes/default/style.css = ' . substr(sprintf('%o', fileperms('themes/default/style.css')), -4) . "\n";
echo 'themes/default/m_style.css = ' . substr(sprintf('%o', fileperms('themes/default/m_style.css')), -4) . "\n";

$hdhr = new DVRUI_HDHRjson();
$devices =  $hdhr->device_count();
$hdhr_data = '';
echo "---------- HDHR TUNERS-----------------------------------------------------------\n";
for ($i=0; $i < $devices; $i++) {
	echo 'tuner(' . $i . ') id: ' . $hdhr->get_device_id($i) . "\n";
	echo 'tuner(' . $i . ') model: ' . $hdhr->get_device_model($i) . "\n";
	echo 'tuner(' . $i . ') firmware: ' . $hdhr->get_device_firmware($i) . "\n";
	echo 'tuner(' . $i . ') baseurl: ' . $hdhr->get_device_baseurl($i) . "\n";
	echo 'tuner(' . $i . ') auth: ' . $hdhr->get_device_auth($i) . "\n";
}

echo "---------- HDHR DVR ENGINES------------------------------------------------------\n";
	echo ' auth: ' . $hdhr->get_auth() . "\n";
$engines = $hdhr->engine_count();
for ($i=0; $i < $engines; $i++) {
	echo 'dvr(' . $i . ') name: ' . $hdhr->get_engine_name($i) . "\n";
	echo 'dvr(' . $i . ') version: ' . $hdhr->get_engine_version($i) . "\n";
	echo 'dvr(' . $i . ') discover URL: ' . $hdhr->get_engine_discoverURL($i) . "\n";
	echo 'dvr(' . $i . ') storage URL: ' . $hdhr->get_engine_storage_url($i) . "\n";
	echo 'dvr(' . $i . ') storage ID: ' . $hdhr->get_engine_storage_id($i) . "\n";
	echo 'dvr(' . $i . ') local IP: ' . $hdhr->get_engine_local_ip($i) . "\n";

}
{'fraction_non_alphanumeric': 0.3446704637917006, 'fraction_numerical': 0.002278275020341741, 'mean_word_length': 2.2245540398740817, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, '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': '1504503', 'n_tokens_mistral': 2254, 'n_tokens_neox': 2239, 'n_words': 431}