<?php
class UserInfo
{
    var $address;
    var $general;
    var $address_pool;
    
    function UserInfo($id='',$profile='student')
    {
	$this->address_pool = db_request(db_execute('select * from students_join_address where student_id = '.$id));
	if(count($this->address_pool) == 1)
	{
//	    var_dump($this->address_pool[1]['ADDRESS_ID']);
	    $this->address = db_request(db_execute('select * from address where address_id = '.$this->address_pool[1]['ADDRESS_ID']));
//	    var_dump($this->address);
	}
    }
    
    function getAddress($arg)
    {
	return $this->address[1][$arg];
    }
    
    function blockTitle($text='')
    {
	echo '<TABLE border=0 width=100%><TR bgcolor=#AABBFF align=center><TD>'._($text).'</TD></TR></TABLE>';
    }
}
?>