Minor - Deleting unuseles functions and files see #190
parent
8e8d453613
commit
0dbe793c87
@ -1,6 +0,0 @@ |
||||
<html> |
||||
<head> |
||||
</head> |
||||
<body> |
||||
</body> |
||||
</html> |
@ -1,45 +1,9 @@ |
||||
<?php |
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
$language_file= 'messages'; |
||||
require_once '../inc/global.inc.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'message.lib.php'; |
||||
api_block_anonymous_users(); |
||||
|
||||
if (api_get_setting('allow_message_tool')!='true'){ |
||||
api_not_allowed(); |
||||
} |
||||
|
||||
|
||||
/* This page should be deleted */ |
||||
|
||||
if(api_get_user_id()!=0) { |
||||
$number_of_new_messages = MessageManager::get_new_messages(); |
||||
|
||||
if(is_null($number_of_new_messages)) { |
||||
$number_of_new_messages = 0; |
||||
} |
||||
/*echo "<a href=inbox.php>".get_lang('Inbox')."(<span id=\"nuevos\" style=\"none\">".$number_of_new_messages."</span>)</a>"; |
||||
echo " - "; |
||||
echo "<a href=new_message.php>".get_lang('ComposeMessage')."</a>";*/ |
||||
$number_of_new_messages = -1; |
||||
if($number_of_new_messages > 0) |
||||
{ |
||||
?> |
||||
<div id="box" class="message-content-table"> |
||||
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="2" id="table" class="content"> |
||||
<tr> |
||||
<td width="28%" height="16" class="content" id="ref"><a style="color:red;font-size:10px" href="javascript:;" onclick="ocultar_aviso()"><?php echo get_lang('Close');?></a></td>
|
||||
<td width="72%" rowspan="2" class="content" id="ref"><?php echo '<a href="'.$e.'" style="color:#000000" onclick="ocultar_aviso()">'.get_lang('YouHaveNewMessage').'</a>'; ?></td>
|
||||
</tr> |
||||
<tr> |
||||
<td class="content" id="ref"><?php Display::return_icon('message_new.gif',get_lang('NewMessage'));?> </td>
|
||||
</tr> |
||||
</table> |
||||
</div> |
||||
<?php |
||||
} |
||||
} else { |
||||
//echo '<script language="javascript" type="text/javascript" src="'.api_get_path(WEB_CODE_PATH).'messages/cookies.js"> </script>'; |
||||
//echo '<script language="javascript" type="text/javascript">Set_Cookie( "nuevos", 0, 0, "/","","")</script> '; |
||||
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
||||
header('Location:inbox.php?f=social'); |
||||
} elseif ( api_get_setting('allow_message_tool')=='true') { |
||||
header('Location:inbox.php'); |
||||
} |
||||
?> |
@ -1,73 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
/** |
||||
* @package dokeos.social |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
|
||||
$language_file = array('registration','messages','userInfo','admin'); |
||||
require '../inc/global.inc.php'; |
||||
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'image.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once '../inc/lib/social.lib.php'; |
||||
$this_section = SECTION_MYPROFILE; |
||||
$_SESSION['this_section']=$this_section; |
||||
//$list_path_friends=array(); |
||||
$request=api_is_xml_http_request(); |
||||
$language_variable=api_xml_http_response_encode(get_lang('Contacts')); |
||||
//api_display_tool_title($language_variable); |
||||
|
||||
$user_id=api_get_user_id(); |
||||
$image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,true); |
||||
?> |
||||
<div align="center" > |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-content-table"> |
||||
<tr> |
||||
<td width="100%" height="20" valign="top"> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="100%" height="20" valign="top"><?php |
||||
echo ' Dokeos - '; |
||||
$user_id=api_get_user_id(); |
||||
$user_info=api_get_user_info($user_id); |
||||
echo $name_user=api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); |
||||
?></td> |
||||
</tr> |
||||
</table> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" valign="top"> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-subtitle-search"> |
||||
<tr> |
||||
<td width="100%" height="25" valign="top" class="social-align-box"> <?php echo api_xml_http_response_encode(get_lang('Search')) .' : '; ?><input class="social-search-image" type="text" class="search-image" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" /></td>
|
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="175" valign="top"> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" > |
||||
<tr> |
||||
<td width="100%" height="22" valign="top"> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box"> |
||||
<tr> |
||||
<td width="100%" height="22" valign="top"> <?php echo api_xml_http_response_encode(get_lang('ContactsList')); ?></td>
|
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="153" valign="top"> |
||||
<?php |
||||
echo '<div id="div_content_table">'; |
||||
require_once 'show_search_image.inc.php'; |
||||
echo '</div>'; |
||||
?> |
||||
</td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
</table> |
||||
</div> |
@ -1,151 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
/** |
||||
* @package dokeos.social |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
|
||||
$language_file = array('registration','messages','userInfo','admin','forum','blog'); |
||||
require_once '../inc/global.inc.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'social.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'course.lib.php'; |
||||
|
||||
// @todo here we must show the user information as read only |
||||
//User picture size is calculated from SYSTEM path |
||||
$user_info= UserManager::get_user_info_by_id(api_get_user_id()); |
||||
$img_array= UserManager::get_user_picture_path_by_id(api_get_user_id(),'web',true,true); |
||||
|
||||
if (isset($_POST['load_ajax'])) { |
||||
require_once api_get_path(LIBRARY_PATH).'blog.lib.php'; |
||||
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
||||
$user_id = intval($_SESSION['social_user_id']); |
||||
if ($_POST['action']) {$action = $_POST['action'];} |
||||
switch($action) { |
||||
case 'load_course' : |
||||
$course_db = $_POST['course_code']; |
||||
// @todo goto the course link |
||||
//echo '<a href="'.api_get_path(WEB_COURSE_PATH).$course_directory.'/?id_session='.$my_course['id_session'].'">'.get_lang('GotoCourse').'</a>'; |
||||
$course_id=CourseManager::get_course_id_by_database_name($course_db); |
||||
|
||||
if (api_is_user_of_course($course_id,api_get_user_id())) { |
||||
|
||||
$table_forums = Database :: get_course_table(TABLE_FORUM,$course_db); |
||||
$table_threads = Database :: get_course_table(TABLE_FORUM_THREAD,$course_db); |
||||
$table_posts = Database :: get_course_table(TABLE_FORUM_POST,$course_db); |
||||
$table_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY,$course_db); |
||||
$table_users = Database :: get_main_table(TABLE_MAIN_USER); |
||||
|
||||
//------Forum messages |
||||
|
||||
$forum_result = get_all_post_from_user($user_id, $course_db); |
||||
$all_result_data = 0; |
||||
if ($forum_result !='') { |
||||
api_display_tool_title(get_lang('Forum')); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;" >'; |
||||
echo api_xml_http_response_encode($forum_result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
|
||||
//------Blog posts |
||||
$result = get_blog_post_from_user($course_db, $user_id); |
||||
if (!empty($result)) { |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('Blog'))); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;">'; |
||||
echo api_xml_http_response_encode($result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
|
||||
//------Blog comments |
||||
$result = get_blog_comment_from_user($course_db, $user_id); |
||||
if (!empty($result)) { |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding-left:10px;">'; |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('BlogComments'))); |
||||
echo api_xml_http_response_encode($result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
if ($all_result_data == 0) { |
||||
echo api_xml_http_response_encode(get_lang('NoDataAvailable')); |
||||
} |
||||
|
||||
} else { |
||||
echo '<div class="clear"></div><br />'; |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('Details'))); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;">'; |
||||
echo api_xml_http_response_encode(get_lang('UserNonRegisteredAtTheCourse')); |
||||
echo '<div class="clear"></div><br />'; |
||||
echo '</div>'; |
||||
echo '<div class="clear"></div><br />'; |
||||
} |
||||
break; |
||||
case 'unload_course' : |
||||
//echo 'load2'; |
||||
break; |
||||
default: |
||||
|
||||
} |
||||
} else { |
||||
// normal behavior |
||||
$request=api_is_xml_http_request(); |
||||
$language_variable=api_xml_http_response_encode(get_lang('PersonalData')); |
||||
//api_display_tool_title($language_variable); |
||||
|
||||
echo '<div class="actions">'; |
||||
echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif',api_xml_http_response_encode(get_lang('EditInformation'))).' '.api_xml_http_response_encode(get_lang('EditInformation')).'</a> '; |
||||
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true' && api_get_user_id()<>2 && api_get_user_id()<>0) { |
||||
echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('shared_profile.png',api_xml_http_response_encode(get_lang('ViewSharedProfile'))).' '.api_xml_http_response_encode(get_lang('ViewSharedProfile')).'</a>'; |
||||
} |
||||
echo '</div>'; |
||||
echo '<div id="profile_container">'; |
||||
echo '<div class="social-profile-info" style="float:left;position:relative">'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('UserName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['username']).' </dd></dl>'; |
||||
if (api_is_western_name_order()) { |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('FirstName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['firstname']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('LastName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['lastname']).'</dd></dl>'; |
||||
} else { |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('LastName')).'</dt><dd>'. api_xml_http_response_encode($user_info['lastname']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('FirstName')).'</dt><dd>'. api_xml_http_response_encode($user_info['firstname']).'</dd></dl>'; |
||||
} |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('OfficialCode')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['official_code']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('Email')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['email']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('Phone')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['phone']).'</dd></dl>'; |
||||
echo '</div>'; |
||||
echo '<div style="float:left;position:relative">'; |
||||
echo '<div id="picture" style="width:200px;float:left;position:relative;margin-top:10px;">'; |
||||
echo '<img src='.$img_array['dir'].$img_array['file'].' />'; |
||||
echo '</div>'; |
||||
/*if (api_get_setting('allow_message_tool')=='true') { |
||||
require_once api_get_path(LIBRARY_PATH).'message.lib.php'; |
||||
$number_of_new_messages = MessageManager::get_new_messages(); |
||||
$number_of_outbox_message=MessageManager::get_number_of_messages_sent(); |
||||
$cant_out_box=' ('.$number_of_outbox_message.')'; |
||||
$cant_msg = ' ('.$number_of_new_messages.')'; |
||||
$number_of_new_messages_of_friend=SocialManager::get_message_number_invitation_by_user_id(api_get_user_id()); |
||||
//echo '<div class="message-view" style="display:none;">'.get_lang('ViewMessages').'</div>'; |
||||
echo '<div class="message-content" style="float:right" > |
||||
<h2 class="message-title" style="margin-top:0">'.get_lang('Messages').'</h2> |
||||
<p> |
||||
<a href="../social/index.php#remote-tab-2" class="message-body">'.get_lang('Inbox').$cant_msg.' </a><br /> |
||||
<a href="../social/index.php#remote-tab-3" class="message-body">'.get_lang('Outbox').$cant_out_box.'</a><br /> |
||||
</p>'; |
||||
echo '<img src="../img/delete.gif" alt="'.get_lang('Close').'" title="'.get_lang('Close').'" class="message-delete" onclick="delete_message_js()" />'; |
||||
if ($number_of_new_messages_of_friend>0) { |
||||
echo '<br/>'; |
||||
} |
||||
echo '</div>'; |
||||
}*/ |
||||
echo '</div>'; |
||||
} |
||||
?> |
@ -1,97 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
/** |
||||
* @package dokeos.social |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
|
||||
|
||||
$language_file = array('registration','messages','userInfo','admin'); |
||||
require '../inc/global.inc.php'; |
||||
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'image.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once '../inc/lib/social.lib.php'; |
||||
$this_section = SECTION_MYPROFILE; |
||||
$_SESSION['this_section']=$this_section; |
||||
$list_path_friends=array(); |
||||
$list_groups=array(); |
||||
$request=api_is_xml_http_request(); |
||||
$language_variable=api_xml_http_response_encode(get_lang('ContactsGroups')); |
||||
//api_display_tool_title($language_variable); |
||||
$user_id=api_get_user_id(); |
||||
$list_groups=SocialManager::show_list_type_friends(); |
||||
|
||||
|
||||
|
||||
for ($p=0;$p<count($list_groups);$p++) { |
||||
$list_path_friends=SocialManager::get_list_path_web_by_user_id ($user_id,$list_groups[$p]['id']); |
||||
?> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="data_table"> |
||||
<tr> |
||||
<th align="left" id="<?php echo 'td_'.$list_groups[$p]['id']; ?>" style="cursor:pointer" valign="top" onclick="toogle_function(this)">
|
||||
<?php echo api_xml_http_response_encode(get_lang($list_groups[$p]['title'])); ?> |
||||
</th> |
||||
<th width="30" align="center"> |
||||
<?php Display::display_icon('visible.gif',api_xml_http_response_encode(get_lang('ChangeVisibility')), array('id'=>'btn_'.$list_groups[$p]['id'])); ?> |
||||
<input type="hidden" class="hidden" id="id_hd_dame" name="hd_dame" value="0" /> |
||||
</th> |
||||
</tr> |
||||
<tr> |
||||
<td colspan="2"> |
||||
<div align="center" id="<?php echo 'div_group_'.$list_groups[$p]['id']; ?>" >
|
||||
<?php |
||||
$friend_html=''; |
||||
$number_of_images=10; |
||||
$number_friends=0; |
||||
$list_friends_id=array(); |
||||
$list_friends_dir=array(); |
||||
$list_friends_file=array(); |
||||
if (count($list_path_friends)!=0) { |
||||
for ($z=0;$z<count($list_path_friends['id_friend']);$z++) { |
||||
$list_friends_id[] = $list_path_friends['id_friend'][$z]['friend_user_id']; |
||||
$list_friends_dir[] = $list_path_friends['path_friend'][$z]['dir']; |
||||
$list_friends_file[]= $list_path_friends['path_friend'][$z]['file']; |
||||
} |
||||
$number_friends= count($list_friends_dir); |
||||
$number_loop = ($number_friends/$number_of_images); |
||||
$loop_friends = ceil($number_loop); |
||||
$j=0;//<div id="div_groupid_"'.$list_groups[$p]['id'].'"> |
||||
for ($k=0;$k<$loop_friends;$k++) { |
||||
if ($j==$number_of_images) { |
||||
$number_of_images=$number_of_images*2; |
||||
} |
||||
while ($j<$number_of_images) { |
||||
if ($list_friends_file[$j]<>"") { |
||||
$user_info=api_get_user_info($list_friends_id[$j]); |
||||
$user_name=api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); |
||||
if($list_friends_file[$j]==='unknown.jpg') { |
||||
$big=''; |
||||
} else { |
||||
$big='big_'; |
||||
} |
||||
$friends_profile = SocialManager::get_picture_user($list_friends_id[$j], $list_friends_file[$j], 92); |
||||
$friend_html.='<div id="div_'.$list_friends_id[$j].'" class="image_friend_network">' . |
||||
'<a href="javascript:void(0)" onclick=load_thick("'.$list_friends_dir[$j].$big.$list_friends_file[$j].'","") title="" class="thickbox">' . |
||||
'<span><center><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$list_friends_id[$j].'" title="'.api_xml_http_response_encode($user_name).'" /></center></span>'. |
||||
'<center class="friend">'.api_xml_http_response_encode($user_name).'</center>'. |
||||
'</a></div>'; |
||||
} |
||||
$j++; |
||||
} |
||||
} |
||||
echo $friend_html; |
||||
} |
||||
else { |
||||
echo api_xml_http_response_encode(get_lang('YouDontHaveContactsInThisGroup')); |
||||
} |
||||
?> |
||||
</div> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
<?php |
||||
} |
||||
?> |
@ -1,148 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /dokeos_license.txt */ |
||||
|
||||
$language_file = array('registration','messages','userInfo','admin','forum','blog'); |
||||
require_once '../inc/global.inc.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'social.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'course.lib.php'; |
||||
Display :: display_header(''); |
||||
// @todo here we must show the user information as read only |
||||
//User picture size is calculated from SYSTEM path |
||||
$user_info= UserManager::get_user_info_by_id(api_get_user_id()); |
||||
$img_array= UserManager::get_user_picture_path_by_id(api_get_user_id(),'web',true,true); |
||||
|
||||
if (isset($_POST['load_ajax'])) { |
||||
require_once api_get_path(LIBRARY_PATH).'blog.lib.php'; |
||||
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
||||
$user_id = intval($_SESSION['social_user_id']); |
||||
if ($_POST['action']) {$action = $_POST['action'];} |
||||
switch($action) { |
||||
case 'load_course' : |
||||
$course_db = $_POST['course_code']; |
||||
// @todo goto the course link |
||||
//echo '<a href="'.api_get_path(WEB_COURSE_PATH).$course_directory.'/?id_session='.$my_course['id_session'].'">'.get_lang('GotoCourse').'</a>'; |
||||
$course_id=CourseManager::get_course_id_by_database_name($course_db); |
||||
|
||||
if (api_is_user_of_course($course_id,api_get_user_id())) { |
||||
|
||||
$table_forums = Database :: get_course_table(TABLE_FORUM,$course_db); |
||||
$table_threads = Database :: get_course_table(TABLE_FORUM_THREAD,$course_db); |
||||
$table_posts = Database :: get_course_table(TABLE_FORUM_POST,$course_db); |
||||
$table_item_property = Database :: get_course_table(TABLE_ITEM_PROPERTY,$course_db); |
||||
$table_users = Database :: get_main_table(TABLE_MAIN_USER); |
||||
|
||||
//------Forum messages |
||||
|
||||
$forum_result = get_all_post_from_user($user_id, $course_db); |
||||
$all_result_data = 0; |
||||
if ($forum_result !='') { |
||||
api_display_tool_title(get_lang('Forum')); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;" >'; |
||||
echo api_xml_http_response_encode($forum_result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
|
||||
//------Blog posts |
||||
$result = get_blog_post_from_user($course_db, $user_id); |
||||
if (!empty($result)) { |
||||
echo '<div class="clear"></div><br />'; |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('BlogPosts'))); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;">'; |
||||
echo api_xml_http_response_encode($result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
|
||||
//------Blog comments |
||||
$result = get_blog_comment_from_user($course_db, $user_id); |
||||
if (!empty($result)) { |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('BlogComments'))); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;">'; |
||||
echo api_xml_http_response_encode($result); |
||||
echo '</div>'; |
||||
echo '<br />'; |
||||
$all_result_data++; |
||||
} |
||||
if ($all_result_data == 0) { |
||||
echo api_xml_http_response_encode(get_lang('NoDataAvailable')); |
||||
} |
||||
|
||||
} else { |
||||
echo '<div class="clear"></div><br />'; |
||||
api_display_tool_title(api_xml_http_response_encode(get_lang('Details'))); |
||||
echo '<div class="social-background-content" style="background:#FAF9F6; padding:0px;">'; |
||||
echo api_xml_http_response_encode(get_lang('UserNonRegisteredAtTheCourse')); |
||||
echo '<div class="clear"></div><br />'; |
||||
echo '</div>'; |
||||
echo '<div class="clear"></div><br />'; |
||||
} |
||||
break; |
||||
case 'unload_course' : |
||||
//echo 'load2'; |
||||
break; |
||||
default: |
||||
|
||||
} |
||||
} else { |
||||
// normal behavior |
||||
$request=api_is_xml_http_request(); |
||||
$language_variable=api_xml_http_response_encode(get_lang('PersonalData')); |
||||
//api_display_tool_title($language_variable); |
||||
|
||||
echo '<div class="actions">'; |
||||
echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif',api_xml_http_response_encode(get_lang('EditInformation'))).' '.api_xml_http_response_encode(get_lang('EditInformation')).'</a> '; |
||||
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true' && api_get_user_id()<>2 && api_get_user_id()<>0) { |
||||
echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('shared_profile.png',api_xml_http_response_encode(get_lang('ViewSharedProfile'))).' '.api_xml_http_response_encode(get_lang('ViewSharedProfile')).'</a>'; |
||||
} |
||||
echo '</div>'; |
||||
echo '<div id="profile_container">'; |
||||
echo '<div class="social-profile-info" style="float:left;position:relative">'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('UserName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['username']).' </dd></dl>'; |
||||
if (api_is_western_name_order()) { |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('FirstName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['firstname']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('LastName')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['lastname']).'</dd></dl>'; |
||||
} else { |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('LastName')).'</dt><dd>'. api_xml_http_response_encode($user_info['lastname']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('FirstName')).'</dt><dd>'. api_xml_http_response_encode($user_info['firstname']).'</dd></dl>'; |
||||
} |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('OfficialCode')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['official_code']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('Email')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['email']).'</dd></dl>'; |
||||
echo '<dl><dt>'.api_xml_http_response_encode(get_lang('Phone')).'</dt> |
||||
<dd>'. api_xml_http_response_encode($user_info['phone']).'</dd></dl>'; |
||||
echo '</div>'; |
||||
echo '<div style="float:left;position:relative">'; |
||||
echo '<div id="picture" style="width:200px;float:left;position:relative;margin-top:10px;">'; |
||||
echo '<img src='.$img_array['dir'].$img_array['file'].' />'; |
||||
echo '</div>'; |
||||
/*if (api_get_setting('allow_message_tool')=='true') { |
||||
require_once api_get_path(LIBRARY_PATH).'message.lib.php'; |
||||
$number_of_new_messages = MessageManager::get_new_messages(); |
||||
$number_of_outbox_message=MessageManager::get_number_of_messages_sent(); |
||||
$cant_out_box=' ('.$number_of_outbox_message.')'; |
||||
$cant_msg = ' ('.$number_of_new_messages.')'; |
||||
$number_of_new_messages_of_friend=SocialManager::get_message_number_invitation_by_user_id(api_get_user_id()); |
||||
//echo '<div class="message-view" style="display:none;">'.get_lang('ViewMessages').'</div>'; |
||||
echo '<div class="message-content" style="float:right" > |
||||
<h2 class="message-title" style="margin-top:0">'.get_lang('Messages').'</h2> |
||||
<p> |
||||
<a href="../social/index.php#remote-tab-2" class="message-body">'.get_lang('Inbox').$cant_msg.' </a><br /> |
||||
<a href="../social/index.php#remote-tab-3" class="message-body">'.get_lang('Outbox').$cant_out_box.'</a><br /> |
||||
</p>'; |
||||
echo '<img src="../img/delete.gif" alt="'.get_lang('Close').'" title="'.get_lang('Close').'" class="message-delete" onclick="delete_message_js()" />'; |
||||
if ($number_of_new_messages_of_friend>0) { |
||||
echo '<br/>'; |
||||
} |
||||
echo '</div>'; |
||||
}*/ |
||||
echo '</div>'; |
||||
} |
||||
?> |
@ -1,64 +0,0 @@ |
||||
<?php //$id: $
|
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
/** |
||||
* @package dokeos.social |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
|
||||
$language_file=array('registration','messages','userInfo','admin'); |
||||
require_once '../inc/global.inc.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once '../inc/lib/social.lib.php'; |
||||
$user_friend=(int)$_POST['user_friend']; |
||||
$list_of_options=array(); |
||||
$img_user=array(); |
||||
$img_info_user=array(); |
||||
$list_of_options=SocialManager::show_list_type_friends(); |
||||
$path_user=str_replace(array('\\','../','\\0'),array('','',''),$_GET['path_user']); |
||||
$img_user =explode('"',$path_user); |
||||
$number_list=count($list_of_options); |
||||
$user_friend = $user_id = (int)str_replace(array('\\','"'),array('',''),$_GET['id_user']); |
||||
$user_info=api_get_user_info($user_friend); |
||||
$user_friend_relation=SocialManager::get_relation_between_contacts(api_get_user_id(),$user_friend); |
||||
?> |
||||
<input type="hidden" name="user_cod_qualify" id="user_cod_qualify" value="<?php echo $user_friend; ?>"/>
|
||||
<table width="600" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td> |
||||
<table width="600" border="0" cellspacing="0" cellpadding="0"> |
||||
<tr> |
||||
<td width="600" align="left"> |
||||
<td width="50%"><br/> |
||||
<img src="<?php echo Security::remove_XSS($img_user[1]); ?>" />
|
||||
<?php |
||||
echo '<br /><br />'.$name_user=api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); |
||||
?> |
||||
</td> |
||||
<td width="50%"><div align="left"> |
||||
<?php |
||||
for ($k=0;$k<$number_list;$k++) { |
||||
echo '<br />'; |
||||
if ($list_of_options[$k]['id']==$user_friend_relation) { |
||||
$check='checked="checked"'; |
||||
} else { |
||||
$check=''; |
||||
} |
||||
?> |
||||
<input <?php echo $check; ?> style="margin-left:50px" type="radio" class="radio" name="list_type_friend" value="<?php echo api_xml_http_response_encode($list_of_options[$k]['id']); ?>" />
|
||||
<?php |
||||
echo api_xml_http_response_encode(get_lang($list_of_options[$k]['title'])); |
||||
echo '<br />'; |
||||
?> |
||||
<?php |
||||
} |
||||
echo '<br />'; |
||||
?> |
||||
<button style="margin-left:50px" type="button" class="save" value="<?php echo api_xml_http_response_encode(get_lang('AttachToGroup')); ?>" onclick="set_qualify_friend()"><?php echo api_xml_http_response_encode(get_lang('AttachToGroup')) ?></button>
|
||||
</div></td> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
</td> |
||||
</tr> |
||||
</table> |
@ -1,121 +0,0 @@ |
||||
<?php |
||||
/* For licensing terms, see /chamilo_license.txt */ |
||||
/** |
||||
* @package dokeos.social |
||||
* @author Julio Montoya <gugli100@gmail.com> |
||||
*/ |
||||
|
||||
$language_file = array('registration','messages','userInfo','admin'); |
||||
require '../inc/global.inc.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'image.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; |
||||
require_once api_get_path(LIBRARY_PATH).'social.lib.php'; |
||||
$this_section = SECTION_MYPROFILE; |
||||
$_SESSION['this_section']=$this_section; |
||||
api_block_anonymous_users(); |
||||
$request=api_is_xml_http_request(); |
||||
$language_variable=api_xml_http_response_encode(get_lang('PendingInvitations')); |
||||
$language_comment=api_xml_http_response_encode(get_lang('SocialInvitesComment')); |
||||
//api_display_tool_title($language_variable); |
||||
?> |
||||
<div id="id_response" align="center"></div> |
||||
<?php |
||||
$list_get_invitation=array(); |
||||
$list_get_path_web=array(); |
||||
$user_id=api_get_user_id(); |
||||
$list_get_invitation=SocialManager::get_list_invitation_of_friends_by_user_id($user_id); |
||||
$list_get_path_web=SocialManager::get_list_web_path_user_invitation_by_user_id($user_id); |
||||
$number_loop=count($list_get_invitation); |
||||
if ($number_loop==0) { |
||||
Display::display_normal_message(api_xml_http_response_encode(get_lang('YouDontHaveInvites'))); |
||||
} |
||||
for ($i=0;$i<$number_loop;$i++) { |
||||
?> |
||||
<div id="<?php echo 'id_'.$list_get_invitation[$i]['user_sender_id'] ?>" align="center">
|
||||
<table width="600" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="600" height="20" valign="top"><table width="100%" border="0" |
||||
cellpadding="0" cellspacing="0" bgcolor="#9DACBF"> |
||||
<tr> |
||||
<td width="600" height="20" valign="top" style="padding:4px;"><div align="left"><b><?php echo api_xml_http_response_encode(get_lang('RequestContact')); ?></b></div></td>
|
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="135" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="600" height="135" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="600" height="110" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="100" height="110" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C8D5E4"> |
||||
<tr> |
||||
<td width="100" height="110" style="padding:4px;" > |
||||
<?php $friends_profile = SocialManager::get_picture_user($list_get_invitation[$i]['user_sender_id'], $list_get_path_web[$i]['file'], 92); ?> |
||||
<center><img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></center></td>
|
||||
</tr> |
||||
</table></td> |
||||
<td width="500" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> |
||||
<tr> |
||||
<td width="500" height="22" valign="top"> |
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="500" height="22" valign="top" style="padding:2px;"> |
||||
<?php |
||||
$user_id=$list_get_invitation[$i]['user_sender_id']; |
||||
$user_info=api_get_user_info($user_id); |
||||
echo api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); |
||||
?></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="5" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
|
||||
<tr> |
||||
<td width="500" height="5"></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="22" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> |
||||
<tr> |
||||
<td width="500" height="22" valign="top" style="padding:2px;"><?php |
||||
$title=get_lang($list_get_invitation[$i]['title']); |
||||
$content=get_lang($list_get_invitation[$i]['content']); |
||||
echo api_xml_http_response_encode($title.' : '.$content); |
||||
?> </td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="61" valign="top" style="padding:2px;"><?php |
||||
$date=$list_get_invitation[$i]['send_date']; |
||||
echo api_xml_http_response_encode(get_lang('DateSend').' : '.$date); |
||||
?></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
<tr> |
||||
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#9DACBF"> |
||||
<tr> |
||||
<td width="600" height="25" valign="top" style="padding:4px;"><div align="right"> |
||||
<button class="save" name="btn_accepted" type="submit" id="<?php echo "btn_accepted_".$user_id ?>" value="<?php echo api_xml_http_response_encode(get_lang('Accept'));?>"onclick="javascript:register_friend(this)"><?php echo api_xml_http_response_encode(get_lang('Accept')) ?></button>
|
||||
<button class="cancel" name="btn_denied" type="submit" id="<?php echo "btn_deniedst_".$user_id ?>" value="<?php echo api_xml_http_response_encode(get_lang('Deny')); ?>" onclick="javascript:denied_friend(this)" ><?php echo api_xml_http_response_encode(get_lang('Deny'))?></button>
|
||||
</div></td> |
||||
</tr> |
||||
</table></td> |
||||
</tr> |
||||
|
||||
</table></td> |
||||
</tr> |
||||
|
||||
</table></td> |
||||
</tr> |
||||
</table> |
||||
</div> |
||||
<br/> |
||||
<?php |
||||
} |
Loading…
Reference in new issue