irm-1.6-b3/include/tracking.class.php
// Functions below here are not in the tracking class but need to be refactored into it.
Functions below here are not in the tracking class but need to be refactored into it.
Functions below here are not in the tracking class but need to be refactored into it .
function deviceTracking($ID,$devicetype)
{
	$DB = Config::Database();
	$qID = $DB->getTextValue($ID);
	if ($_REQUEST['showtracking'] != 'none')
	{
		if ($devicetype == "Computers")
		{
			$q = "SELECT DISTINCT(ID) FROM tracking
				WHERE (tracking.computer = $qID
				AND tracking.is_group='no'
				AND (tracking.device IS NULL OR tracking.device = '' OR tracking.device = 'computers')
				)";
		} else {
			$q = "SELECT DISTINCT(ID) FROM tracking
				WHERE (tracking.computer = $qID
				AND tracking.is_group='no'
				AND tracking.device = '$devicetype'
				)";
		}
		if ($_REQUEST['showtracking'] == 'open')
		{
			$q .= " AND tracking.status != 'complete'";
		}
		$q .= ' ORDER BY date DESC';
		$data = $DB->getCol($q);
		Tracking::displayHeader();
  		foreach ($data as $tID)
  		{
			$track2 = new Tracking($tID);
			$track2->display(@$_REQUEST['showfollowups']);
  		}
		Tracking::displayFooter();
	}
}
function deviceTracking ( $ ID , $ devicetype ) { $ DB = Config :: Database ( ) ; $ qID = $ DB -> getTextValue ( $ ID ) ; if ( $ _REQUEST [ 'showtracking' ] != 'none' ) { if ( $ devicetype == " Computers " ) { $ q = " SELECT DISTINCT(ID) FROM tracking
				WHERE (tracking.computer =  $ qID 
				AND tracking.is_group='no'
				AND (tracking.device IS NULL OR tracking.device = '' OR tracking.device = 'computers')
				) " ; } else { $ q = " SELECT DISTINCT(ID) FROM tracking
				WHERE (tracking.computer =  $ qID 
				AND tracking.is_group='no'
				AND tracking.device = ' $ devicetype '
				) " ; } if ( $ _REQUEST [ 'showtracking' ] == 'open' ) { $ q .= "  AND tracking.status != 'complete' " ; } $ q .= ' ORDER BY date DESC' ; $ data = $ DB -> getCol ( $ q ) ; Tracking :: displayHeader ( ) ; foreach ( $ data as $ tID ) { $ track2 = new Tracking ( $ tID ) ; $ track2 -> display ( @ $ _REQUEST [ 'showfollowups' ] ) ; } Tracking :: displayFooter ( ) ; } }
Functions below here are not in the tracking class but need to be refactored into it.
Functions below here are not in the tracking class but need to be refactored into it .