<?php
/**
 * @name          : Joomla Social Pinboard
 * @version	  : 1.5.0
 * @package       : apptha
 * @since         : Joomla 1.5
 * @author        : Apptha - http://www.apptha.com
 * @copyright     : Copyright (C) 2011 Powered by Apptha
 * @license       : http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @abstract      : Social Pinboard Component Follow view
 * @Creation Date : March 2013
 * @Modified Date : March 2013
 * */
// No direct Access
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();
//$document->addStyleSheet('components/com_wishlogue/css/style.css');
$document->addStyleSheet('components/com_wishlogue/css/reset.css');
$document->addStyleSheet('templates/wishlogue/html/com_wishlogue/css/style.css');
$document->addStyleSheet('templates/wishlogue/css/style.css');
$document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
$document->addScript('components/com_wishlogue/javascript/chrome.js');
$document->addScript('components/com_wishlogue/javascript/facebox.js');

$document->addScript('components/com_wishlogue/javascript/jquery-ui-1.8.2.custom.min.js');
$document->addStyleSheet('components/com_wishlogue/css/jquery-ui-1.8.2.custom.css');

$document->addScript('components/com_wishlogue/javascript/scroll/jquery.infinitescroll.min.js');
$document->addScript('components/com_wishlogue/javascript/scroll/jquery.isotope.min.js');

$document->addStyleSheet('components/com_wishlogue/css/edit-style.css');
$document->addStyleSheet('templates/wishlogue/html/com_wishlogue/css/pinboard.css');
$user = JFactory::getUser();
$userID = $user->get('id');
$fBoardId = '';
$inc = '';
$followings = $this->getFollowing;
$follow = JRequest::getvar('follower');
$pincount = $this->pincount;
$totalBoard = $this->totalBoard;
$dispBoard = $this->displayBoard;
$followers = $this->getFollower;

///rgs.
$searchboxmode = $this->searchboxmode;
$familyMembersCount = $this->familyMembersCount;
$friendsMembersCount = $this->friendsMembersCount;
$getMemberDetails = $this->getMemberDetails;

$tabNo = JRequest::getInt('tab');

if( $tabNo == 1  )
{
	$selectedClassFriends = "class = 'selected'";
	$selectedClassFamily = '';
	$modeField = 'friends';
	$modeField_a = JText::_('COM_WISHLOGUE_FAMILY_ONE');
	$COM_WISHLOGUE_SEARCH_ADD_BUTTON = JText::_('COM_WISHLOGUE_SEARCH_FRIEND_ADD_BUTTON');
}
else
{
	$selectedClassFamily = "class = 'selected'";
	$selectedClassFriends = '';
	$modeField = 'family';
	$modeField_a = JText::_('COM_WISHLOGUE_FRIENDS_ONE');
	$COM_WISHLOGUE_SEARCH_ADD_BUTTON = JText::_('COM_WISHLOGUE_SEARCH_FAMILY_ADD_BUTTON');
}

$familysearchVal = JRequest::getVar('familysearch', '');
///rgs..

if ($userID) {
    $follow_user_details = $this->follow_user_details;
    if ($follow_user_details['0'] != '') {
        $follwercount = count($follow_user_details);
    } else {
        $follwercount = '0';
    }
}
//     echo "<pre>";print_r($follwercount);exit;
$pinLikes = $this->getLikes;
$users = JRequest::getInt('uid');
if (isset($users) && $users != '0') {
    $IDuser = $users;
} else {
    $IDuser = $userID;
}
$userLink = '';
if (isset($users) && $users != '0') {
    $userLink = '&uid=' . $users;
}
$profileDetails = $this->user_profile; //stores user details
$repinactivities = $this->repinactivities; //stores repin activities of user
$reportedUsers = $this->getReportUsers; //stores reported users list
$blockStatus = $this->blockStatus; //echo($blockStatus[0]->status);exit;
$user_result = $this->userprofile; //stores user details
if (empty($user_result[1])) {
    $user_res = $user_result[0]; //pinned by information
    $user_res1 = $user_result[0]; //commenting user information
} else if ($IDuser == $user_result[0]->user_id) {
    $user_res = $user_result[1]; //pinned by information
    $user_res1 = $user_result[0]; //commenting user information
} else if ($user_result[1]->user_id == $IDuser) {
    $user_res = $user_result[0]; //pinned by information
    $user_res1 = $user_result[1]; //commenting user information
}
//Get the follow boards
if (count($dispBoard) != 0) {
    foreach ($dispBoard as $fboards) {

        if ((count($dispBoard) - 1) == $inc) {
            $fBoardId.= $fboards->board_id;
        } else {
            $fBoardId.= $fboards->board_id . ',';
        }
        $inc++;
    }
}
?>

	<script type="text/javascript">
		$jna = jQuery.noConflict();
		$jna(document).ready(function(){
			$jna('#familysearch').autocomplete({source:'?option=com_wishlogue&view=ajaxcontrol&tmpl=component&task=FamilySearchBox&field=<?php echo $modeField; ?>', minLength:1});
		});
	</script>

<script>
    var follow_all_lang = "<?php echo JText::_('COM_WISHLOGUE_FOLLOW_ALL'); ?>";
    var un_follow_board_lang = "<?php echo JText::_('COM_WISHLOGUE_UNFOLLOW_BOARD'); ?>";
    var un_follow_lang = "<?php echo JText::_('COM_WISHLOGUE_UNFOLLOW'); ?>";
    var follow_board_lang = "<?php echo JText::_('COM_WISHLOGUE_FOLLOW_BOARD'); ?>";
    var follow_user_lang = "<?php echo JText::_('COM_WISHLOGUE_FOLLOW_USER'); ?>";
</script>
<div id="profile-header">
    <div class="fixedcontainer row clearfix">
        <div class="info">
            <?php
            foreach ($profileDetails as $profileDetails) {
                if (!$profileDetails->user_image) {
                    $srcPath = "components/com_wishlogue/images/no_user.png";
                } else {
                    $userImageDetails = pathinfo($profileDetails->user_image);
                    $userProfileImage = $userImageDetails['filename'] . '_o.' . $userImageDetails['extension'];
                    $srcPath = "images/wishlogue/avatars/" . $userProfileImage;
                }
                ?>
                <a target="_blank" href="<?php echo JURI::base() . $srcPath ?>" class="profileimage" >
                    <img src="<?php echo $srcPath; ?>" width="160" height="100%" alt="User Profile">
                </a>
                <div class="content">
                    <h1><?php echo $profileDetails->first_name . ' ' . $profileDetails->last_name; ?></h1>
                    <p class="colormuted"><?php echo $profileDetails->about; ?></p>
                    <ul id="profilelinks" class="icons">
                        <?php if ($profileDetails->facebook_profile_id) {
                            ?>
                            <li>
                                <a href="http://facebook.com/profile.php?id=<?php echo $profileDetails->facebook_profile_id; ?>" class="icon facebook" target="_blank"></a>
                            </li>
                            <?php
                        }
                        if ($profileDetails->location != '') {
                            ?>
                            <span class="icon website" ></span>
                            <li>
                                <?php echo $profileDetails->location; ?>
                            </li><?php
                        }
                        if ($profileDetails->website != '') {
                            if (!strstr($profileDetails->website, 'http') && !strstr($profileDetails->website, 'https')) {
                                $website = "http://" . $profileDetails->website;
                            }
                            else
                                $website = $profileDetails->website;
                            ?>
                            <li>
                                <a href="<?php echo $website; ?>" class="icon location" target="_blank"></a>
                            </li>
                        <?php } ?>
						
						
					<?php
					///rgs.
						$RGS_uid = JRequest::getInt('uid', 0);
						$RGS_user = JFactory::getUser()->id;

						if ( $RGS_uid == $RGS_user || $RGS_uid == 0 )
						{
					?>
							<li>
								<a href='<?php echo JRoute::_('index.php?option=com_wishlogue&view=profile') ?>'><input type='button' value='<?php echo JText::_('COM_WISHLOGUE_EDIT_PROFILE'); ?>'></a>
							</li>
					<?php
						}
					///rgs..
					?>
						
						
                    </ul>
                    <?php if ($users != $user->id && $users != '' && $user->id != '') {
                        ?>
                        <span class="flag" style="cursor:pointer;" onmouseout="bloguserhide();"  onmouseover="bloguser();">&nbsp;</span>
                        <?php
                    }
                }
                ?>
                <div id="blogdialogbox" class="report-user shadow-dropdown" onmouseover="bloguser();" onmouseout="bloguserhide();"  style="display: none;">
                    <div class="arrow up"></div>
                    <div class="section report-head">
                        <?php
                        $value_receiver = $value_sender = '';
                        if (!empty($reportedUsers)) {
                            $value_receiver = $reportedUsers[0]->report_receiver;
                            $value_sender = $reportedUsers[0]->report_sender;
                        }

                        $user_id = $user->id;
                        if ($value_receiver == $users && $value_sender == $user_id) {
                            ?>
                            <div class="reported" id="reported">
                                <h2 style="color:black;"><?php echo JText::_('COM_WISHLOGUE_REPORTED'); ?></h2>
                                <?php echo JText::_('COM_WISHLOGUE_YOU_REPORTED_START'); ?><?php echo ' ' . $profileDetails->first_name . ' ' . $profileDetails->last_name; ?><?php echo JText::_('COM_WISHLOGUE_YOU_REPORTED_END'); ?>
                            </div>
                        <?php } else {
                            ?>
                            <div class="unreported" id="unreported">
                                <h2 style="color:black;">Report <?php echo ' ' . $profileDetails->first_name . ' ' . $profileDetails->last_name; ?></h2>
                            </div>
                        <?php } ?>
                    </div>
                    <ul class="report-type">
                        <li id="report_action_nudity" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_NUDITY'); ?>');" class="first"><a report_type="nudity"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_NUDITY'); ?></a></li>
                        <li id="report_action_attacks" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORST_TYPE_ATTACKS'); ?>');" class=""><a report_type="attacks"><?php echo JText::_('COM_WISHLOGUE_REPORST_TYPE_ATTACKS'); ?></a></li>
                        <li id="report_action_graphic-violence" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_GRAPHIC_VIOLENCE'); ?>');" class=""><a report_type="graphic-violence"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_GRAPHIC_VIOLENCE'); ?></a></li>
                        <li id="report_action_hate-speech" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_HATEFUL_SPEECH'); ?>');" class=""><a report_type="hate-speech"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_HATEFUL_SPEECH'); ?></a></li>
                        <li id="report_action_self-harm" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_SELF_HARM'); ?>');" class=""><a report_type="self-harm"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_SELF_HARM'); ?></a></li>
                        <li id="report_action_spam"  onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_SPAM'); ?>');" class=""><a report_type="spam"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_SPAM'); ?></a></li>
                        <li id="report_action_other" onclick="Modal.show('userreport');
        blocktype('<?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_OTHER'); ?>');" class=""><a report_type="other"><?php echo JText::_('COM_WISHLOGUE_REPORT_TYPE_OTHER'); ?></a></li>
                    </ul>
                    <div class="section block-head">
                        <h3>
                            <div id="userblock" style="color: #000;text-transform: capitalize;"></div>


                                <?php if ($users != $user->id && $users != '' && $user->id != '') { ?>
                                <div id="category_user_follow<?php echo $user_result[0]->user_id ?>" style="padding-right: 5px;" >
                                <?php if (!empty($blockStatus[0]) && $blockStatus[0]->status == '0') { ?>
                                        <input type="button" name="followuser" id="textdisplay" style="float:right;cursor: pointer;" value="<?php echo 'Block'; ?>" class="Button Button13 RedButton clickable blockuserbutton" onclick="bloguserfully();">
    <?php } else if (!empty($blockStatus[0]) && $blockStatus[0]->status == '1') { ?>
                                        <input type="button" style="float:right;cursor: pointer;" id="textdisplay"   value="<?php echo 'Unblock' ?>"class="Button Button13 RedButton clickable blockuserbutton" onclick="unblock('<?php echo $user_id; ?>', '<?php echo $user_result[0]->user_id; ?>');"  />
    <?php } else if (empty($blockStatus[0])) { ?>
                                        <input type="button" name="followuser" id="textdisplay" style="float:right;cursor: pointer;" value="<?php echo 'Block'; ?>" class="Button Button13 RedButton clickable blockuserbutton" onclick="bloguserfully();">
    <?php } ?>
                                </div>
<?php } ?>
                            <input type="button" name="followuser" id="nameuser" style="display:none;" value="<?php echo $profileDetails->first_name . ' ' . $profileDetails->last_name; ?>" class="Button Button13 RedButton clickable blockuserbutton" >
                        </h3>
                        <div class="report-user" id="blockUnblockUsermessagefirst"></div>
                        <div class="report-user" id="blockUnblockUsermessagesecond"></div>
                    </div>
                </div>
            </div>
        </div>
		<!--
        <div class="repins">
            <h3><?php //echo JText::_('COM_WISHLOGUE_YOU_REPINS_FROM'); ?></h3>
            <ul>
                <?php
                // foreach ($repinactivities as $test) {
                    // $resultmodrepin = wishlogueModelfamily::getModRepinpinUserdetails($test->pin_repin_id);
                    // foreach ($resultmodrepin as $named) {
                        // if (!$named->user_image) {
                            // $srcPath = "components/com_wishlogue/images/no_user.png";
                        // } else {
                            // $userImageDetails = pathinfo($named->user_image);
                            // $userProfileImage = $userImageDetails['filename'] . '_o.' . $userImageDetails['extension'];
                            // $srcPath = "images/wishlogue/avatars/" . $userProfileImage;
                        // }
                        ?>
                        <li>
                            <a href="<?php// echo JRoute::_('index.php?option=com_wishlogue&view=cataloguedisplay&uid=' . $named->pin_user_id); ?>">
                                <img src="<?php //echo $srcPath; ?>"><strong class="user-pin"><?php// echo $named->username; ?></strong>
							</a>
                        </li>
				<?php//	}
					//}
				?>
            </ul>
        </div>
		-->
    </div>
    <!-- <div class="makewishs clearfix"> -->
	<?php
		///rgs.
		$RGS_uid = JRequest::getInt('uid', 0);
		$RGS_user = JFactory::getUser()->id;

		if ( $RGS_uid == $RGS_user || $RGS_uid == 0 )
		{
	?>
			<div id="BoardTitle">
				<p align='right'>
					<b>
						<a href="<?php echo JRoute::_('index.php?option=com_wishlogue&view=cataloguedisplay#show_catalogues') ?>" >
							<?php echo JText::_('COM_WISHLOGUE_SWITCH_TO_MAKE_WISHES_MODE'); ?> >>
						</a>
					</b>
				</p>

	<?php		echo '<h1>' . JText::_('COM_WISHLOGUE_MODE_GRANT_WISHES') . '</h1>'; ?>
			</div>
	<?php
		}
		///rgs..
	?>
    <!-- </div> -->

    <div id="ContextBar" class="clearfix">
        <div id="fixed_container">
            <ul>
			<?php
			$familyURL = 'index.php?option=com_wishlogue&view=family&tab=0';
			$friendURL = 'index.php?option=com_wishlogue&view=family&tab=1';

			if( $familysearchVal != '' && $tabNo == 0 ) {
				$friendURL = "index.php?option=com_wishlogue&view=family&tab=1&familysearch=$familysearchVal&searchboxfriendsmode=" . JText::_('COM_WISHLOGUE_SEARCH_FAMILY_BUTTON');
			}
			else if( $familysearchVal != '' && $tabNo == 1 ) {
				$familyURL = "index.php?option=com_wishlogue&view=family&tab=0&familysearch=$familysearchVal&searchboxfriendsmode=" . JText::_('COM_WISHLOGUE_SEARCH_FAMILY_BUTTON');
			}
			?>
                <li><a id='show_family' <?php echo $selectedClassFamily; ?> href="<?php echo JRoute::_($familyURL . '#show_family'); ?>" >
                        <?php
                        if ( $familyMembersCount > 1)
						{
							$familyMembersCountDIVone = 'style="display:none;"';
							$familyMembersCountDIVmany = 'style="display:inline;"';
						}
                        else
						{
							$familyMembersCountDIVmany = 'style="display:none;"';
							$familyMembersCountDIVone = 'style="display:inline;"';
						}
                        ?>
						<span id="familymembersCount"><?php echo $familyMembersCount; ?></span>
						<span id="familymembersCountONE" <?php echo $familyMembersCountDIVone; ?> ><?php echo JText::_('COM_WISHLOGUE_FAMILY_ONE'); ?></span>
						<span id="familymembersCountMANY" <?php echo $familyMembersCountDIVmany; ?> ><?php echo JText::_('COM_WISHLOGUE_FAMILY'); ?></span>
					</a>
                </li>
                <li>
                <a id='show_friends' <?php echo $selectedClassFriends; ?> href="<?php echo JRoute::_($friendURL . '#show_friends'); ?>">
			<?php
				if ( $friendsMembersCount > 1)
				{
					$friendsMembersCountDIVone = 'style="display:none;"';
					$friendsMembersCountDIVmany = 'style="display:inline;"';
				}
				else
				{
					$friendsMembersCountDIVmany = 'style="display:none;"';
					$friendsMembersCountDIVone = 'style="display:inline;"';
				}
            ?>
			<span id="friendsmembersCount"><?php echo $friendsMembersCount; ?></span>
			<span id="friendsmembersCountONE" <?php echo $friendsMembersCountDIVone; ?> ><?php echo JText::_('COM_WISHLOGUE_FRIENDS_ONE'); ?></span>
			<span id="friendsmembersCountMANY" <?php echo $friendsMembersCountDIVmany; ?> ><?php echo JText::_('COM_WISHLOGUE_FRIENDS'); ?></span>
			</a>
                </li>

            </ul>
                <?php if ($userID) {
                    ?>
                <div  class="center_btn">
                <?php if (!empty($blockStatus[0]) && $blockStatus[0]->status == '1') { ?>
                        <div id="follow" >
        <?php if ($users != $user->id && $users != '' && $user->id != '') {
            ?>
                                <input type="button" name="unblock" value="<?php echo 'Unblock'; ?>" id="textdisplayUnblock" class="unfollow_btn" onclick="unblock('<?php echo $user_id; ?>', '<?php echo $users; ?>');" />
        <?php } ?>
                        </div>
    <?php } else { ?>

    <?php } ?>
                </div>
<?php } ?>

        </div>
        <div class="clear">
        </div></div> </div>

    <?php
        
?>
		<!------------------------------------->
                <div class="family-friends">
		<div class="follow-head">
			<?php 
				if ($tabNo == 1)
				{
					echo JText::_('COM_WISHLOGUE_SEARCH_FRIENDS');
				}
				else
				{
					echo JText::_('COM_WISHLOGUE_SEARCH_FAMILY');
				}
			?>
		</div>
                <form method='POST' class="familyfrnd-search">
			<?php echo JText::_('COM_WISHLOGUE_SEARCH_FAMILY_LABEL'); ?>:
			<input id="familysearch" name="familysearch" type="text" value="<?php echo $familysearchVal; ?>" />
			<input name='searchboxfriendsmode' id='searchboxfriendsmode' type='submit' value='<?php echo JText::_('COM_WISHLOGUE_SEARCH_FAMILY_BUTTON'); ?>'>
			<input type="button" onclick="addfamilysearch('<?php echo $modeField; ?>')" value='<?php echo $COM_WISHLOGUE_SEARCH_ADD_BUTTON; ?>' />
			<input id="searchForField" name="searchForField" type="hidden" value="<?php echo $modeField; ?>" />
			<div id='addedsuccessfully'></div>
		</form>
		<!-------->
		
		
		<div class="board-followers" id="board-followers-members">
		<div class="follow-head" >
			<?php
				if( $searchboxmode != 'enabled' )
				{
					if ($tabNo == 1)
					{
						echo JText::_('COM_WISHLOGUE_FRIENDS');
					}
					else
					{
						echo JText::_('COM_WISHLOGUE_FAMILY');
					}
				}
				else
				{
					echo JText::_('COM_WISHLOGUE_SEARCH_FAMILY_SEARCH_RESULTS') . ' "' . $familysearchVal . '"';
				}
			?>
		</div>
		<?php
            if( $searchboxmode == 'enabled' )
			{
				$tempMembersCount = count($getMemberDetails);
				echo '<input type="hidden" id="SearchTrue" value="Enabled">';
			}
			else
			{
				if ($tabNo == 1) {
					// $tempMembersCount = $friendsMembersCount;
					$tempMembersCount = count($getMemberDetails);
				}
				else {
					// $tempMembersCount = $familyMembersCount;
					$tempMembersCount = count($getMemberDetails);
				}
				echo '<input type="hidden" id="SearchTrue" value="Disabled">';
			}
			if ( $tempMembersCount < 1 )
			{
				if( $searchboxmode != 'enabled' ) {
					if ($tabNo == 1) {
						echo '<div id="errorDisp"><div id="login_error_msg" style="min-height:300px;">' . JText::_('COM_WISHLOGUE_SORRY_NO_FRIEND') . '</div></div>';
					}
					else {
						echo '<div id="errorDisp"><div id="login_error_msg" style="min-height:300px;">' . JText::_('COM_WISHLOGUE_SORRY_NO_FAMILY') . '</div></div>';
					}
				}
				else {
					echo '<div id="errorDisp"><div id="login_error_msg" style="min-height:300px;">' . JText::_('COM_WISHLOGUE_SEARCH_FAMILY_NO_RESULTS_FOUND') . ' "' . $familysearchVal . '"</div></div>';
				}
            }
		?>
		
		<?php
			if ( count($getMemberDetails) >= 1 )
			{
        ?>

	<?php
	// echo '<pre>'; print_r($getMemberDetails); die;
		foreach ($getMemberDetails as $getMember)
		{
			$displayremove = "style='display:none;'";
			$displayaccept = "style='display:none;'";
			$displayadd = "style='display:none;'";
			$displayun = "style='display:none;'";
			$displaymessage = "style='display:none;'";
			$messageForDisplay = '';
			switch( $getMember['friend_status'] )
			{
				case 'already_exist':
				{
					$displayun = "style='display:block;'";
					break;
				}
				case 'another_exist':
				{
					$displaymessage = "style='display:block;'";
					$messageForDisplay = $modeField_a;
					break;
				}
				case 'already_sent':
				{
					$displayremove = "style='display:block;'";
					break;
				}
				case 'another_sent':
				{
					$displaymessage = "style='display:block;'";
					$messageForDisplay = JText::_('COM_WISHLOGUE_RGS_ANOTHER_SENT') . $modeField_a;
					break;
				}
				case 'already_received':
				{
					$displayaccept = "style='display:block;'";
					break;
				}
				case 'another_received':
				{
					$displaymessage = "style='display:block;'";
					$messageForDisplay = JText::_('COM_WISHLOGUE_RGS_ANOTHER_RECEIVED') . $modeField_a;
					break;
				}
				case 'no_relation':
				{
					$displayadd = "style='display:block;'";
					break;
				}
				case 'thats_you':
				{
					$displaymessage = "style='display:block;'";
					$messageForDisplay = JText::_('COM_WISHLOGUE_RGS_THATS_YOU');
					break;
				}
				case 'failed':
				{
					$displaymessage = "style='display:block;'";
					$messageForDisplay = JText::_('COM_WISHLOGUE_SOMETHING_WENT_WRONG');
					break;
				}
			}
		?>
				<div id="userbox_<?php echo $getMember['username']; ?>" >
				<input type='hidden' id='userid_<?php echo $getMember['username']; ?>' value='<?php echo $getMember['user_id']; ?>' >
				<div class="board-followername">
					<div class="board-followername_left">
						<a href="<?php echo JRoute::_('index.php?option=com_wishlogue&view=cataloguedisplay&uid=' . $getMember['user_id']); ?>">
							<?php
								if ($getMember['user_image'] == '') {
							?>
									<img alt="" src="<?php echo JURI::base() . '/components/com_wishlogue/images/no_user.png' ?>" height="75" width="75" />
							<?php
								} else {
							?>
									<img alt="" src="<?php echo JURI::base() . '/images/wishlogue/avatars/' . substr($getMember['user_image'], 0, strlen($getMember['user_image'])-4) . '_o.jpg'; ?>" height="75" width="75" />
							<?php
								}
							?>
                        </a>
                    </div>
                                <div class="board-followername_right">
                                    <h4>
                                    <a href="<?php echo JRoute::_('index.php?option=com_wishlogue&view=cataloguedisplay&uid=' . $getMember['user_id']); ?>">
										<?php echo ucfirst($getMember['first_name']) . " " . ucfirst($getMember['last_name']); ?>
                                    </a>
									</h4>
									<div class="count_items">
										<?php echo JText::_('COM_WISHLOGUE_BOARDS'). ' : ' . $getMember['boardCount'].' '; ?>
										<?php echo JText::_('COM_WISHLOGUE_PINS'). ' : '. $getMember['pinCount']; ?>
									</div>
                                </div>

								<div class='DIVunfriend<?php echo $getMember['username']; ?>' id='DIVunfriend<?php echo $getMember['user_id']; ?>' <?php echo $displayun; ?> >
									<input type="button" id="unfriend" onclick="managefamily('<?php echo $getMember['user_id']; ?>', '<?php echo $modeField; ?>', 'removefromFamily')" value="<?php echo JText::_('COM_WISHLOGUE_FAMILY_REMOVE'); ?>" />
								</div>
								<div class='DIVaddfriend<?php echo $getMember['username']; ?>' id='DIVaddfriend<?php echo $getMember['user_id']; ?>' <?php echo $displayadd; ?> >
									<input type="button" id="addfriend" onclick="managefamily('<?php echo $getMember['user_id']; ?>', '<?php echo $modeField; ?>', 'addtoFamily')" value="<?php echo JText::_('COM_WISHLOGUE_FAMILY_ADD'); ?>" />
								</div>
								<div class='DIVacceptfriend<?php echo $getMember['username']; ?>' id='DIVacceptfriend<?php echo $getMember['user_id']; ?>' <?php echo $displayaccept; ?> >
									<input type="button" id="acceptfriend" onclick="managefamily('<?php echo $getMember['user_id']; ?>', '<?php echo $modeField; ?>', 'addtoFamily')" value="<?php echo JText::_('COM_WISHLOGUE_FAMILY_CONFIRM_REQUEST'); ?>" />
									<input type="button" id="declinefriend" onclick="managefamily('<?php echo $getMember['user_id']; ?>', '<?php echo $modeField; ?>', 'removefromFamily')" value="<?php echo JText::_('COM_WISHLOGUE_FAMILY_DECLINE_REQUEST'); ?>" />
								</div>
								<div class='DIVremovefriend<?php echo $getMember['username']; ?>' id='DIVremovefriend<?php echo $getMember['user_id']; ?>' <?php echo $displayremove; ?> >
									<input type="button" id="removefriend" onclick="managefamily('<?php echo $getMember['user_id']; ?>', '<?php echo $modeField; ?>', 'removefromFamily')" value="<?php echo JText::_('COM_WISHLOGUE_FAMILY_REMOVE_REQUEST'); ?>" />
								</div>
								<div class='DIVmessage<?php echo $getMember['username']; ?>' id='DIVmessage<?php echo $getMember['user_id']; ?>' <?php echo $displaymessage; ?> >
									<?php echo $messageForDisplay; ?>
								</div>

                                </div>
								</div>
						<?php
                             }
						}
						?>
						</div>
											
</div>
						
						

	<?php
		// $searchboxfriendsmode = JRequest::getVar('searchboxfriendsmode');
		// if( $searchboxfriendsmode == JText::_('COM_WISHLOGUE_SEARCH_FAMILY_BUTTON') )
		// {
			// $routerUrl=JURI::root()."index.php?option=com_wishlogue&view=family
									// &tab=$tabNo&familysearch=$familysearchVal
									// &searchboxfriendsmode=$searchboxfriendsmode&page=1";
		// }
		// else
		// {
			// $routerUrl=JURI::root()."index.php?option=com_wishlogue&view=family
									// &tab=$tabNo&page=1";
		// }
	?>
              