skala
Julio Montoya 16 years ago
commit b7548c1ee3
  1. 9
      chamilo_license.txt
  2. 8
      main/admin/index.php
  3. 5
      main/auth/profile.php
  4. 29
      main/css/blue_lagoon/default.css
  5. 778
      main/css/chamilo/default.css
  6. 1
      main/inc/ajax/.htaccess
  7. 4
      main/inc/ajax/social.ajax.php
  8. 7
      main/inc/banner.inc.php
  9. 12
      main/inc/footer.inc.php
  10. 78
      main/inc/lib/message.lib.php
  11. 2
      main/install/install_upgrade.lib.php
  12. 2
      main/messages/inbox.php
  13. 2
      main/messages/new_message.php
  14. 6
      main/messages/outbox.php
  15. 2
      main/messages/view_message.php
  16. 4
      main/social/home.php
  17. 14
      main/social/invitations.php
  18. 20
      whoisonline.php

@ -1,8 +1,8 @@
===============================================================================
Dokeos - elearning and course management software
Chamilo - elearning and course management software
Copyright (c) 2008-2010 Dokeos Latinoamérica SAC
Copyright (c) 2004-2009 Dokeos SPRL
Copyright (c) 2009 Dokeos Latinoamérica SAC
Copyright (c) 2003-2007 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
Copyright (c) 2003-2008 Vrije Universiteit Brussel (VUB)
@ -10,7 +10,7 @@
Copyright (c) Facultad de Matematicas, UADY (México) (Message plugin)
For a full list of contributors detaining copyrights over parts of
the Dokeos software, see "documentation/credits.html".
the Chamilo software, see "documentation/credits.html".
The full license can be read in "documentation/license.html".
This program is free software; you can redistribute it and/or
@ -20,7 +20,6 @@
See the GNU General Public License for more details.
Contact address: Dokeos, Rue du Corbeau, 108, B-1030 Brussels, Belgium
Mail: info@dokeos.com
Mail: info@chamilo.org
===============================================================================
This license is referenced throughout the code using the following header line:

@ -273,11 +273,11 @@ if(api_is_platform_admin()){
}*/
?>
<div class="admin_section">
<h4><?php Display::display_icon('dokeos.gif', 'Dokeos'); ?> Dokeos.com</h4>
<h4><?php Display::display_icon('dokeos.gif', 'Dokeos'); ?> Chamilo.org</h4>
<ul>
<li><a href="http://www.dokeos.com/" target="_blank"><?php echo get_lang('DokeosHomepage'); ?></a></li>
<li><a href="http://www.dokeos.com/forum/" target="_blank"><?php echo get_lang('DokeosForum'); ?></a></li>
<li><a href="http://www.dokeos.com/extensions/" target="_blank"><?php echo get_lang('DokeosExtensions'); ?></a></li>
<li><a href="http://www.chamilo.org/" target="_blank"><?php echo get_lang('ChamiloHomepage'); ?></a></li>
<li><a href="http://forum.chamilo.org/" target="_blank"><?php echo get_lang('ChamiloForum'); ?></a></li>
<li><a href="http://www.chamilo.org/extensions/" target="_blank"><?php echo get_lang('ChamiloExtensions'); ?></a></li>
<li>
<?php
//try to display a maximum before we check the dokeos version and all that

@ -293,6 +293,7 @@ if (is_profile_editable() && api_get_setting('profile', 'password') == 'true') {
// EXTRA FIELDS
$extra = UserManager::get_extra_fields(0, 50, 5, 'ASC');
$extra_data = UserManager::get_extra_user_data(api_get_user_id(), true);
foreach ($extra as $id => $field_details) {
if ($field_details[6] == 0) {
@ -835,7 +836,7 @@ if (api_get_setting('allow_social_tool') == 'true') {
// Style position:absolute has been removed for Opera-compatibility.
//echo '<div id="image-message-container" style="float:right;display:inline;position:absolute;padding:3px;width:250px;" >';
echo '<div id="image-message-container" style="float:right;display:inline;padding:3px;width:230px;" >';
echo '<div id="image-message-container" style="float:right;display:inline;padding:3px;width:150px;" >';
if ($image == 'unknown.jpg') {
echo '<img '.$img_attributes.' />';
@ -851,7 +852,7 @@ if (api_get_setting('allow_social_tool') == 'true') {
} else {
// Style position:absolute has been removed for Opera-compatibility.
//echo '<div id="image-message-container" style="float:right;display:inline;position:absolute;padding:3px;width:250px;" >';
echo '<div id="image-message-container" style="float:right;display:inline;padding:3px;width:250px;" >';
echo '<div id="image-message-container" style="float:right;display:inline;padding:3px;width:230px;" >';
if ($image == 'unknown.jpg') {
echo '<img '.$img_attributes.' />';

@ -43,7 +43,7 @@ body {
/* for content section in main index.php file */
.maincontent {
float: left;
width: 67%;
width: 66%;
padding: 4px;
background-color: #fff;
}
@ -389,8 +389,9 @@ default.css (línea 362)
width: auto;
margin: 24px 6px 0 6px;
padding-left: 10px;
border: 1px solid #ccc;
border: 1px dotted #ddd;
background-color: #FFF;
}
.menusectioncaption {
position: relative;
@ -2201,7 +2202,7 @@ div.comments {
background:#FFF;
border:1px dotted #ccc;
padding: 0px 10px 0 10px;
/* width:50%; */
width:120px;
position:relative;
}
.message-content .message-delete {
@ -2635,11 +2636,15 @@ div.image-social-content center.friend {
}
.social-group-details-info span {
color:#777;
}
.social-group-details-info {
padding:2px 0px 2px 0px;
}
/*****************************************************
* BUTTONS *
*****************************************************/
@ -2935,7 +2940,7 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
background-image:url(images/shadow.gif);
}
.independent_course_item a {
font-size:120%;
font-size:135%;
}
.session_course_item a {
font-size:120%;
@ -2950,12 +2955,22 @@ a.read {
width:100%;
}
#inbox {
width:80%;
float:right;
height:auto;
margin-left:auto;
margin-right:auto;
overflow:hidden;
}
#outbox {
height:auto;
margin-left:auto;
margin-right:auto;
overflow:hidden;
}
#inbox-menu {
width:150px;
float:left;
margin-right:10px;
}
#inbox-menu ul {
list-style-image:none;
@ -3320,7 +3335,7 @@ a.read {
-webkit-border-radius: 10px; border: 1px solid #e1e1e0;
-opera-border-radius: 10px; border: 1px solid #e1e1e0;
width:270px;
width:280px;
margin-top:20px;
margin-right:10px;
margin-bottom:40px;

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
Options -Indexes

@ -163,6 +163,10 @@ switch ($action) {
break;
case 'toogle_course':
if (api_is_anonymous()){
echo '';
break;
}
require_once api_get_path(LIBRARY_PATH).'blog.lib.php';
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';

@ -67,6 +67,8 @@ if (!empty($_cid) and $_cid != -1 and isset($_course)) {
} else {
echo "<div id=\"my_courses\">$nameTools</div>\n";
}
} else {
echo '<div id="my_courses"></div>';
}
//not to let the header disappear if there's nothing on the left
echo ' <div class="clear">&nbsp;</div>';
@ -197,7 +199,7 @@ if ($_user['user_id'] && !api_is_anonymous()) {
}
// My Profile
if (api_get_setting('show_tabs', 'my_profile') == 'true' && api_get_setting('show_tabs', 'social') != 'true') {
if (api_get_setting('show_tabs', 'my_profile') == 'true' && api_get_setting('allow_social_tool') != 'true') {
$navigation['myprofile'] = $possible_tabs['myprofile'];
} else {
$menu_navigation['myprofile'] = $possible_tabs['myprofile'];
@ -395,6 +397,9 @@ if (!empty($final_navigation)) {
echo '<div id="header4">';
echo implode(' &gt; ',$final_navigation);
echo '</div>';
} else {
echo '<div id="header4">';
echo '</div>';
}
if(api_get_setting('show_toolshortcuts')=='true') {
echo '<div id="toolshortcuts">';

@ -1,10 +1,10 @@
<?php
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /chamilo_license.txt */
/**
==============================================================================
* This script displays the footer that is below (almost)
* every Dokeos web page.
* every Chamilo web page.
*
* @package dokeos.include
==============================================================================
@ -38,7 +38,7 @@ if (api_get_setting('show_navigation_menu') != 'false') {
<div class="copyright">
<?php
global $_configuration;
echo get_lang("Platform"), ' <a href="http://www.dokeos.com" target="_blank">Dokeos ', $_configuration['dokeos_version'], '</a> &copy; ', date('Y');
echo get_lang("Platform"), ' <a href="http://www.chamilo.org" target="_blank">Chamilo ', $_configuration['dokeos_version'], '</a> &copy; ', date('Y');
// Server mode indicator.
if (api_is_platform_admin()) {
if (api_get_setting('server_type') == 'test') {
@ -58,14 +58,11 @@ if (api_is_platform_admin()) {
api_plugin('footer');
if (api_get_setting('show_administrator_data')=='true') {
// Platform manager
echo '<span id="platformmanager">', get_lang('Manager'), ' : ', Display::encrypted_mailto_link(api_get_setting('emailAdministrator'), api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname')));
}
if (api_get_setting('show_tutor_data')=='true') {
// course manager
$id_course=api_get_course_id();
$id_session=api_get_session_id();
@ -73,7 +70,6 @@ if (api_get_setting('show_tutor_data')=='true'){
echo '<span id="coursemanager">';
if ($id_session!=0){
$coachs_email=CourseManager::get_email_of_tutor_to_session($id_session,$id_course);
$email_link = array();
foreach ($coachs_email as $coach_email) {
foreach ($coach_email as $email=>$username) {
@ -109,10 +105,8 @@ if (api_get_setting('show_teacher_data')=='true') {
}
echo '</span>';
}
}
?>&nbsp;
</div> <!-- end of #footer -->
</body>

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /chamilo_license.txt */
/**
==============================================================================
@ -146,15 +146,16 @@ class MessageManager
}
if ($request===true) {
if($result[4]==0) {
/*if($result[4]==0) {
$message[1] = Display::return_icon('mail_open.png',get_lang('AlreadyReadMessage'));//Message already read
} else {
$message[1] = Display::return_icon('mail.png',get_lang('UnReadMessage'));//Message without reading
}
}*/
$message[2] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.GetFullUserName($result[1]).'</a>';
$message[3] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",$result[2]).'</a>';
$message[5] = '<a onclick="reply_to_messages(\'show\','.$result[0].',\'\')" href="javascript:void(0)">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
$message[1] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.GetFullUserName($result[1]).'</a>';
$message[2] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",$result[2]).'</a>';
$message[4] = '<a onclick="reply_to_messages(\'show\','.$result[0].',\'\')" href="javascript:void(0)">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a onclick="delete_one_message('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
} else {
if($result[4]==1) {
@ -162,24 +163,20 @@ class MessageManager
} else {
$class = 'class = "read"';
}
$link = '';
if ($_GET['f']=='social') {
$link = '&f=social';
}
$message[2] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.GetFullUserName(($result[1])).'</a>';;
$message[3] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.$result[2].'</a>';
$message[5] = '<a href="new_message.php?re_id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
$message[1] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.GetFullUserName(($result[1])).'</a>';;
$message[2] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.$result[2].'</a>';
$message[4] = '<a href="new_message.php?re_id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="inbox.php?action=deleteone&id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
}
$message[4] = ($result[3]); //date stays the same
$message[3] = $result[3]; //date stays the same
foreach($message as $key => $value) {
$message[$key] = api_xml_http_response_encode($value);
}
$message_list[] = $message;
$i++;
}
return $message_list;
@ -564,7 +561,6 @@ class MessageManager
}
/**
* Gets information about messages sent
* @author Isaac FLores Paz <isaac.flores@dokeos.com>
* @param integer
* @param integer
* @param string
@ -589,6 +585,7 @@ class MessageManager
$i = 0;
$message_list = array ();
while ($result = Database::fetch_row($sql_result)) {
if ($request===true) {
$message[0] = '<input type="checkbox" value='.$result[0].' name="out[]">';
} else {
@ -598,30 +595,28 @@ class MessageManager
$class = 'class = "read"';
if ($request===true) {
if ($result[5]==4) {
$message[1] = Display::return_icon('mail_send.png',get_lang('MessageSent'));//Message Sent
}
$message[2] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.GetFullUserName($result[4]).'</a>';
$message[3] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",$result[2]).'</a>';
$message[5] = '&nbsp;&nbsp;<a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
$message[1] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.GetFullUserName($result[4]).'</a>';
$message[2] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",$result[2]).'</a>';
$message[3] = $result[3]; //date stays the same
$message[4] = '&nbsp;&nbsp;<a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
} else {
$link = '';
if ($_GET['f']=='social') {
$link = '&f=social';
}
$message[2] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.GetFullUserName($result[4]).'</a>';
$message[3] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.$result[2].'</a>';
$message[5] = '<a href="outbox.php?action=deleteone&id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
$message[1] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.GetFullUserName($result[4]).'</a>';
$message[2] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.$result[2].'</a>';
$message[3] = $result[3]; //date stays the same
$message[4] = '<a href="outbox.php?action=deleteone&id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
}
$message[4] = $result[3]; //date stays the same
foreach($message as $key => $value) {
$message[$key] = $value;
}
$message_list[] = $message;
$i++;
}
return $message_list;
}
/**
@ -1068,7 +1063,6 @@ function inbox_display() {
$table_message = Database::get_main_table(TABLE_MESSAGE);
$request=api_is_xml_http_request();
if ($_SESSION['social_exist']===true) {
$redirect="#remote-tab-2";
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success= get_lang('SelectedMessagesDeleted');
} else {
@ -1098,11 +1092,11 @@ function inbox_display() {
$table->set_header(0, '', false,array ('style' => 'width:20px;'));
$title=api_xml_http_response_encode(get_lang('Title'));
$action=api_xml_http_response_encode(get_lang('Actions'));
$table->set_header(1,api_xml_http_response_encode(get_lang('Status')),false,array('style' => 'width:30px;'));
$table->set_header(2,api_xml_http_response_encode(get_lang('From')),false);
$table->set_header(3,$title,false);
$table->set_header(4,api_xml_http_response_encode(get_lang('Date')),false,array('style' => 'width:150px;'));
$table->set_header(5,$action,false,array ('style' => 'width:100px;'));
$table->set_header(1,api_xml_http_response_encode(get_lang('From')),false);
$table->set_header(2,$title,false);
$table->set_header(3,api_xml_http_response_encode(get_lang('Date')),false, array('style' => 'width:150px;'));
$table->set_header(4,$action,false,array ('style' => 'width:70px;'));
if ($_REQUEST['f']=='social') {
$parameters['f'] = 'social';
@ -1146,10 +1140,7 @@ function outbox_display() {
if ($_REQUEST['f']=='social') {
$social_link ='f=social';
}
if ($_SESSION['social_exist']===true) {
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success= get_lang('SelectedMessagesDeleted')."&nbsp<br><a href=\""."../social/index.php?$social_link\">".get_lang('BackToOutbox')."</a>";
}else {
@ -1177,18 +1168,17 @@ function outbox_display() {
}
}
// display sortable table with messages of the current user
$table = new SortableTable('messages', 'get_number_of_messages_send_mask', 'get_message_data_send_mask', 3, get_number_of_messages_send_mask(), 'DESC');
$title=api_xml_http_response_encode(get_lang('Title'));
$action=api_xml_http_response_encode(get_lang('Actions'));
$title =get_lang('Title');
$action=get_lang('Actions');
$table->set_header(0, '', false,array ('style' => 'width:20px;'));
$table->set_header(1, api_xml_http_response_encode(get_lang('Status')),false,array ('style' => 'width:30px;'));
$table->set_header(2, api_xml_http_response_encode(get_lang('To')),false);
$table->set_header(3, $title,false);
$table->set_header(4, api_xml_http_response_encode(get_lang('Date')),false,array ('style' => 'width:150px;'));
$table->set_header(5,$action, false,array ('style' => 'width:100px;'));
$table->set_header(1, api_xml_http_response_encode(get_lang('To')),false);
$table->set_header(2, $title,false);
$table->set_header(3, api_xml_http_response_encode(get_lang('Date')),false,array ('style' => 'width:150px;'));
$table->set_header(4,$action, false,array ('style' => 'width:50px;'));
if ($_REQUEST['f']=='social') {
$parameters['f'] = 'social';

@ -205,7 +205,7 @@ function write_dokeos_config_file($path)
<li>Permission problems.<br />Try initially with <em>chmod -R 777</em> and increase restrictions gradually.</li>
<li>PHP is running in <a href="http://www.php.net/manual/en/features.safe-mode.php" target="_blank">Safe-Mode</a>. If possible, try to switch it off.</li>
</ul>
<a href="http://www.dokeos.com/forum/" target="_blank">Read about this problem in Support Forum</a><br /><br />
<a href="http://forum.chamilo.org/" target="_blank">Read about this problem in Support Forum</a><br /><br />
Please go back to step 5.
<p><input type="submit" name="step5" value="&lt; Back" /></p>
</td></tr></table></form></body></html>';

@ -124,7 +124,7 @@ $table_message = Database::get_main_table(TABLE_MESSAGE);
//api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox')));
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;

@ -255,7 +255,7 @@ function manage_form ($default, $select_from_user_list = null) {
*/
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => '#','name' => $nameTools);
} else {
$this_section = SECTION_MYPROFILE;

@ -68,7 +68,7 @@ function deselect_all(formita)
//api_display_tool_title(api_xml_http_response_encode(get_lang('Inbox')));
if ($_GET['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
} else {
$this_section = SECTION_MYPROFILE;
@ -153,7 +153,11 @@ echo '<div id="social-content">';
MessageManager::delete_message_by_user_sender(api_get_user_id(), $delete_list_id[$i]);
}
$delete_list_id=array();
//------------------------
outbox_display();
//------------------------
} elseif ($_REQUEST['action']=='deleteone') {
$delete_list_id=array();
$id=Security::remove_XSS($_GET['id']);

@ -21,7 +21,7 @@ require_once api_get_path(LIBRARY_PATH).'message.lib.php';
*/
if ($_REQUEST['f']=='social') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox'));
} else {
$this_section = SECTION_MYPROFILE;

@ -7,6 +7,7 @@
$language_file = array('userInfo');
$cidReset = true;
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
@ -19,7 +20,6 @@ $show_full_profile = true;
$this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' => 'home.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Home'));
api_block_anonymous_users();
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
@ -54,7 +54,7 @@ if (api_get_setting('profile', 'picture') == 'true') {
}
}
Display :: display_header(null);
Display :: display_header(get_lang('Home'));
$user_info = UserManager :: get_user_info_by_id(api_get_user_id());
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'),true);
$user_online_count = count($user_online_list);

@ -76,6 +76,8 @@ if (is_array($_GET) && count($_GET)>0) {
if (in_array($user_role , array(GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER,GROUP_USER_PERMISSION_PENDING_INVITATION))) {
GroupPortalManager::update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER);
$show_message = get_lang('UserIsSubscribedToThisGroup');
} elseif (in_array($user_role , array(GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
$show_message = get_lang('UserIsAlreadySubscribedToThisGroup');
} else {
$show_message = get_lang('UserIsNotSubscribedToThisGroup');
}
@ -89,14 +91,9 @@ if (is_array($_GET) && count($_GET)>0) {
}
}
$language_variable = get_lang('PendingInvitations');
$language_comment = get_lang('SocialInvitesComment');
echo '<div id="social-content">';
echo '<div id="social-content-left">';
@ -117,9 +114,14 @@ echo '<div id="social-content">';
$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id);
$list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id);
$pending_invitations = GroupPortalManager::get_groups_by_user($user_id, GROUP_USER_PERMISSION_PENDING_INVITATION);
$number_loop = count($list_get_invitation);
$total_invitations = $number_loop + count($list_get_invitation_sent);
if ($total_invitations == 0 ) {
echo '<a href="search.php">'.get_lang('TryAndFindSomeFriends').'</a>';
}
if ($number_loop != 0) {
echo '<h2>'.get_lang('InvitationReceived').'</h2>';

@ -117,6 +117,7 @@ if ($_GET['chatid'] != '') {
// This if statement prevents users accessing the who's online feature when it has been disabled.
if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) || ((api_get_setting('showonline', 'users') == 'true' || api_get_setting('showonline', 'course') == 'true') && $_user['user_id'])) {
if(isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) {
$user_list = Who_is_online_in_this_course($_user['user_id'], api_get_setting('time_limit_whosonline'), $_GET['cidReq']);
} else {
@ -125,8 +126,10 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
$total = count($user_list);
if (!isset($_GET['id'])) {
Display::display_header(get_lang('UsersOnLineList'));
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content-left">';
//this include the social menu div
if (!api_is_anonymous()) {
@ -136,30 +139,31 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if ($_GET['id'] == '') {
echo '<p><a class="refresh" href="javascript:window.location.reload()">'.get_lang('Refresh').'</a></p>';
} else {
} /*else {
if (0) {
// if ($_user['user_id'] && $_GET["id"] != $_user['user_id']) {
echo '<a href="'.api_get_self().'?chatid='.Security::remove_XSS($_GET['id']).'">'.get_lang('SendChatRequest').'</a>';
}
}*/
} else {
echo '<div class="actions-title">';
echo get_lang('UsersOnLineList');
echo '</div>';
}
}
if ($user_list) {
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content-right">';
//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_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
SocialManager::display_user_list($user_list);
*/
echo '</div>';
} else {
//individual user information - also displays header info
SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));

Loading…
Cancel
Save