<?php

class get_names {
	
	
	
	function get_users_name($username)
		{
			
			$q = mysql_query("SELECT * FROM `cm_users` WHERE `username` = '$username' LIMIT 1");
			$qq = mysql_fetch_object($q);
			$real_name = $qq->first_name . " " . $qq->last_name;
			return $real_name;
			
			
		}
		
		
	function get_users_name_initial($username)
		{
			
			$q = mysql_query("SELECT * FROM `cm_users` WHERE `username` = '$username' LIMIT 1");
			$qq = mysql_fetch_object($q);
			$real_name_init = substr($qq->first_name,0,1) . ". " . $qq->last_name;
			return $real_name_init;
			
			
		}
	
	
	function get_clients_name($id)
		{
			
			$q = mysql_query("SELECT * FROM `cm` WHERE `id` = '$id' LIMIT 1");
			$qq = mysql_fetch_object($q);
			$real_name = $qq->first_name . " $qq->m_initial" . " $qq->last_name";
			return $real_name;
			
			
		}
	
	
	
	
	
	
	
	
	
}











?>

<?php

class get_names {
	
	
	
	function get_users_name($username)
		{
			
			$q = mysql_query("SELECT * FROM `cm_users` WHERE `username` = '$username' LIMIT 1");
			$qq = mysql_fetch_object($q);
			$real_name = $qq->first_name . " " . $qq->last_name;
			return $real_name;
			
			
		}
	
	
	
	function get_clients_name($id)
		{
			
			$q = mysql_query("SELECT * FROM `cm` WHERE `id` = '$id' LIMIT 1");
			$qq = mysql_fetch_object($q);
			$real_name = $qq->first_name . " $qq->m_initial" . " $qq->last_name";
			return $real_name;
			
			
		}
	
	
	
	
	
	
	
	
	
}











?>

--- 
+++ 
@@ -14,7 +14,18 @@
 			
 			
 		}
-	
+		
+		
+	function get_users_name_initial($username)
+		{
+			
+			$q = mysql_query("SELECT * FROM `cm_users` WHERE `username` = '$username' LIMIT 1");
+			$qq = mysql_fetch_object($q);
+			$real_name_init = substr($qq->first_name,0,1) . ". " . $qq->last_name;
+			return $real_name_init;
+			
+			
+		}
 	
 	
 	function get_clients_name($id)
Add a function to return the profs first initial and last name.

git-svn-id: e691eac7f4e7c267eb8bf668e75dc601c2a71df8@584 54a900ba-8191-11dd-a5c9-f1483cedc3eb
