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); ?>
13 <div class="input-form" style="float:right; width:34%;padding:1em;min-height:4.5em;">
14 <div class="contentrow">
15 <h3><?php echo _AT('search_for_friends'); ?></h3>
16 <form action="<?php echo url_rewrite(AT_SOCIAL_BASENAME.'index_public.php');?>" method="POST" id="search_friends_form">
17 <label for="searchFriends" style="display:none;"><?php echo _AT('search'); ?></label>
18 <input type="text" size="60" 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')"/>
19 <input type="submit" name="search" value="<?php echo _AT('search'); ?>">
20 <input type="hidden" name="rand_key" value="<?php echo $rand; ?>" />
22 <div id="livesearch"></div>
26 <div class="" style="float:left; width:59%">
27 <div class="headingbox"><h3><?php echo _AT('search_results'); ?></h3></div>
28 <div class="contentbox">
30 if (!empty($this->friends)):
31 $privacy_controller = new PrivacyController();
32 echo "<h4>"._AT('there_are_entries', sizeof($this->friends))."</h4>";
33 foreach ($this->friends as $id=>$person):
34 $privacy_obj = $privacy_controller->getPrivacyObject($id);
35 // debug($privacy_obj->getSearch(), 'search'.$id);
36 $relationship = $privacy_controller->getRelationship($id);
38 if ((!isset($person['added']) || $person['added']!=1) && !PrivacyController::validatePrivacy(AT_SOCIAL_SEARCH_VISIBILITY, $relationship, $privacy_obj->getSearch())){
39 //if this user doesn't want to be searched.
43 <div class="contact_mini" >
45 <div style="float:left;"><?php echo printSocialProfileImg($id); ?></div>
46 <div style="padding-left:0.5em; float:left;">
48 $member_obj = new Member($id);
49 $profile = $member_obj->getAddress();
50 echo printSocialName($id) . '<br/>';
51 echo $profile['country'] . ' ' . $profile['province'] . '<br/>';
54 <div style="clear:both;"></div><br/>
60 echo _AT('none_found');
65 <div style="float:right;">
66 [-- TODO: Paginator --]
70 <div style="clear:both;"></div>
71 <?php print_paginator($this->page, $this->num_pages, 'search_friends='.$this->search_field, 1); ?>