1 <script src="<?php echo AT_SOCIAL_BASENAME; ?>lib/js/livesearch.js" type="text/javascript"></script>
4 //Generate a random number for the search input name fields, so that the browser will not remember any previous entries.
5 $rand = md5(rand(0, time()));
6 if ($this->rand_key != ''){
7 $last_search = $_POST['search_friends_'.$this->rand_key];
9 $last_search = $_POST['search_friends_'.$rand];
12 <?php print_paginator($this->page, $this->num_pages, 'search_friends='.$this->search_field, 1); ?>
14 <div class="input-form">
15 <div class="contentrow">
16 <h3><?php echo _AT('search_for_friends'); ?></h3>
17 <form action="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'index_public.php');?>" method="POST" id="search_friends_form">
18 <label for="searchFriends" style="display:none;"><?php echo _AT('search'); ?></label>
19 <input type="text" size="40" name="search_friends_<?php echo $rand;?>" id="search_friends" value="<?php echo $last_search; ?>" onkeyup="showResults(this.value, 'livesearch', '<?php echo AT_SOCIAL_BASENAME; ?>index_public.php')"/>
20 <input type="submit" name="search" value="<?php echo _AT('search'); ?>">
21 <input type="hidden" name="rand_key" value="<?php echo $rand; ?>" />
23 <div id="livesearch"></div>
28 <div class="headingbox"><h3><?php echo _AT('search_results'); ?></h3></div>
29 <div class="contentbox">
31 if (!empty($this->friends)):
32 $privacy_controller = new PrivacyController();
33 echo "<h4>"._AT('there_are_entries', sizeof($this->friends))."</h4>";
34 foreach ($this->friends as $id=>$person):
35 $privacy_obj = $privacy_controller->getPrivacyObject($id);
36 // debug($privacy_obj->getSearch(), 'search'.$id);
37 $relationship = $privacy_controller->getRelationship($id);
39 if ((!isset($person['added']) || $person['added']!=1) && !PrivacyController::validatePrivacy(AT_SOCIAL_SEARCH_VISIBILITY, $relationship, $privacy_obj->getSearch())){
40 //if this user doesn't want to be searched.
44 <div class="contact_mini" >
46 <div ><?php echo printSocialProfileImg($id); ?></div>
49 $member_obj = new Member($id);
50 $profile = $member_obj->getAddress();
51 echo printSocialName($id) . '<br/>';
52 echo $profile['country'] . ' ' . $profile['province'] . '<br/>';
55 <div style="clear:both;"></div><br/>
61 echo _AT('none_found');
66 <div style="float:right;">
67 [-- TODO: Paginator --]
72 <div style="clear:both;"></div>
73 <?php print_paginator($this->page, $this->num_pages, 'search_friends='.$this->search_field, 1); ?>