HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/www/archive/demo/functions/_stats.php
<?php

function db_size() {
	$rows = mysql_query("SHOW TABLE STATUS");
	$dbsize = 0; 
	while ($row = mysql_fetch_array($rows)) $dbsize += $row['Data_length'] + $row['Index_length'];
	return file_size_info($dbsize);

}

function num_pages($active=1) {
	return quickSQL("SELECT COUNT(page_id) FROM tbl_pages WHERE page_active=".$active);
}

function num_boards($discuss=1) {
	return quickSQL("SELECT COUNT(notice_type_id) FROM tbl_notice_types WHERE notice_type_discuss=".$discuss);
}

function num_discussions() {
	return quickSQL("SELECT count(DISTINCT notice_id) FROM tbl_threads WHERE thread_active=1");
}

function num_notices($discuss=1) {
	return quickSQL("SELECT COUNT(tbl_notices.notice_id) FROM tbl_notices, tbl_notice_types WHERE tbl_notices.notice_active=1 AND tbl_notices.notice_type_id=tbl_notice_types.notice_type_id AND tbl_notice_types.notice_type_discuss=".$discuss);
}

function num_thread_mesg() {
	return quickSQL("SELECT COUNT(thread_id) FROM tbl_threads WHERE thread_active=1");
}

function num_employees($active=1) {
	return quickSQL("SELECT COUNT(eid) FROM tbl_employees WHERE is_employee=".$active);
}

?>