function printView()
    {
        ?>
		<div class="member-homepage-box">
			<h3>
				<a class="pull-right" href="?view=_edit_me"><small>Edit</small></a>
				My Family
			</h3>
			<?php 
        $family = $GLOBALS['system']->getDBObject('family', $GLOBALS['member_user_system']->getCurrentMember('familyid'));
        unset($family->fields['status']);
        $family->printCustomSummary(array($this, 'printFamilyMembers'));
        ?>
		</div>

		<?php 
        if ($GLOBALS['system']->featureEnabled('ROSTERS&SERVICES')) {
            ?>
			<div class="member-homepage-box">
			<h3>
				<a class="pull-right" href="?view=_edit_ical"><small>Subscribe</small></a>
				My Roster Allocations &nbsp;
			</h3>
			<?php 
            $GLOBALS['system']->includeDBClass('roster_role_assignment');
            $rallocs = Roster_Role_Assignment::getUpcomingAssignments($GLOBALS['member_user_system']->getCurrentMember('id'), NULL);
            if ($rallocs) {
                ?>
				<table class="table table-auto-width">
				<?php 
                foreach ($rallocs as $date => $allocs) {
                    ?>
					 <tr>
						 <th><?php 
                    echo date('j M', strtotime($date));
                    ?>
</th>
						 <td>
							<?php 
                    foreach ($allocs as $alloc) {
                        echo $alloc['cong'] . ' ' . $alloc['title'] . '<br />';
                    }
                    ?>
						 </td>
					 </tr>
					 <?php 
                }
                ?>
				</table>
				<?php 
            } else {
                ?>
				<p><i>None</i></p>
				<?php 
            }
            ?>
			</div>
			<?php 
        }
        $GLOBALS['system']->includeDBClass('person_group');
        $groups = Person_Group::getGroups($GLOBALS['member_user_system']->getCurrentMember('id'), FALSE, TRUE);
        if (count($groups) > 1) {
            echo '<div  class="member-homepage-box" >';
            echo '<h3>My Groups</h3>';
            echo '<ul>';
            foreach ($groups as $id => $details) {
                echo '<li><a href="?view=_groups&groupid=' . (int) $id . '">' . ents($details['name']) . '</a></li>';
            }
            echo '</ul>';
            echo '</div>';
        }
    }
    print_widget('plan_reference_date', array('type' => 'date'), NULL);
    ?>
</p>
			</div>
			<div class="modal-footer">
				<button type="submit" class="btn" accesskey="s">Go</button>
				<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
			</div>
		</form>
	</div>
	<?php 
}
// -------ADD TO GROUP MODAL --------- //
$can_add_group = FALSE;
$GLOBALS['system']->includeDBClass('person_group');
$groups = Person_Group::getGroups($person->id);
if ($GLOBALS['user_system']->havePerm(PERM_EDITPERSON)) {
    ?>
	<div id="add-group-modal" class="modal hide fade" role="dialog" aria-hidden="true">
		<form method="post">
			<input type="hidden" name="view" value="_edit_group" />
			<input type="hidden" name="personid" value="<?php 
    echo $person->id;
    ?>
" />
			<input type="hidden" name="action" value="add_member" />
			<input type="hidden" name="overwrite_membership" value="1" />
			<input type="hidden" name="back_to" value="persons" />

			<div class="modal-header">
				<h4>Add <?php 
</td>
			<td><?php 
    $dummy_person->printFieldValue('age_bracket');
    ?>
</td>
			<td><?php 
    $dummy_person->printFieldValue('gender');
    ?>
</td>
			<?php 
    if (defined('PERSON_LIST_SHOW_GROUPS') && PERSON_LIST_SHOW_GROUPS) {
        ?>
					<td>  
				  	  <?php 
        $gstr = '';
        foreach (Person_Group::getGroups($id) as $gid => $gdetail) {
            if (strlen($gstr)) {
                $gstr .= ', ';
            }
            $gstr = $gstr . $gdetail['name'];
        }
        if (strlen($gstr)) {
            ?>
							<a title="<?php 
            echo ents($gstr);
            ?>
" href="?view=persons&personid=<?php 
            echo $id;
            ?>
#groups">	
								<?php 
    function printView()
    {
        $GLOBALS['system']->includeDBClass('member');
        ?>
		<div class="member-homepage-box visible-phone">
			<h3>Search people</h3>
			<form method="get" class="form-inline">
				<input type="hidden" name="view" value="people" />
				<input name="search" type="text" placeholder="Enter name to search" value="<?php 
        echo ents(array_get($_REQUEST, 'search'));
        ?>
">
				<button data-action="search" class="btn" type="submit">Search</button>
			</form>
		</div>

		<div class="member-homepage-box">
			<h3>
				<a class="pull-right" href="?view=_edit_me"><small>Edit</small></a>
				My Family
			</h3>
			<?php 
        $family = $GLOBALS['system']->getDBObject('family', $GLOBALS['member_user_system']->getCurrentMember('familyid'));
        unset($family->fields['status']);
        $family->printCustomSummary(array($this, 'printFamilyMembers'));
        ?>
		</div>

		<?php 
        if ($GLOBALS['system']->featureEnabled('ROSTERS&SERVICES')) {
            ?>
			<div class="member-homepage-box">
			<h3>
				<a class="pull-right" href="?view=_edit_ical"><small>Subscribe</small></a>
				My Roster Allocations &nbsp;
			</h3>
			<?php 
            $GLOBALS['system']->includeDBClass('roster_role_assignment');
            $rallocs = Roster_Role_Assignment::getUpcomingAssignments($GLOBALS['member_user_system']->getCurrentMember('id'), NULL);
            if ($rallocs) {
                ?>
				<table class="table table-auto-width">
				<?php 
                foreach ($rallocs as $date => $allocs) {
                    ?>
					 <tr>
						 <th><?php 
                    echo date('j M', strtotime($date));
                    ?>
</th>
						 <td>
							<?php 
                    foreach ($allocs as $alloc) {
                        echo $alloc['cong'] . ' ' . $alloc['title'] . '<br />';
                    }
                    ?>
						 </td>
					 </tr>
					 <?php 
                }
                ?>
				</table>
				<?php 
            } else {
                ?>
				<p><i>None</i></p>
				<?php 
            }
            ?>
			</div>
			<?php 
        }
        $GLOBALS['system']->includeDBClass('person_group');
        $groups = Person_Group::getGroups($GLOBALS['member_user_system']->getCurrentMember('id'), FALSE, TRUE);
        if (count($groups) > 1) {
            echo '<div  class="member-homepage-box" >';
            echo '<h3>My Groups</h3>';
            echo '<ul>';
            foreach ($groups as $id => $details) {
                echo '<li><a href="?view=_groups&groupid=' . (int) $id . '">' . ents($details['name']) . '</a></li>';
            }
            echo '</ul>';
            echo '</div>';
        }
        ?>
		<div class="member-homepage-box hidden-phone">
			<h3>Search people</h3>
			<form method="get" class="form-inline">
				<input type="hidden" name="view" value="people" />
				<input name="search" type="text" placeholder="Enter name to search" value="<?php 
        echo ents(array_get($_REQUEST, 'search'));
        ?>
">
				<button data-action="search" class="btn" type="submit">Search</button>
			</form>
		</div>
		<?php 
    }