Location: PHPKode > projects > Mummi (Multi-user MOD_MP3 Interface) > mummi.0.6/htroot/mystats.php
<?

// Setting the title of the page
$GLOBALS[page_title] = "Stats";

// Include files
include "common.php";
include "$lib_path/design.inc";
include "$lib_path/audio-db.inc";

$adb = new AUDIO_DB;
$adb->connect("$GLOBALS[dbhost]","$GLOBALS[dbusername]","$GLOBALS[dbuserpassword]","$GLOBALS[dbname]");


// Set the user navbars.
if(!$HTTP_COOKIE_VARS[login_active]) $nav_array = array(main);
elseif($os->num_rows("SELECT user_name FROM users WHERE user_name='$session_array[user_name]' AND user_type='1'")) $nav_array = array_merge($GLOBALS[admin_navbox_array], $os->get_navbox_array($session_array[user_name]));
else $nav_array = array_merge($GLOBALS[basic_navbox_array], $os->get_navbox_array($session_array[user_name]));

$stat_array = $adb->pull_audio_stats($session_array[user_name]);
/*
$b=0;
while(list($k,$v) = each($stat_array)){
	echo "$b $k = $v<br>\n";
	$b++;
}
*/

// This is where processing needs to happen first... i think the db is getting his to fast right here.
$GLOBALS[contents00] = <<<ENDcontents00

	<table border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff">
	<tr bgcolor="#999999">
		<td colspan="2">Totals</td>
	</tr><tr bgcolor="#dddddd">
		<td>Files:&nbsp;</td>
		<td>&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>/Days/Hours/Min/Sec</td>
		<td>$stat_array[length]  ($stat_array[tseconds] seconds)</td>
	</tr><tr bgcolor="#dddddd">
		<td>Size:</td>
		<td>$stat_array[Gb_a].$stat_array[Mb_a] Gb&nbsp;</td>
	</tr></table>
	<br>



	<table border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff">
	<tr bgcolor="#999999">
		<td colspan="7">ID3 TAG INFO</td>
	</tr><tr bgcolor="#dddddd">
		<td bgcolor="#999999">VERSION&nbsp;</td>
		<td bgcolor="#999999">#&nbsp;</td>
		<td bgcolor="#999999">TITLE&nbsp;</td>
		<td bgcolor="#999999">ARTIST&nbsp;</td>
		<td bgcolor="#999999">ALBUM&nbsp;</td>
		<td bgcolor="#999999">GENRE&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>id3v11&nbsp;</td>
		<td>$stat_array[id3v11]&nbsp;</td>
		<td>$stat_array[id3v11_title_c]&nbsp;</td>
		<td>$stat_array[id3v11_artist_c]&nbsp;</td>
		<td>$stat_array[id3v11_album_c]&nbsp;</td>
		<td>$stat_array[id3v11_genres_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>id3v22&nbsp;</td>
		<td>$stat_array[id3v22]&nbsp;</td>
		<td>$stat_array[id3v22_title_c]&nbsp;</td>
		<td>$stat_array[id3v22_artist_c]&nbsp;</td>
		<td>$stat_array[id3v22_album_c]&nbsp;</td>
		<td>$stat_array[id3v22_genres_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>id3v23&nbsp;</td>
		<td>$stat_array[id3v23]&nbsp;</td>
		<td>$stat_array[id3v23_title_c]&nbsp;</td>
		<td>$stat_array[id3v23_artist_c]&nbsp;</td>
		<td>$stat_array[id3v23_album_c]&nbsp;</td>
		<td>$stat_array[id3v23_genres_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>id3v24&nbsp;</td>
		<td>$stat_array[id3v24]&nbsp;</td>
		<td>$stat_array[id3v24_title_c]&nbsp;</td>
		<td>$stat_array[id3v24_artist_c]&nbsp;</td>
		<td>$stat_array[id3v24_album_c]&nbsp;</td>
		<td>$stat_array[id3v24_genres_c]&nbsp;</td>
	</tr></table>
	<br>




	<table border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff">
	<tr bgcolor="#999999">
		<td colspan="2">MP3 INFO</td>
	</tr><tr bgcolor="#dddddd">
		<td>mpeg v1&nbsp;</td>
		<td>$stat_array[mp3_mpeg1_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>mpeg v2&nbsp;</td>
		<td>$stat_array[mp3_mpeg2_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>mpeg v2.5&nbsp;</td>
		<td>$stat_array[mp3_mpeg25_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>layer 1&nbsp;</td>
		<td>$stat_array[mp3_layer1_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>layer 2&nbsp;</td>
		<td>$stat_array[mp3_layer2_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>layer 3&nbsp;</td>
		<td>$stat_array[mp3_layer3_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>crc&nbsp;</td>
		<td>$stat_array[mp3_crc_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>padding&nbsp;</td>
		<td>$stat_array[mp3_pad_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>private&nbsp;</td>
		<td>$stat_array[mp3_priv_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>copyright&nbsp;</td>
		<td>$stat_array[mp3_copyright_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>original&nbsp;</td>
		<td>$stat_array[mp3_orig_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>ccit&nbsp;</td>
		<td>$stat_array[mp3_empccit_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>50/15ms&nbsp;</td>
		<td>$stat_array[mp3_emp50_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>emphasis&nbsp;</td>
		<td>$stat_array[mp3_emp_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>mono&nbsp;</td>
		<td>$stat_array[mp3_mono_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>dual mono&nbsp;</td>
		<td>$stat_array[mp3_dchan_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>joint stereo&nbsp;</td>
		<td>$stat_array[mp3_jstereo_c]&nbsp;</td>
	</tr><tr bgcolor="#dddddd">
		<td>stereo&nbsp;</td>
		<td>$stat_array[mp3_stereo_c]&nbsp;</td>
	</tr></table>




ENDcontents00;





























$contents = array("$GLOBALS[page_title]"=>"$GLOBALS[contents00]");
draw_header("$GLOBALS[page_title]");
draw_nav($nav_array);
draw_sect($contents);
draw_footer();
ob_end_flush();
?>
Return current item: Mummi (Multi-user MOD_MP3 Interface)