			<?php $urlArr =  $this->uri->segment_array(); ?>
			<?php $userProfileDetails=$userProfileDetails->result_array(); ?>
            <div class="side_bar">
                <?php if($userProfileDetails[0]['thumbnail']!=''){ $profile_pic='users/thumb/'.$userProfileDetails[0]['thumbnail']; } else { $profile_pic='default_avat.png';}?>
                    <ul>
                        <li style="border-top:none" class="no-hover">
                            <a  href="view-profile/<?php echo stripslashes($userProfileDetails[0]['user_name']);?>">
                                <img width="75" height="75" alt="asddsa3" src="images/<?php echo $profile_pic; ?>">
                                <span style="float:left;margin-bottom:20px; width:100%;">
                                <?php echo stripslashes($userProfileDetails[0]['full_name'])." ".stripslashes($userProfileDetails[0]['last_name']);?>
                                </span>
                                
                            </a>  
                            <p><?php echo stripslashes($userProfileDetails[0]['city']);?></p>
                        </li>
                        <li class="add-to-circle">
                            <?php if($userProfileDetails[0]['id']!=$this->session->userdata['shopsy_session_user_id']){
								if(!empty($this->session->userdata['shopsy_session_user_name'])){
								$followingListArr = @explode(',', $userProfileDetails[0]['followers']);
								}
								#echo "<pre>"; print_r($followingListArr);	
							?>
                            <input type="hidden" value="<?php echo $userProfileDetails[0]['id'];?>" name="user_id" id="user_id">
                            <div class="follow-button-container small ">
                                <div class="follow-button-cell">
                                    <div class="follow-btn-container " data-to-id="45154653" data-to-type="user" data-source="user_profile">
                                    <?php if (!in_array($this->session->userdata['shopsy_session_user_id'], $followingListArr)){ $disSty='style="display:block !important;"'; } else { $disSty='style="display:none !important;"';}?>
                                    <button class="btn-follow btn-primary small " onclick='add_delete_follow("add_follow","<?php echo $userProfileDetails[0]['id'];?>");' id="follow_button" <?php echo $disSty; ?>><span><?php if($this->lang->line('user_follow') != '') { echo stripslashes($this->lang->line('user_follow')); } else echo 'Follow'; ?></span></button>
                                    <?php if (in_array($this->session->userdata['shopsy_session_user_id'], $followingListArr)){ $disSty='style="display:block !important;"'; } else{ $disSty='style="display:none !important;"';}?>
                                    <?php if(!empty($this->session->userdata['shopsy_session_user_name'])){ ?>
                                    <button class="btn-secondary btn-unfollow small" onclick='add_delete_follow("delete_follow","<?php echo $userProfileDetails[0]['id'];?>");' id="unfollow_button" <?php echo $disSty; ?>><span><?php if($this->lang->line('user_following') != '') { echo stripslashes($this->lang->line('user_following')); } else echo 'Following'; ?></span></button >
                                    <?php } ?>
                                    <span class="follow-spinner spinner-small spinner-small-trans"></span>
                                    </div>
                                </div>
                            </div>
                            <?php }?>
                         </li>
                        <li <?php if ($urlArr[sizeof($urlArr)]==urldecode($this->uri->segment(2,0))){ echo 'class="side_active"';  }?>>
                        	<a href="view-people/<?php echo stripslashes($userProfileDetails[0]['user_name']);?>" ><?php if($this->lang->line('user_profile') != '') { echo stripslashes($this->lang->line('user_profile')); } else echo 'Profile'; ?></a>
                        </li>
                        <li <?php if (in_array('favorites', $urlArr) || in_array('shop', $urlArr)|| in_array('treasury', $urlArr)){ echo 'class="side_active"';  }?>>
                        	<a href="people/<?php echo stripslashes($userProfileDetails[0]['user_name']);?>/favorites"><?php if($this->lang->line('user_favorite') != '') { echo stripslashes($this->lang->line('user_favorite')); } else echo 'Favorite'; ?></a>
                        </li>
                        <li <?php if (in_array('followers', $urlArr) || in_array('following', $urlArr)){ echo 'class="side_active"';  }?>>
                        	<a href="people/<?php echo stripslashes($userProfileDetails[0]['user_name']);?>/followers"><?php if($this->lang->line('user_followers') != '') { echo stripslashes($this->lang->line('user_followers')); } else echo 'Followers'; ?> <?php if($userProfileDetails[0]['followers_count']>0){ echo ': '.$userProfileDetails[0]['followers_count']; } ?></a>
                        </li>                        
                        <li>
                        <?php 
						if($loginCheck!=''){ 
							if($this->session->userdata['shopsy_session_user_confirm'] == 'No') { 
								 $classN='contact-popup2';
						   	}else{
								$classN='contact-popup';
							}
						}
						?> 
                        <?php if($this->session->userdata['shopsy_session_user_name'] == $userProfileDetails[0]['user_name']) {?>
							<?php if($this->session->userdata['shopsy_session_user_confirm'] == 'No') { ?>
                            <li <?php if (in_array('conversations', $urlArr) || in_array('conversations', $urlArr)){ echo 'class="side_active"';  }?>>
                                <a class="contact-popup2" href="javascript:void(0);">Conversations</a>
                            </li>
                            <?php }else{ ?>
                            <li <?php if (in_array('conversations', $urlArr) || in_array('conversations', $urlArr)){ echo 'class="side_active"';  }?>>
                                <a href="people/<?php echo stripslashes($userProfileDetails[0]['user_name']);?>/conversations">Conversations</a>
                            </li>
                            <?php } ?>
                        <?php }else{ ?>
                        	<a  class="<?php echo $classN; ?>" href="<?php if($loginCheck!=''){echo '#';}else{ echo 'login'; }?>"><?php if($this->lang->line('user_contact') != '') { echo stripslashes($this->lang->line('user_contact')); } else echo 'Contact'; ?></a>
                         <?php } ?>
                        </li>
                    </ul>
                </div>
                
                
                
                
                
                
	<div style='display:none'>
        <div id='contact_reg' style='background:#fff;'>  
            <div style="width:96.7%" class="conversation">
                <div style="padding:20px; width:94.5%;" class="conversation_container">
                    <h2 class="conversation_headline"><?php if($this->lang->line('new_conversation') != '') { echo stripslashes($this->lang->line('new_conversation')); } else echo 'New conversation with'; ?><?php echo ucfirst($userProfileDetails[0]['full_name']); ?></h2>
                    <div class="conversation_thumb">
                        <img width="75" height="75" src="images/<?php echo $profile_pic; ?>">
                    </div>
                    <div class="conversation_right">
                        <form name="contactpeople" id="contactpeople" method="post" action="site/user/contactpeople" onsubmit="return contactsCheck();">
                            <input class="conversation-subject" type="text" name="subject" id="subject" placeholder="Subject" >
                            <textarea class="conversation-textarea" rows="11" name="message_text" id="message_text" placeholder="<?php if($this->lang->line('user_msgtxt') != '') { echo stripslashes($this->lang->line('user_msgtxt')); } else echo 'Message text'; ?>"></textarea>
                            <input type="hidden" name="sender_email" id="sender_email" value="<?php echo $this->session->userdata['shopsy_session_user_email']; ?>" >
                            <input type="hidden" name="sender_id" id="sender_id" value="<?php echo $this->session->userdata['shopsy_session_user_id']; ?>" >
                            <input type="hidden" name="receiver_email" id="receiver_email" value="<?php echo $userProfileDetails[0]['email']; ?>" >
                            <input type="hidden" name="receiver_id" id="receiver_id" value="<?php echo $userProfileDetails[0]['id']; ?>" >
                            <input type="hidden" name="current_user" value="<?php echo $userProfileDetails[0]['user_name']; ?>" >
                            <input class="subscribe_btn" type="submit" value="send" style="height: auto; padding: 7px 10px; margin: 10px 0 7px 20px; font-weight: bold;">
                            <span class="error" id="ErrPUP"></span>
                        </form>		
                    </div> 
                </div>
            </div>
        </div>
	</div>         
                  
    <div style='display:none'>
        <div id='contact_reg2' style=' background: none repeat scroll 0 0 rgba(0, 0, 0, 0.3); border-radius:8px; padding:15px'>
            <div style="background:#fff;border-radius:8px;"> 
                <div class="contact_reg-header">
                    <h2><?php if($this->lang->line('confirm_acct') != '') { echo stripslashes($this->lang->line('confirm_acct')); } else echo 'Hold on! You still need to confirm your account.'; ?></h2>
                    <div class="contact_reg-body">
                        <p><?php if($this->lang->line('confirmation_email') != '') { echo stripslashes($this->lang->line('confirmation_email')); } else echo "We'll resend your confirmation email to"; ?> <?php echo $this->session->userdata['shopsy_session_user_email'];?>.</p>
                    </div>
                </div>
                <div class="contact_reg-footer">
                    <span><input class="resending" type="button" value="<?php if($this->lang->line('user_cancel') != '') { echo stripslashes($this->lang->line('user_cancel')); } else echo "Cancel"; ?>" onclick="javascript:$('#cboxClose').trigger('click');"></span> 
                    <span><input class="resending" type="submit" value="<?php if($this->lang->line('prod_resend') != '') { echo stripslashes($this->lang->line('prod_resend')); } else echo "Resend Email"; ?>" onClick="return resendConfirmationPopUp('<?php echo $this->session->userdata['shopsy_session_user_email'];?>');"></span>
                </div>
            </div>         
        </div>
    </div>       
                
                
                
                
                
                
                
                


<script>
$(document).ready(function(){

		$(".cboxClose1").click(function(){
			$("#cboxOverlay,#colorbox").hide();
			});
		
			$(".contact-popup").colorbox({width:"765", height:"auto", inline:true, href:"#contact_reg"});
	    	$(".contact-popup2").colorbox({width:"448px", height:"auto", inline:true, href:"#contact_reg2"});
		
			//Example of preserving a JavaScript event for inline calls.
			$("#onLoad").click(function(){ 
				$('#onLoad').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
				return false;
			});

});
</script>


<style>

#cboxLoadedContent{background:none;}


#cboxClose {  right: 15px;
    text-indent: -9999px;
    top: 11px;}
</style>