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. 33
      main/css/blue_lagoon/default.css
  5. 824
      main/css/chamilo/default.css
  6. 1
      main/inc/ajax/.htaccess
  7. 4
      main/inc/ajax/social.ajax.php
  8. 2
      main/inc/ajax/user_manager.ajax.php
  9. 13
      main/inc/banner.inc.php
  10. 28
      main/inc/footer.inc.php
  11. 94
      main/inc/lib/message.lib.php
  12. 2
      main/install/install_upgrade.lib.php
  13. 4
      main/messages/inbox.php
  14. 2
      main/messages/new_message.php
  15. 6
      main/messages/outbox.php
  16. 2
      main/messages/view_message.php
  17. 4
      main/social/home.php
  18. 232
      main/social/invitations.php
  19. 58
      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;
@ -586,7 +587,7 @@ input.liteoption {
width: 100%;
margin: 0 auto;
border: 1px solid #bbb;
border-collapse: collapse;
border-collapse: collapse;
}
.agenda_month_divider {
background-color: #dcdcdc;
@ -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%;
@ -2948,14 +2953,24 @@ a.read {
}
#inbox-wrapper {
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';

@ -9,7 +9,7 @@ $action = $_GET['a'];
switch ($action) {
case 'search_tags':
if (api_is_anonymous()){
if (api_is_anonymous()) {
echo '';
break;
} else {

@ -35,7 +35,7 @@ $session_name = api_get_session_name($my_session_id);
Course title section
-----------------------------------------------------------------------------
*/
if (!empty($_cid) and $_cid != -1 and isset($_course)) {
if (!empty($_cid) and $_cid != -1 and isset($_course)) {
//Put the name of the course in the header
?>
<div id="my_courses"><a href="<?php echo api_get_path(WEB_COURSE_PATH).$_course['path']; ?>/index.php" target="_top">
@ -58,15 +58,17 @@ if (!empty($_cid) and $_cid != -1 and isset($_course)) {
echo stripslashes($_course['titular']);
}
echo "</a></div>";
} elseif (isset ($nameTools) && $language_file != 'course_home') {
} elseif (isset ($nameTools) && $language_file != 'course_home') {
//Put the name of the user-tools in the header
if (!isset ($_user['user_id'])) {
echo " ";
} elseif(!$noPHP_SELF) {
} elseif(!$noPHP_SELF) {
echo "<div id=\"my_courses\"><a href=\"".api_get_self()."?".api_get_cidreq(), "\" target=\"_top\">", $nameTools, "</a></div>", "\n";
} 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'){
if (api_get_setting('show_tutor_data')=='true') {
// course manager
$id_course=api_get_course_id();
$id_session=api_get_session_id();
@ -73,13 +70,12 @@ 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) {
$email_link[] = Display::encrypted_mailto_link($email,$username);
}
}
$email_link = array();
foreach ($coachs_email as $coach_email) {
foreach ($coach_email as $email=>$username) {
$email_link[] = Display::encrypted_mailto_link($email,$username);
}
}
echo '&nbsp;'.get_lang('Coachs')." : ".implode("&nbsp;|&nbsp;",$email_link);
}
echo '</span>';
@ -109,11 +105,9 @@ if (api_get_setting('show_teacher_data')=='true') {
}
echo '</span>';
}
}
?>&nbsp;
</div> <!-- end of #footer -->
</body>
</html>
</html>

@ -1,5 +1,5 @@
<?php
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /chamilo_license.txt */
/**
==============================================================================
@ -139,47 +139,44 @@ class MessageManager
$message_list = array ();
while ($result = Database::fetch_row($sql_result)) {
if ($request===true) {
if ($request===true) {
$message[0] = '<input type="checkbox" value='.$result[0].' name="id[]">';
} else {
$message[0] = ($result[0]);
}
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) {
$class = 'class = "unread"';
} else {
$class = 'class = "read"';
}
$link = '';
}
$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 {
@ -597,31 +594,29 @@ 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>';
if ($request===true) {
$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;
}
/**
@ -1067,8 +1062,7 @@ function inbox_display() {
// $charset = api_get_setting('platform_charset');
$table_message = Database::get_main_table(TABLE_MESSAGE);
$request=api_is_xml_http_request();
if ($_SESSION['social_exist']===true) {
$redirect="#remote-tab-2";
if ($_SESSION['social_exist']===true) {
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';
@ -1145,11 +1139,8 @@ function outbox_display() {
$social_link = false;
if ($_REQUEST['f']=='social') {
$social_link ='f=social';
}
if ($_SESSION['social_exist']===true) {
}
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 {
@ -1176,19 +1167,18 @@ function outbox_display() {
break;
}
}
// 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>';

@ -6,7 +6,7 @@
// name of the language file that needs to be included
$language_file = array('registration','messages','userInfo');
$cidReset=true;
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
@ -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);

@ -72,13 +72,15 @@ if (is_array($_GET) && count($_GET)>0) {
foreach($_GET as $key => $value) {
switch ($key) {
case 'accept':
$user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value);
$user_role = GroupPortalManager::get_user_group_role(api_get_user_id(), $value);
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');
}
}
break 2;
case 'deny':
// delete invitation
@ -88,15 +90,10 @@ 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">';
@ -110,118 +107,123 @@ echo '<div id="social-content">';
Display :: display_normal_message($show_message);
}
echo '<div id="id_response" align="center"></div>';
$list_get_invitation=array();
$user_id = api_get_user_id();
$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);
if ($number_loop != 0) {
echo '<h2>'.get_lang('InvitationReceived').'</h2>';
foreach ($list_get_invitation as $invitation) {
$sender_user_id = $invitation['user_sender_id']
?>
<div id="<?php echo 'id_'.$sender_user_id ?>" class="invitation_confirm">
<?php
$picture = UserManager::get_user_picture_path_by_id($sender_user_id,'web',false,true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
$user_info = api_get_user_info($sender_user_id);
$title = api_convert_encoding($invitation['title'],$charset);
$content = api_convert_encoding($invitation['content'],$charset);
$date = $invitation['send_date'];
?>
<table cellspacing="0" border="0">
<tbody>
<tr>
<td class="invitation_image">
<a href="profile.php?u=<? echo $sender_user_id; ?>">
<img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></a>
</td>
<td class="info">
<a class="profile_link" href="profile.php?u=<?php echo $sender_user_id;?>"><? echo api_get_person_name($user_info['firstName'], $user_info['lastName']);?></a>
<div>
<?php echo $title.' : '.$content;?>
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
</div>
<div class="buttons">
<button class="save" name="btn_accepted" type="submit" id="<?php echo "btn_accepted_".$sender_user_id ?>" value="<?php echo get_lang('Accept');?>"onclick="javascript:register_friend(this)">
<?php echo get_lang('Accept') ?></button>
<button class="cancel" name="btn_denied" type="submit" id="<?php echo "btn_deniedst_".$sender_user_id ?>" value="<?php echo get_lang('Deny'); ?>" onclick="javascript:denied_friend(this)" >
<?php echo get_lang('Deny')?></button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}
}
echo '<div class="clear"></div>';
echo '<div id="id_response" align="center"></div>';
$list_get_invitation=array();
$user_id = api_get_user_id();
$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>';
if (count($list_get_invitation_sent) > 0 ){
echo '<h2>'.get_lang('InvitationSent').'</h2>';
foreach ($list_get_invitation_sent as $invitation) {
$sender_user_id = $invitation['user_receiver_id'];?>
<div id="<?php echo 'id_'.$sender_user_id ?>" class="invitation_confirm">
<?php
$picture = UserManager::get_user_picture_path_by_id($sender_user_id,'web',false,true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
$user_info = api_get_user_info($sender_user_id);
$title = api_convert_encoding($invitation['title'], $charset);
$content = api_convert_encoding($invitation['content'],$charset);
$date = $invitation['send_date'];
?>
<table cellspacing="0" border="0">
<tbody>
<tr>
<td class="invitation_image">
<a href="profile.php?u=<?php echo $sender_user_id;?>">
<img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></a>
</td>
<td class="info">
<a class="profile_link" href="profile.php?u=<?php echo $sender_user_id; ?>"><?php echo api_get_person_name($user_info['firstName'], $user_info['lastName']);?></a>
<div>
<?php echo $title.' : '.$content;?>
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
</div>
</td>
</tr>
</tbody>
</table>
</div>
foreach ($list_get_invitation as $invitation) {
$sender_user_id = $invitation['user_sender_id']
?>
<div id="<?php echo 'id_'.$sender_user_id ?>" class="invitation_confirm">
<?php
$picture = UserManager::get_user_picture_path_by_id($sender_user_id,'web',false,true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
$user_info = api_get_user_info($sender_user_id);
$title = api_convert_encoding($invitation['title'],$charset);
$content = api_convert_encoding($invitation['content'],$charset);
$date = $invitation['send_date'];
?>
<table cellspacing="0" border="0">
<tbody>
<tr>
<td class="invitation_image">
<a href="profile.php?u=<? echo $sender_user_id; ?>">
<img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></a>
</td>
<td class="info">
<a class="profile_link" href="profile.php?u=<?php echo $sender_user_id;?>"><? echo api_get_person_name($user_info['firstName'], $user_info['lastName']);?></a>
<div>
<?php echo $title.' : '.$content;?>
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
</div>
<div class="buttons">
<button class="save" name="btn_accepted" type="submit" id="<?php echo "btn_accepted_".$sender_user_id ?>" value="<?php echo get_lang('Accept');?>"onclick="javascript:register_friend(this)">
<?php echo get_lang('Accept') ?></button>
<button class="cancel" name="btn_denied" type="submit" id="<?php echo "btn_deniedst_".$sender_user_id ?>" value="<?php echo get_lang('Deny'); ?>" onclick="javascript:denied_friend(this)" >
<?php echo get_lang('Deny')?></button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}
}
if (count($pending_invitations) > 0) {
echo '<h2>'.get_lang('GroupsWaitingApproval').'</h2>';
$new_invitation = array();
foreach ($pending_invitations as $invitation) {
$picture = GroupPortalManager::get_picture_group($invitation['id'], $invitation['picture_uri'],80);
$img = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
$invitation['picture_uri'] = '<a href="groups.php?id='.$invitation['id'].'">'.$img.'</a>';
$invitation['name'] = '<a href="groups.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
$invitation['join'] = '<a href="invitations.php?accept='.$invitation['id'].'">'.get_lang('AcceptInvitation').'</a>';
$invitation['deny'] = '<a href="invitations.php?deny='.$invitation['id'].'">'.get_lang('DenyInvitation').'</a>';
$invitation['description'] = cut($invitation['description'],220,true);
//$invitation['send_message'] = '<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$invitation['id'].'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">';
//$invitation['send_message'] .= Display::return_icon('message_new.png').'&nbsp;&nbsp;'.get_lang('SendMessage').'</a>';
$new_invitation[]=$invitation;
}
Display::display_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true));
}
echo '<div class="clear"></div>';
if (count($list_get_invitation_sent) > 0 ){
echo '<h2>'.get_lang('InvitationSent').'</h2>';
foreach ($list_get_invitation_sent as $invitation) {
$sender_user_id = $invitation['user_receiver_id'];?>
<div id="<?php echo 'id_'.$sender_user_id ?>" class="invitation_confirm">
<?php
$picture = UserManager::get_user_picture_path_by_id($sender_user_id,'web',false,true);
$friends_profile = SocialManager::get_picture_user($sender_user_id, $picture['file'], 92);
$user_info = api_get_user_info($sender_user_id);
$title = api_convert_encoding($invitation['title'], $charset);
$content = api_convert_encoding($invitation['content'],$charset);
$date = $invitation['send_date'];
?>
<table cellspacing="0" border="0">
<tbody>
<tr>
<td class="invitation_image">
<a href="profile.php?u=<?php echo $sender_user_id;?>">
<img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></a>
</td>
<td class="info">
<a class="profile_link" href="profile.php?u=<?php echo $sender_user_id; ?>"><?php echo api_get_person_name($user_info['firstName'], $user_info['lastName']);?></a>
<div>
<?php echo $title.' : '.$content;?>
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
}
}
if (count($pending_invitations) > 0) {
echo '<h2>'.get_lang('GroupsWaitingApproval').'</h2>';
$new_invitation = array();
foreach ($pending_invitations as $invitation) {
$picture = GroupPortalManager::get_picture_group($invitation['id'], $invitation['picture_uri'],80);
$img = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
$invitation['picture_uri'] = '<a href="groups.php?id='.$invitation['id'].'">'.$img.'</a>';
$invitation['name'] = '<a href="groups.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
$invitation['join'] = '<a href="invitations.php?accept='.$invitation['id'].'">'.get_lang('AcceptInvitation').'</a>';
$invitation['deny'] = '<a href="invitations.php?deny='.$invitation['id'].'">'.get_lang('DenyInvitation').'</a>';
$invitation['description'] = cut($invitation['description'],220,true);
//$invitation['send_message'] = '<a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$invitation['id'].'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">';
//$invitation['send_message'] .= Display::return_icon('message_new.png').'&nbsp;&nbsp;'.get_lang('SendMessage').'</a>';
$new_invitation[]=$invitation;
}
Display::display_sortable_grid('waiting_user', array(), $new_invitation, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false,false,true,true,true,true));
}
echo '</div>';
echo '</div>';

@ -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 {
@ -124,42 +125,45 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
}
$total = count($user_list);
if (!isset($_GET['id'])) {
if (!isset($_GET['id'])) {
Display::display_header(get_lang('UsersOnLineList'));
echo '<div id="social-content-left">';
//this include the social menu div
if (!api_is_anonymous()) {
SocialManager::show_social_menu('whoisonline');
}
echo '</div>';
if ($_GET['id'] == '') {
echo '<p><a class="refresh" href="javascript:window.location.reload()">'.get_lang('Refresh').'</a></p>';
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content-left">';
//this include the social menu div
if (!api_is_anonymous()) {
SocialManager::show_social_menu('whoisonline');
}
echo '</div>';
if ($_GET['id'] == '') {
echo '<p><a class="refresh" href="javascript:window.location.reload()">'.get_lang('Refresh').'</a></p>';
} /*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 {
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>';
}
echo '<div class="actions-title">';
echo get_lang('UsersOnLineList');
echo '</div>';
}
}
if ($user_list) {
if (!isset($_GET['id'])) {
echo '<div id="social-content-right">';
//this include the social menu div
if (!api_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
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);
*/
} else {
//individual user information - also displays header info
SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));

Loading…
Cancel
Save