Jump to content

status list not showing up


shan

Recommended Posts

hi, guys im trying to echo out results of a particular variable in my search_results.php file where i want to actually display the status of a friend which isn't showing up but is showing up in home.php page which handles the session user data. though i tried some variations it isn't of any help. The satusui variable which has the same logic works well but not the status_list variable for the friend in search_results page. please, help me to build the conversation system.

code in status_list page:-

$status2view=$project->statusView($f_uname);

    foreach($status2view as $row){
           //print_r($row);
           $id=$row['update_id'];
          
    
//gives output on var_dump

$status_replies_=$project->reply2StatusView($id);


foreach ($status_replies_ as $row) {
                
                $status_reply_id=$row['update_id'];
                $reply_author=$row['author'];
                $reply_d=htmlentities($row['update_body']);
                $reply_data=  stripslashes($reply_d);
                $reply_t=  htmlentities($row['title']);
                $reply_title=  stripslashes($reply_t);
                $account_name=$row['account_name'];
               $reply_date=$row['time'];
               $reply_delete_button="";
               if ($reply_author==$session_uname || $account_name==$session_uname) {
                   $reply_delete_button="<li><span id='$status_reply_id' class='delete_reply_btn glyphicon glyphicon-remove'><a href='#' title='Delete this comment'>Remove X</a></span></li>";
               }
              $status_replies="<div id='".$status_reply_id."' class='replyboxes'><b>Reply by<a href='search_results.php?u=".$reply_author."'>".$reply_author."</a>".$reply_date ."<legend>"
                       . "<b class='caret'><button type='button' class='btn btn-danger dropdown-toggle pull-right' data-toggle='dropdown' aria-expanded='true' ><span class='glyphicon glyphicon-edit'></span>
                        <ul class='dropdown-menu'>".$reply_delete_button." "
                      . "<li><a href='#' class='hidden_text_area glyphicon glyphicon-pencil' title='Edit this comment' >Edit</a></li>"
                      . "<li><a href='report.php?u='".$reply_author."'>Report</a><li></ul>"
                      . "</button></b></legend><br>".  html_entity_decode($reply_data)."";
            }
        }
       
     foreach ($status2view as $row1) {
        
         //got values here.
                $updateid=$row1['update_id'];
                $account_name=$row1['account_name'];
                $os_id=$row1['os_id'];
                $author=$row1['author'];
                $post_date=$row1['time'];
                $title= stripslashes($row1['title']);
                $data= stripslashes($row1['update_body']);
                $statusdeletebutton='';
                //insert_status_ui script to get message.
        
                if($isowner=="yes"){
 $statusui_edit="<div type='".$updateid."' class='hidden_edit_4_session session_editor".$updateid." jumbotron'>"
            . "<a href='#' type='".$updateid."' class='pull-right close_edit' title='Close without editing'>Close X</a>"
            . "<input type='text' class='form-control title_s_edit title_s_".$updateid."' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >"
            . "<div> </div>"
            . "<textarea id='wall_edit_1' type='".$updateid."' rows='5' cols='50'  class='session_edit text_value_".$updateid."' wrap='hard' placeholder='whats up ".$session_uname."'>
             ".html_entity_decode($data)."</textarea><br>"
            . "<button style='float:right;' value='".$updateid."' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>";
 
    
}
 elseif ($is_friend==TRUE&&$session_uname!=$f_uname) {
     
     
     $statusui_edit="<div type='".$updateid."' class='hidden_edit_4_friend friend_editor".$updateid." jumbotron'>"
             . "<a title='Close without editing' type='".$updateid."' href='#' class='pull-right close_edit_f'>Close X</a>"
               . "<input type='text' class='form-control title_f_edit title_f_".$updateid."''  name='status_title' value='".html_entity_decode($title)."' placeholder='Title'><br>"
               . "<div> </div>"
            . "<textarea id='wall_edit_2' value='' type='".$updateid."' rows='5' cols='50'  class='friend_edit update_friend_".$updateid."' placeholder='hi ".$session_uname." want to say something to ".$f_uname.". '>"
               .html_entity_decode($data)."</textarea><br>"
               . "<button style='float:right;' value='".$updateid."' type='c' class='btn btn-warning btn-large btn-lg post-f-edit'>Update</button></form>";
 }
 
                if ($author==$session_uname || $account_name==$session_uname) {
                $statusdeletebutton='<li>'
                           . '<a href="#" type="'.$updateid.'" class="delete_4_session hidden_text_delete_'.$updateid.' glyphicon glyphicon-trash delete_reply_btn" title="Delete this status and its replies">Remove</a></li>';
                }
                if($isowner=="yes"){
                $status_list= $statusui_edit.'<div attr="'.$updateid.'" type="'.$updateid.'" class="statusboxes status_'.$updateid.'  jumbotron">'
                        . '<h3 style="color:black; margin-bottom:5px; margin-top:5px;" class="pull-left">'
                        . '<div id="'.$updateid.'" class="title_s_2copy" value="'.html_entity_decode($title).'">'.html_entity_decode($title).'</div></h3>'
                        . '<span class="pull-right">'
                        . '<div class="dropdown">'
                        . '<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"  >'
                        . '<span class="glyphicon glyphicon-edit"></span></button>'
                        . '<ul class="dropdown-menu">'
                        . '<li><a href="#" attr="'.$updateid.'" type="'.$updateid.'" class="edit_4_session hidden_text_edit glyphicon glyphicon-pencil" title="Edit this status" >Edit</a></li>'.$statusdeletebutton.'</ul></div></span><br><hr>'
                        . '<legend><span class=" data_s_2copy" type="'.$updateid.'" value="'.html_entity_decode($data).'" style="font-size:9px; margin-bottom:0px; margin-top:0px; text-align:left; color:black;">'
                        . html_entity_decode($data).'</span><br><br></legend><b style="text-align:right; color:black;"><small>Posted by:-  <a href="search_results.php?u='.$author.'">'.$author.   '</a>   '.$post_date.'</small></b>'
                        . '<br>'.$status_replies.'<br>';

                if ($is_friend==TRUE||$session_uname==$f_uname) {
                    $status_list.= '<textarea id="'.$updateid.'"  class="status_update input-custom2" placeholder="comment\'s"></textarea>'
                            . '<button id="'.$updateid.'" type="b" class="btn btn-warning pull-right btn-sm">Reply</button></div>';
                    }
                    
                    echo $status_list;
                }elseif ($is_friend==TRUE&&$session_uname!=$f_uname) {
                    $status_list= $statusui_edit.'<div attr="'.$updateid.'" type="'.$updateid.'" class="statusboxes status_'.$updateid.'  jumbotron">'
                        . '<h3 style="color:black; margin-bottom:5px; margin-top:5px;" class="pull-left">'
                        . '<div id="'.$updateid.'" class="title_s_2copy" value="'.html_entity_decode($title).'">'.html_entity_decode($title).'</div></h3>'
                        . '<legend><span class=" data_s_2copy" type="'.$updateid.'" value="'.html_entity_decode($data).'" style="font-size:9px; margin-bottom:0px; margin-top:0px; text-align:left; color:black;">'
                        . html_entity_decode($data).'</span><br><br></legend><b style="text-align:right; color:black;"><small>Posted by:-  <a href="search_results.php?u='.$author.'">'.$author.   '</a>   '.$post_date.'</small></b>'
                        . '<br>'.$status_replies.'<br>';
                             $status_list.= '<textarea id="'.$updateid.'"  class="status_update input-custom2" placeholder="comment\'s"></textarea>'
                            . '<button id="'.$updateid.'" type="b" class="btn btn-warning pull-right btn-sm">Reply</button></div></div>';
                    
                    echo $status_list;
                }
                }  
                
    

code for search_results page where the statuslist is included:-


if($isowner=="yes"){
    $statusui="<div class='jumbotron'><input type='text' class='form-control title_s' name='status_title' placeholder='Title ' ><br>"
            . "<textarea id='wall_id_1' class='update_session' placeholder='whats up ".$session_uname."'>"
            . "</textarea>"
            . "<button style='float:right;' type='a' class='btn btn-warning btn btn-large btn-lg post-s'>Post</button></div>";
 $statusui_edit="<div attr='".$updateid."' class='hidden_edit_4_session session_edit".$updateid." jumbotron'>"
            . "<a href='#' class='pull-right close_edit' title='Close without editing'>Close X</a>"
            . "<input type='text' class='form-control title_s_edit' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >"
            . "<div> </div>"
            . "<textarea id='wall_edit_1'  class='session_edit' placeholder='whats up ".$session_uname."'>
             ".html_entity_decode($data)."</textarea><br>"
            . "<button style='float:right;' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>";
 
    
}
 elseif ($is_friend==TRUE&&$session_uname!=$f_uname) {
       $statusui="<div class='jumbotron'><input type='text' class='form-control title_f' name='status_title' placeholder='Title'><br>"
               . "<textarea id='wall_id_2' type='c'  class='status_4_friend' style='' placeholder='hi ".$session_uname." want to say something to ".$f_uname.". '>"
               . "</textarea><br>"
               . "<button style='float:right;' type='c' class='btn btn-warning btn-large btn-lg post-f'>Post</button></div>";
       $statusui_edit="<div attr='".$updateid."' class='hidden_edit_4_friend friend_edit".$updateid." jumbotron'>"
               . "<a title='Close without editing' href='#' class='pull-right close_edit_f'>Close X</a>"
               . "<input type='text' class='form-control title_f_edit' name='status_title' value='".html_entity_decode($title)."' placeholder='Title'><br>"
               . "<textarea id='wall_edit_2' value='' class='update_4_expresspad'placeholder='hi ".$session_uname." want to say something to ".$f_uname.". '>"
               .html_entity_decode($data)."</textarea><br>"
               . "<button style='float:right;' type='c' class='btn btn-warning btn-large btn-lg post-f-edit'>Update</button>";
 }
    ?>
    <div class="container-fluid">
        <br><div class="row"> </div><br>
        <div class="row">
            <div class="col-sm-2">
                <p>Friends list:</p>
                <?php
                include_once 'notification/friend_list.php';
                echo $friends_html;
                ?>
            </div>    
            <div class="col-lg-8">
                <div class="tab-content">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tabs-1" data-toggle="tab" class="profile">Profile</a></li>
                        <li><a href="#tabs-2" data-toggle="tab"class="articles">Status</a></li>
                        <li><a href="#tabs-4"data-toggle="tab" class="gallery_photos">Gallery</a></li>
                        <li><a href="#tabs-5" data-toggle="tab" class="videos">Videos</a></li>

                    </ul>
                    <div id="tabs-1" class="tab-pane fade profile1 active in">
                           
              <?php
                        echo '<table border="0"><tr width="20%"><td>Profile Photo</td><td>' . $friend_button . '</td></tr>
            <tr><td></td><td>' . $block_button . '</td></tr>
            <tr width="100%"><td width="20%"></td><td width="55%"><p>Full Name:' . $fname_s . ' ' . $lname_s . '<br>

    </td><td width="20%"></td></tr>
        </table>';
                        ?>
                        
                    </div>
                    <div id="tabs-2" class="tab-pane fade articles">
Link to comment
Share on other sites

shan,

 

Your description does not provide any real help in understanding what you are needing help with. I'm sure it makes perfect sense to you as you are fully engaged i the code and the problem. But, your statement doesn't make sense to those of us without any context. Also, just copy/pasting a lot of code suggests you expect those providing free help to try and read through all that code to figure out what the problem may be. Please try to identify the specific part of the code causing the problem, what that code is currently doing, and what you expect the code to do.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.