예제 #1
0
 public function search()
 {
     if ($_POST) {
         //get input from form
         $interests = $this->input->post('interests');
         //seperate string into array
         $terms = procesTags($interests);
         //load model
         $this->load->model('InterestUserModel');
         //do search after friends with common interests
         $friends = $this->InterestUserModel->search_friends_by_interests($terms);
         $data['friends'] = $friends;
     }
     //set action method for form in partial view
     $data['action'] = interests_search_route();
     $data['submit_value'] = "Search";
     //default fallback
     $this->template->load('settings/searchInterestView', $data);
 }
예제 #2
0
파일: search.php 프로젝트: git-ecorise/snp
        echo profile_route($row->id);
        ?>
"><?php 
        echo $row->firstname . ' ' . $row->lastname;
        ?>
</a>
        <?php 
        if (!is_friend($row->id)) {
            ?>
            -&nbsp;<a href="<?php 
            echo friends_add_route($row->id);
            ?>
">add as friend</a>
        <?php 
        }
        ?>
    </li>
    <?php 
    }
    ?>
</ul>
<?php 
}
?>
<br />
<a href="<?php 
echo interests_search_route();
?>
">Find friends by interests</a>
<br />
<br />