Fixing whoisonline UI

skala
Julio Montoya 15 years ago
parent 883ae467da
commit 10c91925b7
  1. 16
      main/inc/lib/online.inc.php
  2. 19
      main/inc/lib/sortabletable.class.php
  3. 2
      main/inc/lib/usermanager.lib.php
  4. 9
      whoisonline.php

@ -138,14 +138,7 @@ function who_is_online($valid, $friends = false) {
//$query = "SELECT login_user_id,login_date FROM ".$track_online_table ." WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."' "; //WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."'
$query = "SELECT login_user_id,login_date FROM ".$track_online_table ." e INNER JOIN ".$table_user ." u ON (u.user_id=e.login_user_id) WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."' ORDER BY picture_uri DESC";
}
/*
//This query will show all registered users. Only for dev purposes.
$query = "SELECT DISTINCT u.user_id as login_user_id, login_date
FROM ".$track_online_table ." e , $table_user u
GROUP by u.user_id ORDER BY picture_uri DESC";
}*/
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
@ -164,7 +157,12 @@ function who_is_online($valid, $friends = false) {
}
}
}
/*
//This query will show all registered users. Only for dev purposes.
$query = "SELECT DISTINCT u.user_id as login_user_id, login_date
FROM ".$track_online_table ." e , $table_user u
GROUP by u.user_id ORDER BY picture_uri DESC";
*/
$result = @Database::query($query);
//@todo why we dont believe in db query results?
if (count($result)>0) {

@ -310,17 +310,22 @@ class SortableTable extends HTML_Table {
.grid_selectbox { width:30%; float:left;}
.grid_title { width:30%; float:left;}
.grid_nav { }
</style>';
// @todo This also must be moved
// Show only navigations if there are more than 1 page
$my_pager = $this->get_pager();
$html .= '<div class="main-grid">';
$html .= '<div class="sub-header">';
$html .= '<div class="grid_selectbox">'.$form.'</div>';
$html .= '<div class="grid_title">'.$this->get_table_title().'</div>';
$html .= '<div class="grid_nav">'.$nav.'</div>';
$html .= '</div>';
if ($my_pager->numPages() > 1) {
$html .= '<div class="sub-header">';
$html .= '<div class="grid_selectbox">'.$form.'</div>';
$html .= '<div class="grid_title">'.$this->get_table_title().'</div>';
$html .= '<div class="grid_nav">'.$nav.'</div>';
$html .= '</div>';
}
$html .= '<div class="clear"></div>';
if (count($this->form_actions) > 0) {

@ -2786,7 +2786,7 @@ class UserManager
<div id="search_label">
<b>'.get_lang('Search').'</b > ('.get_lang('UsersGroups').')
<div>
<input type="text" size="30" value="'.Security::remove_XSS($query).'" name="q"/><br />
<input type="text" size="30" value="'.Security::remove_XSS($query).'" name="q"/> &nbsp;
<button class="search" type="submit" value="search">'.get_lang('Search').'</button>
</div>
</td>

@ -148,13 +148,20 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content-right">';
echo '<div class="social-box-container2">';
//this include the social menu div
if (!api_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
}
SocialManager::display_user_list($user_list);
echo '</div>';
if (api_get_setting('allow_social_tool') == 'true') {
echo '</div>';
echo '</div>';
}
} else {
//individual user information - also displays header info
SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));

Loading…
Cancel
Save