[svn r18324] logic changes - allow show,the social tool in IE7 - (see FS#3625)

skala
Isaac Flores 17 years ago
parent ae20138760
commit d51795d8e0
  1. 8
      main/css/public_admin/default.css
  2. 6
      main/messages/new_message.php
  3. 268
      main/social/contacts.inc.php
  4. 180
      main/social/group_contact.inc.php
  5. 408
      main/social/index.php
  6. 42
      main/social/select_options.php
  7. 110
      main/social/show_search_image.inc.php
  8. 4
      whoisonline.php

@ -598,7 +598,7 @@ this lets the navigation menu appear to the left:
* html #toolnav { margin-right: 0px;}
* html #center { height: 1%; margin-left: 0; }
/* End hide from IE5/mac */
*/
/*****************************************************
* LOGIN AND LANGUAGE FORM *
@ -1894,7 +1894,7 @@ padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;}
cellspacing:0;
cellpadding:0;
background-color:#dbeaf5;
border=0;
border:0;
border-collapse: collapse;
width: 100%;
}
@ -2100,6 +2100,10 @@ span.radio {
border-top:1px #9DACBF solid;
border-bottom:1px #9DACBF solid;
}
.social-align-box {
text-align:left;
float:left;
}
/*****************************************************
* BUTTONS *
*****************************************************/

@ -1,4 +1,4 @@
<?php // $Id: new_message.php 18292 2009-02-06 19:08:47Z iflorespaz $
<?php // $Id: new_message.php 18324 2009-02-07 16:20:34Z iflorespaz $
/*
==============================================================================
Dokeos - elearning and course management software
@ -79,7 +79,7 @@ $(document).ready(function (){
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#id_div_search").html("buscando...");*/ },
/*$("#id_div_search").html("Searching...");*/ },
type: "POST",
url: "../social/select_options.php",
data: "search="+name,
@ -93,7 +93,7 @@ $(document).ready(function (){
$("#id_div_search").html("");
cont++;
});
},
}
});
});
});

@ -1,135 +1,135 @@
<?php
$cidReset = true;
require ('../inc/global.inc.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
//$list_path_friends=array();
?>
<div id="id" class="actions">
<?php echo get_lang('MessageInformationContacts') ?>
</div>
<?php
$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="750" border="0" cellpadding="0" cellspacing="0" style="border-top:1px #9DACBF solid; border-left:1px #9DACBF solid;border-right:1px #9DACBF solid; border-bottom:1px #9DACBF solid">
<tr>
<td width="750" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="750" height="20" valign="top"><?php
echo '&nbsp;&nbsp;Dokeos&nbsp;&nbsp;-&nbsp;&nbsp;';
$user_id=api_get_user_id();
$user_info=api_get_user_info($user_id);
echo $user_info['firstName'].'&nbsp;&nbsp;'.$user_info['lastName'];
?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="320" height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="320" 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="#ffffff">
<tr>
<td width="100" height="110" valign="top">
<img src="<?php echo $image_path['dir']."/".$image_path['file']; ?>" width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" /></td>
</tr>
</table></td>
<td width="220" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="220" height="110" valign="top">&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="70" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-info">
<tr>
<td width="320" height="70" valign="top">
<?php
$info_user=api_get_user_info($user_id);
echo '<br/>&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['mail'].'<br/>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['username'].PHP_EOL;
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<td width="280" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ECE9D8">
<tr>
<td width="280" height="180" valign="top">
<div align="center" class="social-qualify"><?php echo get_lang('GroupingMyContactsPersonal') ?><input type="hidden" class="" name="user_cod_qualify" id="user_cod_qualify" value="0" /></div>
<div align="center" class="social-qualify-display" id="div_info_user"></div>
<div id="div_qualify">
<?php
require_once 'qualify_contact.inc.php';
?>
<div id="div_qualify_image" class="social-display-image"></div>
</div>
</td>
</tr>
</table></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="750" height="25" valign="top">&nbsp;&nbsp;<?php echo get_lang('Search').'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><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="750" height="22" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="750" height="22" valign="top">&nbsp;&nbsp;<?php echo get_lang('ListContacts'); ?></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>
<?php
$cidReset = true;
require ('../inc/global.inc.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
//$list_path_friends=array();
?>
<div id="id" class="actions">
<?php echo get_lang('MessageInformationContacts') ?>
</div>
<?php
$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="750" border="0" cellpadding="0" cellspacing="0" style="border-top:1px #9DACBF solid; border-left:1px #9DACBF solid;border-right:1px #9DACBF solid; border-bottom:1px #9DACBF solid">
<tr>
<td width="750" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="750" height="20" valign="top"><?php
echo '&nbsp;&nbsp;Dokeos&nbsp;&nbsp;-&nbsp;&nbsp;';
$user_id=api_get_user_id();
$user_info=api_get_user_info($user_id);
echo $user_info['firstName'].'&nbsp;&nbsp;'.$user_info['lastName'];
?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="320" height="180" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="320" 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="#ffffff">
<tr>
<td width="100" height="110" valign="top">
<img src="<?php echo $image_path['dir']."/".$image_path['file']; ?>" width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" /></td>
</tr>
</table></td>
<td width="220" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="220" height="110" valign="top">&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="70" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="320" height="70" valign="top" class="social-info">
<?php
$info_user=api_get_user_info($user_id);
echo '<br/>&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['mail'].'<br/>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;'.$info_user['username'].PHP_EOL;
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<td width="430" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ECE9D8" class="social-align-box">
<tr>
<td width="430" height="180" valign="top" >
<div align="center" class="social-qualify"><?php echo get_lang('GroupingMyContactsPersonal') ?><input type="hidden" class="" name="user_cod_qualify" id="user_cod_qualify" value="0" /></div>
<div align="center" class="social-qualify-display" id="div_info_user"></div>
<div id="div_qualify">
<?php
require_once 'qualify_contact.inc.php';
?>
<div id="div_qualify_image" class="social-display-image"></div>
</div>
</td>
</tr>
</table></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="750" height="25" valign="top" class="social-align-box">&nbsp;&nbsp;<?php echo get_lang('Search').'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><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="750" height="22" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="750" height="22" valign="top" class="social-title">&nbsp;&nbsp;<?php echo get_lang('ListContacts'); ?></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,91 +1,91 @@
<?php
$language_file = 'registration';
$cidReset = true;
require ('../inc/global.inc.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
$list_path_friends=array();
$list_groups=array();
?>
<div id="id" class="actions">
<?php echo '&nbsp;&nbsp;'.get_lang('MessageInformationGroupsContacts') ?>
</div>
<?php
$user_id=api_get_user_id();
$list_groups=UserFriend::show_list_type_friends();
for ($p=0;$p<count($list_groups);$p++) {
$list_path_friends=UserFriend::get_list_path_web_by_user_id ($user_id,$list_groups[$p]['id']);
?>
<div align="center" id="<?php echo 'div_group_'.$list_groups[$p]['id']; ?>" >
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="100%" height="22" valign="top">&nbsp;&nbsp;<?php echo $list_groups[$p]['title']; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<?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;
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" style="border-left:1px #B8C8DC solid;border-bottom:1px #B8C8DC solid;border-right:1px #B8C8DC solid;">';
for ($k=0;$k<$loop_friends;$k++) {
$friend_html.='<tr><td valign="top">';
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]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" ><img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/></div>&nbsp;';
}
$j++;
}
$friend_html.='</td></tr>';
}
$friend_html.='<br/></table>';
echo $friend_html;
} else {
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" style="border-left:1px #B8C8DC solid;border-bottom:1px #B8C8DC solid;border-right:1px #B8C8DC solid;">';
$friend_html.='<tr><td valign="top">&nbsp;&nbsp;&nbsp;'.get_lang('NoHaveContactsInThisGroup');
$friend_html.='</td></tr>';
$friend_html.='<br/></table>';
echo $friend_html;
}
?>
</td>
</tr>
</table></td>
</tr>
</table><br/>
<?php
}
?>
<?php
$language_file = 'registration';
$cidReset = true;
require ('../inc/global.inc.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
$list_path_friends=array();
$list_groups=array();
?>
<div id="id" class="actions">
<?php echo '&nbsp;&nbsp;'.get_lang('MessageInformationGroupsContacts') ?>
</div>
<?php
$user_id=api_get_user_id();
$list_groups=UserFriend::show_list_type_friends();
for ($p=0;$p<count($list_groups);$p++) {
$list_path_friends=UserFriend::get_list_path_web_by_user_id ($user_id,$list_groups[$p]['id']);
?>
<div align="center" id="<?php echo 'div_group_'.$list_groups[$p]['id']; ?>" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
<tr>
<td width="100%" height="20" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-title">
<tr>
<td width="100%" height="22" valign="top">&nbsp;&nbsp;<?php echo $list_groups[$p]['title']; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<?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;
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" style="border-left:1px #B8C8DC solid;border-bottom:1px #B8C8DC solid;border-right:1px #B8C8DC solid;">';
for ($k=0;$k<$loop_friends;$k++) {
$friend_html.='<tr><td valign="top">';
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]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" ><img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/></div>&nbsp;';
}
$j++;
}
$friend_html.='</td></tr>';
}
$friend_html.='<br/></table>';
echo $friend_html;
} else {
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" style="border-left:1px #B8C8DC solid;border-bottom:1px #B8C8DC solid;border-right:1px #B8C8DC solid;">';
$friend_html.='<tr><td valign="top">&nbsp;&nbsp;&nbsp;'.get_lang('NoHaveContactsInThisGroup');
$friend_html.='</td></tr>';
$friend_html.='<br/></table>';
echo $friend_html;
}
?>
</td>
</tr>
</table></td>
</tr>
</table><br/>
<?php
}
?>
</div>

@ -1,205 +1,205 @@
<?php
$language_file = array('registration','messages');
$cidReset = true;
require '../inc/global.inc.php';
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
api_block_anonymous_users();
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery-1.1.3.1.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.history_remote.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.tabs.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
$(function() {
$("#container-9").tabs({ remote: true});
});
function register_friend(element_input) {
name_button=$(element_input).attr("id");
name_div_id="id_"+name_button.substring(13);
user_id=name_div_id.split("_");
user_friend_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_response").html("Cargando..."); },
type: "POST",
url: "../social/register_friend.php",
data: "friend_id="+user_friend_id,
success: function(datos) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(datos);
},
});
}
function denied_friend (element_input) {
name_button=$(element_input).attr("id");
name_div_id="id_"+name_button.substring(13);
user_id=name_div_id.split("_");
friend_user_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_response").html("'.get_lang('Loading').'"); },
type: "POST",
url: "../social/register_friend.php",
data: "denied_friend_id="+friend_user_id,
success: function(datos) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(datos);
},
});
}
function delete_friend (element_div) {
id_image=$(element_div).attr("id");
user_id=id_image.split("_");
if (confirm("'.get_lang('Delete').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#id_response").html("Cargando...");*/ },
type: "POST",
url: "../social/register_friend.php",
data: "delete_friend_id="+user_id[1],
success: function(datos) {
//alert(datos);
$("div#"+"div_"+user_id[1]).hide("slow");
$("div#"+"div_"+user_id[1]).html("");
},
});
}
}
function qualify_friend(element_div) {
name_user=$(element_div).attr("title");
id_full=$(element_div).attr("id");
$("div#div_info_user").html(name_user);
user_qualify=id_full.split("_");
user_qualify_id=user_qualify[1];
$("#user_cod_qualify").attr("value",user_qualify_id);
get_image_url=$(element_div).attr("src");
img_html="<img width=100 height=120 src="+get_image_url+" />";
$("div#div_qualify_image").html(img_html);
}
function set_qualify_friend() {
user_id_friend = $("#user_cod_qualify").attr("value");
type_friend = $("input[@name=list_type_friend]:checked").val();
if (user_id_friend==0) {
alert("'.get_lang('SelectedOneOption').'");
return false;
}
if (type_friend==null) {
alert("'.get_lang('SelectedOneOption').'");
return false;
}
if (confirm("'.get_lang('QualifyContactsPersonal').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#id_response").html("Cargando...");*/ },
type: "POST",
url: "../social/register_friend.php",
data: "user_id_friend_q="+user_id_friend+"&type_friend_q="+type_friend,
success: function(datos) {
alert(datos);
},
});
}
}
function show_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","../img/delete.gif");
$(ident).attr("alt","'.get_lang('Delete').'");
$(ident).attr("title","'.get_lang('Delete').'");
}
function hide_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","");
$(ident).attr("alt","");
$(ident).attr("title","");
}
function search_image_social(element_html) {
name_search=$(element_html).attr("value");
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#div_content_table").html("'.get_lang('Searching').'"); },
type: "POST",
url: "../social/show_search_image.inc.php",
data: "search_name_q="+name_search,
success: function(datos) {
$("div#div_content_table").html(datos);
},
});
}
</script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="../inc/lib/javascript/jquery.tabs.css" type="text/css" media="print, projection, screen">';
$htmlHeadXtra[] = '
<!-- Additional IE/Win specific style sheet (Conditional Comments) -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="../inc/lib/javascript/jquery.tabs-ie.css" type="text/css" media="projection, screen">
<![endif]-->
';
$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
/* Not required for Tabs, just to make this demo look better... */
* html body {
font-size: 100%; /* @ IE */
}
h1 {
margin: 1em 0 1.5em;
font-size: 18px;
}
h2 {
margin: 2em 0 1.5em;
font-size: 16px;
}
p {
margin: 0;
}
pre, pre+p, p+p {
margin: 1em 0 0;
}
code {
font-family: "Courier New", Courier, monospace;
}
</style>';
$_SESSION['social_dest'] = 'index.php';
$interbreadcrumb[]= array (
'url' => '#',
'name' => get_lang('ModifyProfile')
);
$interbreadcrumb[]= array (
'url' => $_SESSION['social_dest'],
'name' => get_lang('Social')
);
Display :: display_header('');
?>
<div id="container-9">
<ul>
<li><a href="data_personal.inc.php"><span><?php echo get_lang('DataPersonals') ?></span></a></li>
<?php
if (api_get_setting('allow_message_tool')=='true') {
?>
<li><a href="../messages/inbox.php"><span><?php echo get_lang('Inbox') ?></span></a></li>
<li><a href="../messages/outbox.php"><span><?php echo get_lang('Outbox') ?></span></a></li>
<?php }
if (api_get_setting('allow_social_tool')=='true') {
?>
<li><a href="select_friend_response.php"><span><?php echo get_lang('Invitation') ?></span></a></li>
<li><a href="contacts.inc.php"><span><?php echo get_lang('Contacts') ?></span></a></li>
<li><a href="group_contact.inc.php"><span><?php echo get_lang('ContactsGroups') ?></span></a></li>
<?php
}
?>
</ul>
<?php echo '<div id="show"></div>';?>
</div>
<?php
Display :: display_footer();
<?php
$language_file = array('registration','messages');
$cidReset = true;
require '../inc/global.inc.php';
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
$this_section = SECTION_MYPROFILE;
$_SESSION['this_section']=$this_section;
api_block_anonymous_users();
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery-1.1.3.1.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.history_remote.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.tabs.pack.js" type="text/javascript"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
$(function() {
$("#container-9").tabs({ remote: true});
});
function register_friend(element_input) {
name_button=$(element_input).attr("id");
name_div_id="id_"+name_button.substring(13);
user_id=name_div_id.split("_");
user_friend_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_response").html("Cargando..."); },
type: "POST",
url: "../social/register_friend.php",
data: "friend_id="+user_friend_id,
success: function(datos) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(datos);
}
});
}
function denied_friend (element_input) {
name_button=$(element_input).attr("id");
name_div_id="id_"+name_button.substring(13);
user_id=name_div_id.split("_");
friend_user_id=user_id[1];
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#id_response").html("'.get_lang('Loading').'"); },
type: "POST",
url: "../social/register_friend.php",
data: "denied_friend_id="+friend_user_id,
success: function(datos) {
$("div#"+name_div_id).hide("slow");
$("#id_response").html(datos);
}
});
}
function delete_friend (element_div) {
id_image=$(element_div).attr("id");
user_id=id_image.split("_");
if (confirm("'.get_lang('Delete').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#id_response").html("Cargando...");*/ },
type: "POST",
url: "../social/register_friend.php",
data: "delete_friend_id="+user_id[1],
success: function(datos) {
//alert(datos);
$("div#"+"div_"+user_id[1]).hide("slow");
$("div#"+"div_"+user_id[1]).html("");
}
});
}
}
function qualify_friend(element_div) {
name_user=$(element_div).attr("title");
id_full=$(element_div).attr("id");
$("div#div_info_user").html(name_user);
user_qualify=id_full.split("_");
user_qualify_id=user_qualify[1];
$("#user_cod_qualify").attr("value",user_qualify_id);
get_image_url=$(element_div).attr("src");
img_html="<img width=100 height=120 src="+get_image_url+" />";
$("div#div_qualify_image").html(img_html);
}
function set_qualify_friend() {
user_id_friend = $("#user_cod_qualify").attr("value");
type_friend = $("input[@name=list_type_friend]:checked").val();
if (user_id_friend==0) {
alert("'.get_lang('SelectedOneOption').'");
return false;
}
if (type_friend==null) {
alert("'.get_lang('SelectedOneOption').'");
return false;
}
if (confirm("'.get_lang('QualifyContactsPersonal').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
/*$("#id_response").html("Cargando...");*/ },
type: "POST",
url: "../social/register_friend.php",
data: "user_id_friend_q="+user_id_friend+"&type_friend_q="+type_friend,
success: function(datos) {
alert(datos);
}
});
}
}
function show_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","../img/delete.gif");
$(ident).attr("alt","'.get_lang('Delete').'");
$(ident).attr("title","'.get_lang('Delete').'");
}
function hide_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
$(ident).attr("src","../img/blank.gif");
$(ident).attr("alt","");
$(ident).attr("title","");
}
function search_image_social(element_html) {
name_search=$(element_html).attr("value");
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("#div_content_table").html("'.get_lang('Searching').'"); },
type: "POST",
url: "../social/show_search_image.inc.php",
data: "search_name_q="+name_search,
success: function(datos) {
$("div#div_content_table").html(datos);
}
});
}
</script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="../inc/lib/javascript/jquery.tabs.css" type="text/css" media="print, projection, screen">';
$htmlHeadXtra[] = '
<!-- Additional IE/Win specific style sheet (Conditional Comments) -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="../inc/lib/javascript/jquery.tabs-ie.css" type="text/css" media="projection, screen">
<![endif]-->
';
$htmlHeadXtra[] = '<style type="text/css" media="screen, projection">
/* Not required for Tabs, just to make this demo look better... */
* html body {
font-size: 100%; /* @ IE */
}
h1 {
margin: 1em 0 1.5em;
font-size: 18px;
}
h2 {
margin: 2em 0 1.5em;
font-size: 16px;
}
p {
margin: 0;
}
pre, pre+p, p+p {
margin: 1em 0 0;
}
code {
font-family: "Courier New", Courier, monospace;
}
</style>';
$_SESSION['social_dest'] = 'index.php';
$interbreadcrumb[]= array (
'url' => '#',
'name' => get_lang('ModifyProfile')
);
$interbreadcrumb[]= array (
'url' => $_SESSION['social_dest'],
'name' => get_lang('Social')
);
Display :: display_header('');
?>
<div id="container-9">
<ul>
<li><a href="data_personal.inc.php"><span><?php echo get_lang('DataPersonals') ?></span></a></li>
<?php
if (api_get_setting('allow_message_tool')=='true') {
?>
<li><a href="../messages/inbox.php"><span><?php echo get_lang('Inbox') ?></span></a></li>
<li><a href="../messages/outbox.php"><span><?php echo get_lang('Outbox') ?></span></a></li>
<?php }
if (api_get_setting('allow_social_tool')=='true') {
?>
<li><a href="select_friend_response.php"><span><?php echo get_lang('Invitation') ?></span></a></li>
<li><a href="contacts.inc.php"><span><?php echo get_lang('Contacts') ?></span></a></li>
<li><a href="group_contact.inc.php"><span><?php echo get_lang('ContactsGroups') ?></span></a></li>
<?php
}
?>
</ul>
<?php echo '<div id="show"></div>';?>
</div>
<?php
Display :: display_footer();
?>

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

@ -1,54 +1,56 @@
<?php
$cidReset = true;
require '../inc/global.inc.php';
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
$list_path_friends=array();
$user_id=api_get_user_id();
$name_search=$_POST['search_name_q'];
if (isset($name_search) && $name_search!='undefined') {
$list_path_friends=UserFriend::get_list_path_web_by_user_id($user_id,null,$name_search);
} else {
$list_path_friends=UserFriend::get_list_path_web_by_user_id($user_id);
}
$friend_html='';
$number_of_images=5;
$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;
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" >';
for ($k=0;$k<$loop_friends;$k++) {
$friend_html.='<tr><td valign="top">';
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]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" ><img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/><img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="" alt="" title="" class="image-delete" /></div>&nbsp;';
}
$j++;
}
$friend_html.='</td></tr>';
}
$friend_html.='<br/></table>';
}
echo $friend_html;
?>
<?php
$cidReset = true;
require '../inc/global.inc.php';
$language_file = array('registration','messages');
require_once (api_get_path(CONFIGURATION_PATH).'profile.conf.php');
include_once (api_get_path(LIBRARY_PATH).'fileManage.lib.php');
include_once (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_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';
$list_path_friends=array();
$user_id=api_get_user_id();
$name_search=$_POST['search_name_q'];
if (isset($name_search) && $name_search!='undefined') {
$list_path_friends=UserFriend::get_list_path_web_by_user_id($user_id,null,$name_search);
} else {
$list_path_friends=UserFriend::get_list_path_web_by_user_id($user_id);
}
$friend_html='';
$number_of_images=5;
$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;
$friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFC" >';
for ($k=0;$k<$loop_friends;$k++) {
$friend_html.='<tr><td valign="top">';
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]);
$name_user=$user_info['firstName'].' '.$user_info['lastName'];
$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
<img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" onclick="qualify_friend(this)"/>
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /></div>&nbsp;';
}
$j++;
}
$friend_html.='</td></tr>';
}
$friend_html.='<br/></table>';
}
echo $friend_html;
?>

@ -1,4 +1,4 @@
<?php // $Id: whoisonline.php 18300 2009-02-06 21:06:34Z iflorespaz $
<?php // $Id: whoisonline.php 18324 2009-02-07 16:20:34Z iflorespaz $
/*
==============================================================================
Dokeos - elearning and course management software
@ -49,7 +49,7 @@ $htmlHeadXtra[] = '<script type="text/javascript">
}
</script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="/main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="./main/inc/lib/javascript/jquery.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript">
$(document).ready(function (){
$("input#id_btn_send_invitation").bind("click", function(){

Loading…
Cancel
Save