Log Out"; } else { $links = <<Log In Register HTML; } return $links .= "Help"; } function debug_db_info(): string { $total_time = round(microtime(true) - START, 4); return '
'. $total_time . ' Seconds, ' . db()->count . ' Queries
'; } function right_nav(): string { if (user() === false) return ''; // Flashy numbers if they're low $hp = (user()->currenthp <= (user()->maxhp / 5)) ? "*" . user()->currenthp . "*" : user()->currenthp; $mp = (user()->currentmp <= (user()->maxmp / 5)) ? "*" . user()->currentmp . "*" : user()->currentmp; $template = render('right_nav', ['hp' => $hp, 'mp' => $mp]); if (is_htmx()) $template = '"; return $template; } function left_nav(): string { if (user() === false) return ''; $template = render('left_nav'); if (is_htmx()) $template = '
'.$template."
"; return $template; } function babblebox(): string { return render('babblebox', ['messages' => babblebox_messages()]); } function debug_query_log(): string { $html = '
';
	foreach (db()->log as $record) {
		$query_string = str_replace(["\r\n", "\n", "\r"], ' ', $record[0]);
		$error_string = !empty($record[2]) ? '// '.$record[2] : '';
		$html .= '
['.round($record[1], 2)."s] {$query_string}{$error_string}
"; } return $html . '
'; }