<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php echo $title;?></title>

<?php $this->load->view('common/meta_tags'); ?>

<?php $this->load->view('common/before_head_close'); ?>

</head>

<body>

<?php $this->load->view('common/after_body_open'); ?>

<!--Site Wraper Start-->

<div class="siteWraper">

  <?php $this->load->view('common/header'); ?>

  <?php if($this->session->userdata('is_user_login')):?>

  	<?php $this->load->view('common/logged_in_bar'); ?>        

  <?php endif;?>

  <div class="inner">

	 

       <h1 class="titleheading">Messages</h1>

        

       

       <div class="messageWrap">

       <!--Left Col Users-->

      <div class="usercol">

        <div class="userlist">

          

                

                

               <!-- <div class="searchbox">

                    <input type="text" value="Search" name="" />

                </div>-->

                

                <!--User List-->

                <div class="userwrp">

                <ul class="userallList">

                <?php

                if($conatacted_memebers) {

					foreach($conatacted_memebers as $ContactedMemberDetail) {

						if($ContactedMemberDetail->photo == "") {

							$photo = 'images/no-image.jpg';

						} else {

							$photo = 'uploads/member_images/thumb_'.$ContactedMemberDetail->photo;

							

						}

						

						if($ContactedMemberDetail->username == $this->session->userdata('user_rec')) {

							

							$class = 'class="active"';

							

						} else {

							

							$class = '';

						}

						

				?>

                    <li><a href="javascript:;" <?php echo $class; ?> onclick="setRecieverSession('<?php echo $ContactedMemberDetail->username;?>')">

                        

                        <div class="imgbox"><img src="<?php echo base_url(); ?>glancePublic/<?php echo $photo;?>" width="40" height="39" /></div>

                        <div class="userinfo">

                            <h1><?php echo $ContactedMemberDetail->name;?></h1>

                            <p><?php echo $ContactedMemberDetail->gender." ".$ContactedMemberDetail->mAge." yrs, ".$ContactedMemberDetail->city;?></p>

                        </div>

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

                    </a>

                    </li>

               <?php

					}

				}

               ?>  

                    <!--<li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#" class="active">

                        

                        <div class="msgcount">5</div>

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user1.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="msgcount">5</div>

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                       

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user1.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                       

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user1.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>

                    

                    <li><a href="#">

                        

                        <div class="imgbox"><img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" /></div>

                        <div class="userinfo">

                            <h1>Sharjeel Anjum</h1>

                            <p>Male, 22 yrs, Islamabad</p>

                        </div>

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

                    </a>

                    </li>-->

                </ul>

                </div>

            </div>

        </div>

        

        <!--Right Col Chat-->

        <div class="chatCol"><!--Chat user info-->

            <div class="chatserinfo">

            <?php if($rec_row):?>

            	<div class="chatuserWrp">

                <?php
				if($rec_row->photo)
	  						$image_thumb = base_url().'glancePublic/uploads/member_images/thumb_'.$rec_row->photo;
	  					else
	  						$image_thumb = base_url().'glancePublic/images/no-image.jpg';
				?>

                <div class="userpic"><a href="<?php echo base_url(); ?>profile/<?php echo $rec_row->username; ?>" target="_blank"><img src="<?php echo $image_thumb; ?>" alt="" width="40" height="40" /></a></div>

                <div class="usercontent">

                <div class="left">

                <h2><?php echo $rec_row->name;?></h2>

                <p><?php echo $rec_row->gender.", ".$rec_row->mAge." yrs, ".$rec_row->city;?></p>

                </div>

                

                <a href="<?php echo base_url(); ?>friends/block_friend/<?php echo my_encrypt($rec_row->id); ?>" title="Block this Person" class="addlist">Block This Person</a> 

                

                <?php 

				if(!$is_freind) {

				?>

                <a href="<?php echo base_url(); ?>friends/send_friend_request/<?php echo my_encrypt($rec_row->id); ?>" title="Send Friend Request" class="addlist">Add Friend</a>

                <?php

				}

				?>

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

                

                </div>

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

            </div>

            <?php endif;?>

            <div class="chatListBox">

                <ul class="chatList" id="messages_all">

                    <?php

                    if($messages_row) {

                    	foreach($messages_row as $messageDetail) {

							if($messageDetail->photo == "") {

								$photo = 'images/no-image.jpg';

							} else {

								$photo = 'uploads/member_images/thumb_'.$messageDetail->photo;

								

							}

							

                    ?>

                        <li>

                            <img src="<?php echo base_url(); ?>glancePublic/<?php echo $photo; ?>" width="40" height="39" alt="" />

                            <div class="chattxt">

                                <div class="chatcont">

                                    <div class="chatarrow"></div>                            

                                    <p><?php echo $messageDetail->message; ?></p>

                                    <div class="time"><?php echo dateDiff(date("Y-m-d H:i:s"),$messageDetail->date_send).' ago';?></div>

                                </div>

                            </div>

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

                        </li>

                  <?php

						}

					}

				  ?>  

                    <!--<li class="reply">

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont replybox">

                                <div class="chatarrow2"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li>

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont">

                                <div class="chatarrow"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li class="reply">

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont replybox">

                                <div class="chatarrow2"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li>

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont">

                                <div class="chatarrow"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li class="reply">

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont replybox">

                                <div class="chatarrow2"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li>

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont">

                                <div class="chatarrow"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li class="reply">

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont replybox">

                                <div class="chatarrow2"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li>

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user2.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont">

                                <div class="chatarrow"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>

                    

                    <li class="reply">

                        <img src="<?php //echo base_url(); ?>glancePublic/images/user3.jpg" alt="" />

                        <div class="chattxt">

                            <div class="chatcont replybox">

                                <div class="chatarrow2"></div>                            

                                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

                                <div class="time">5 minutes ago</div>

                            </div>

                        </div>

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

                    </li>-->

                </ul>

            </div>

            

            <div class="chatForm">

                               

                <div class="writeBox">

                <textarea id="message" name="message"></textarea> <input type="button" value="Send" onclick="sendMessages()" style="cursor:pointer;" />

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

                </div>

            </div>

            </div>

        </div>

        

        

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

       </div>             



 

    </div>

  <?php $this->load->view('common/footer'); ?>

</div>

<!--/Site Wraper End-->

<?php $this->load->view('common/after_body_open'); ?>

</body>

</html>

