[svn r18286] minor-logic changes - allow show user in the search - (partial FS#3383)

skala
Isaac Flores 17 years ago
parent 1aba3bdda4
commit a0f0ba26cf
  1. 9
      main/social/response.inc.php
  2. 9
      main/social/select_options.php

@ -1,9 +0,0 @@
<?php
/*
* Created on 22/01/2009
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
?>
<input type="button" class="button" name="btn_2" id="btn_2" value="value" />

@ -8,10 +8,11 @@ $tbl_my_user = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_my_user_friend = Database :: get_main_table(TABLE_MAIN_USER_FRIEND);
$search=$_POST['search'];
$html_form='<select id="id_search_name" name="id_search_name" size="8"" class="message-select-box">';
$sql='SELECT DISTINCT u.user_id as id,concat(u.firstname," ",u.lastname," ","( ",u.email," )") as name FROM '.$tbl_my_user.' u
INNER JOIN '.$track_online_table.' t
ON u.user_id=t.login_user_id INNER JOIN '.$tbl_my_user_friend.' uf
ON uf.friend_user_id=u.user_id ;';
$sql='SELECT DISTINCT u.user_id as id,concat(u.firstname," ",u.lastname," ","( ",u.email," )") as name
FROM '.$tbl_my_user.' u INNER JOIN '.$track_online_table.' t ON u.user_id=t.login_user_id';
if (api_get_setting('allow_social_tool')=='true') {
$sql.='INNER JOIN '.$tbl_my_user_friend.' uf ON uf.friend_user_id=u.user_id ';
}
$res=api_sql_query($sql,__FILE__,__LINE__);
while ($row=Database::fetch_array($res,'ASSOC')) {
$html_form.='<option value="'.$row['id'].'">'.$row['name'].'</option>';

Loading…
Cancel
Save