contract Owned { address owner; function Owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } } contract voipo is Owned { struct Instructor { string sipto; string sipfrom; string callsubject; uint callid; } mapping (address => Instructor) instructors; address[] public instructorAccts; event instructorInfo( string sipto, string sipfrom, string callsubject, uint callid ); function setInstructor(address _address, string _sipto, string _sipfrom , string _callsubject , uint _callid) onlyOwner public { //var instructor = instructors[_address]; instructors[_address].sipto = _sipto; instructors[_address].sipfrom = _sipfrom; instructors[_address].callsubject= _callsubject; instructors[_address].callid = _callid; instructorAccts.push(_address) -1; emit instructorInfo(_sipto ,_sipfrom, _callsubject, _callid); } function getInstructors() view public returns(address[]) { return instructorAccts; } function getInstructor(address _address) view public returns (string, string , string , uint) { return ( instructors[_address].sipto, instructors[_address].sipfrom, instructors[_address].callsubject, instructors[_address].callid ); } function countInstructors() view public returns (uint) { return instructorAccts.length; } }