Adding a new element called "label" in the quickform + some fixes in the social UI

skala
Julio Montoya 13 years ago
parent 8664c50003
commit de5775aa61
  1. 6
      main/create_course/add_course.php
  2. 21
      main/css/base.css
  3. 12
      main/inc/lib/message.lib.php
  4. 3
      main/inc/lib/pear/HTML/QuickForm.php
  5. 64
      main/inc/lib/pear/HTML/QuickForm/label.php
  6. 19
      main/inc/lib/social.lib.php
  7. 8
      main/messages/send_message.php
  8. 54
      main/messages/send_message_to_userfriend.inc.php
  9. 9
      main/social/home.php
  10. 92
      main/social/invitations.php
  11. 14
      main/template/default/layout/social_layout.tpl

@ -124,15 +124,15 @@ $titular = & $form->add_textfield('tutor_name', array(get_lang('Professor'), nul
if ($course_validation_feature) {
// Description of the requested course.
$form->addElement('textarea', 'description', get_lang('Description'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'description', get_lang('Description'), array('class' => 'span6', 'rows' => '3'));
//$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
// Objectives of the requested course.
$form->addElement('textarea', 'objetives', get_lang('Objectives'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'objetives', get_lang('Objectives'), array('class' => 'span6', 'rows' => '3'));
//$form->addRule('objetives', get_lang('ThisFieldIsRequired'), 'required');
// Target audience of the requested course.
$form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('style' => 'border:#A5ACB2 solid 1px; font-family:arial,verdana,helvetica,sans-serif; font-size:12px', 'rows' => '3', 'cols' => '116'));
$form->addElement('textarea', 'target_audience', get_lang('TargetAudience'), array('class' => 'span6', 'rows' => '3'));
//$form->addRule('target_audience', get_lang('ThisFieldIsRequired'), 'required');
}

@ -683,10 +683,6 @@ a.personal_agenda:hover, a.personal_agenda:hover {
margin-top: 10px;
}
.social-background-content {
width:auto;
}
.group_social_item {
float:left;
width:95%;
@ -1873,18 +1869,14 @@ div.image-social-content center.friend {
font-size:12px;
font-weight:bold;
}
.social-menu-text4 {
font-family:Verdana, Geneva, sans-serif;
.social-menu-text4 {
color:#000;
font-weight:normal;
font-size:10px;
font-weight:normal;
vertical-align:bottom;
}
.social-menu-text-active {
font-family:Verdana, Geneva, sans-serif;
.social-menu-text-active {
color:#000;
font-weight:bold;
font-size:10px;
font-weight:bold;
vertical-align:bottom;
}
.social-menu-title-right {
@ -2061,10 +2053,7 @@ border-top: 1px solid #E2E2E2;
.social-background-content {
z-index:5;
position:relative;
width:185px;
left:-10px;
overflow:hidden;
text-align: center;
}
.social-background-content .hidden_message {

@ -213,8 +213,7 @@ class MessageManager
* @param bool sent an email or not (@todo)
* @return bool
*/
public static function send_message($receiver_user_id, $subject, $content, $file_attachments = array(), $file_comments = array(), $group_id = 0, $parent_id = 0, $edit_message_id = 0, $topic_id = 0) {
global $charset;
public static function send_message($receiver_user_id, $subject, $content, $file_attachments = array(), $file_comments = array(), $group_id = 0, $parent_id = 0, $edit_message_id = 0, $topic_id = 0) {
$table_message = Database::get_main_table(TABLE_MESSAGE);
$group_id = intval($group_id);
$receiver_user_id = intval($receiver_user_id);
@ -243,8 +242,7 @@ class MessageManager
//Just in case we replace the and \n and \n\r while saving in the DB
$content = str_replace(array("\n", "\n\r"), '<br />', $content);
$now = api_get_utc_datetime();
$now = api_get_utc_datetime();
if (!empty($receiver_user_id) || !empty($group_id)) {
// message for user friend
@ -263,7 +261,9 @@ class MessageManager
"VALUES ('$user_sender_id', '$receiver_user_id', '1', '".$now."','$clean_subject','$clean_content','$group_id','$parent_id', '".$now."')";
$result = Database::query($query);
$inbox_last_id = Database::insert_id();
}
}
// Save attachment file for inbox messages
if (is_array($file_attachments)) {
@ -299,7 +299,7 @@ class MessageManager
$notification = new Notification();
$sender_info = api_get_user_info($user_sender_id);
if (empty($group_id)) {
if (empty($group_id)) {
$notification->save_notification(NOTIFICATION_TYPE_MESSAGE, array($receiver_user_id), $subject, $content, $sender_info);
} else {
$group_info = GroupPortalManager::get_group_data($group_id);

@ -63,7 +63,8 @@ $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] =
'hierselect' =>array('HTML/QuickForm/hierselect.php', 'HTML_QuickForm_hierselect'),
'autocomplete' =>array('HTML/QuickForm/autocomplete.php', 'HTML_QuickForm_autocomplete'),
'xbutton' =>array('HTML/QuickForm/xbutton.php','HTML_QuickForm_xbutton'),
'advanced_settings' =>array('HTML/QuickForm/advanced_settings.php','HTML_QuickForm_advanced_settings')
'advanced_settings' =>array('HTML/QuickForm/advanced_settings.php','HTML_QuickForm_advanced_settings'),
'label' =>array('HTML/QuickForm/label.php','HTML_QuickForm_label'),
);

@ -0,0 +1,64 @@
<?php
/**
* HTML class for static data
*/
require_once 'HTML/QuickForm/static.php';
/**
* A pseudo-element used for adding raw HTML to form
*
* Intended for use with the default renderer only, template-based
* ones may (and probably will) completely ignore this
*
* @category HTML
* @package HTML_QuickForm
* @author Alexey Borzov <avb@php.net>
* @version Release: 3.2.11
* @since 3.0
* @deprecated Please use the templates rather than add raw HTML via this element
*/
class HTML_QuickForm_label extends HTML_QuickForm_static
{
// {{{ constructor
/**
* Class constructor
*
* @param string $text raw HTML to add
* @access public
* @return void
*/
function HTML_QuickForm_label($label, $text) {
$this->HTML_QuickForm_static(null, $label, $text);
$this->_type = 'html';
}
// }}}
// {{{ accept()
/**
* Accepts a renderer
*
* @param HTML_QuickForm_Renderer renderer object (only works with Default renderer!)
* @access public
* @return void
*/
function accept(&$renderer) {
$renderer->renderHtml($this);
}
function toHtml() {
return '<div class="control-group ">
<label class="control-label">'.$this->getLabel().'</label>
<div class="controls">
'.HTML_QuickForm_static::toHtml().'
</div>
</div>
';
} //end func toHtml
// }}}
} //end class HTML_QuickForm_html

@ -321,15 +321,15 @@ class SocialManager extends UserManager {
if (isset($subject_message) && isset($content_message) && isset($userfriend_id)) {
$send_message = MessageManager::send_message($userfriend_id, $subject_message, $content_message);
if ($send_message) {
echo Display::display_confirmation_message($succes,true);
} else {
echo Display::display_error_message($succes,true);
echo Display::display_error_message(get_lang('ErrorSendingMessage'),true);
}
return false;
} elseif (isset($userfriend_id) && !isset($subject_message)) {
$count_is_true=false;
$count_number_is_true=0;
$count_is_true = false;
if (isset($userfriend_id) && $userfriend_id>0) {
$message_title = get_lang('Invitation');
$count_is_true = self::send_invitation_friend(api_get_user_id(), $userfriend_id, $message_title, $content_message);
@ -563,7 +563,6 @@ class SocialManager extends UserManager {
}
$user_info = api_get_user_info($user_id, true);
$show_groups = array('groups', 'group_messages', 'messages_list', 'group_add', 'mygroups', 'group_edit', 'member_list', 'invite_friends', 'waiting_list', 'browse_groups');
$show_messages = array('messages', 'messages_inbox', 'messages_outbox', 'messages_compose');
@ -599,12 +598,12 @@ class SocialManager extends UserManager {
//$original = GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],'',GROUP_IMAGE_SIZE_ORIGINAL);
$html .= '<div class="social-content-image">';
$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()"><center>';
$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()">';
$html .= Display::url('<img src='.$big['file'].' class="social-groups-image" /> </a><br /><br />', api_get_path(WEB_PATH).'main/social/groups.php?id='.$group_id);
if (GroupPortalManager::is_group_admin($group_id, api_get_user_id())) {
$html .= '<div id="edit_image" class="hidden_message" style="display:none"><a href="'.api_get_path(WEB_PATH).'main/social/group_edit.php?id='.$group_id.'">'.get_lang('EditGroup').'</a></div>';
}
$html .= '</center></div>';
$html .= '</div>';
$html .= '</div>';
} else {
@ -614,8 +613,8 @@ class SocialManager extends UserManager {
$normal_image = $img_array['dir'].$img_array['file'].'?'.uniqid();
//--- User image
$html .= '<div class="social-content-image">';
$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()"><center>';
$html .= '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()">';
if ($img_array['file'] != 'unknown.jpg') {
$html .= '<a class="thickbox" href="'.$big_image.'"><img src='.$normal_image.' /> </a>';
@ -626,8 +625,8 @@ class SocialManager extends UserManager {
$html .= '<div id="edit_image" class="hidden_message" style="display:none">';
$html .= '<a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></div>';
}
$html .= '</center></div>';
$html .= '</div>';
$html .= '</div>';
}
if (!in_array($show, array('shared_profile', 'groups', 'group_edit', 'member_list','waiting_list','invite_friends'))) {

@ -20,8 +20,6 @@ $panel_id = intval($_POST['panel_id']);
$content_message = $_POST['txt_content'];
$subject_message = $_POST['txt_subject'];
$user_info = array();
$user_info = api_get_user_info($user_id);
@ -30,7 +28,7 @@ if ($panel_id == 2 || $panel_id == 4 ) {
?>
<div id="display_response_id" style="height:200px;">
<?php echo api_xml_http_response_encode(get_lang('AddPersonalMessage')); ?> :<br /><br />
<textarea id="txt_area_invite" rows="5" cols="40"></textarea><br />
<textarea id="txt_area_invite" rows="5" class="span6" ></textarea><br />
<?php echo api_xml_http_response_encode(get_lang('YouShouldWriteAMessage')); ?><br /><br />
<button class="save" type="button" value="<?php echo api_xml_http_response_encode(get_lang('SocialAddToFriends')); ?>" onclick="action_database_panel('4','<?php echo $user_id;?>')" >
<?php echo api_xml_http_response_encode(get_lang('SendInvitation')) ?></button>
@ -42,7 +40,7 @@ if ($panel_id == 2 || $panel_id == 4 ) {
?>
<td height="20"><?php echo api_xml_http_response_encode(get_lang('To')); ?> &nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); ?></td>
<td height="20"><?php echo api_xml_http_response_encode(get_lang('Subject')); ?> :<br/><input id="txt_subject_id" type="text" style="width:200px;"></td>
<td height="20"><?php echo api_xml_http_response_encode(get_lang('Message')); ?> :<br/><textarea id="txt_area_invite" rows="3" cols="25"></textarea></td>
<td height="20"><?php echo api_xml_http_response_encode(get_lang('Message')); ?> :<br/><textarea id="txt_area_invite" rows="3" class="span6" ></textarea></td>
<td height="20"><input type="button" value="<?php echo api_xml_http_response_encode(get_lang('NewMessage')); ?>" onclick="hide_display_message()" />&nbsp;&nbsp;&nbsp; <input type="button" value="<?php echo api_xml_http_response_encode(get_lang('SendMessage')); ?>" onclick="action_database_panel('5','<?php echo $user_id;?>')" /></td>
<?php
}
@ -59,7 +57,7 @@ if ($panel_id == 2 || $panel_id == 4 ) {
<?php echo api_xml_http_response_encode(get_lang('To')); ?> :&nbsp;&nbsp;&nbsp;&nbsp;<?php echo api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); ?>
<br />
<br /><span style="color:red">*</span><?php echo api_xml_http_response_encode(get_lang('Subject')); ?> :<br /><input id="txt_subject_id" type="text" style="width:300px;"><br/>
<br /><?php echo api_xml_http_response_encode(get_lang('Message')); ?> :<br /><textarea id="txt_area_invite" rows="3" cols="40"></textarea>
<br /><?php echo api_xml_http_response_encode(get_lang('Message')); ?> :<br /><textarea id="txt_area_invite" rows="3" class="span6" ></textarea>
<?php echo Display::display_error_message(api_xml_http_response_encode(get_lang('YouShouldWriteASubject'))); ?>
<button class="save" type="button" value="<?php echo api_xml_http_response_encode(get_lang('SendMessage')); ?>" onclick="action_database_panel('5','<?php echo $user_id;?>')">
<?php echo api_xml_http_response_encode(get_lang('SendMessage')) ?></button>

@ -22,8 +22,7 @@ if (isset($_REQUEST['user_friend']) ) {
// panel=1 send message
// panel=2 send invitation
$panel=intval($_REQUEST['view_panel']);
$info_user_friend=api_get_user_info($userfriend_id);
$info_user_friend=api_get_user_info($userfriend_id);
}
?>
<div id="id_content_panel_init">
@ -31,48 +30,23 @@ if (isset($_REQUEST['user_friend']) ) {
if (api_get_setting('allow_message_tool')=='true') {
if ($panel == 1) {
//normal message
$user_info=api_get_user_info($userfriend_id); ?>
<div id="display_response_id" style="height:200px;width:400px">
<div class="row">
<div class="label">
<?php echo api_xml_http_response_encode(get_lang('To')); ?>:
<?php echo api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName'])); ?>
</div>
</div>
<br />
<div class="row">
<div class="label">
<span style="color:red"> * </span><?php echo api_xml_http_response_encode(get_lang('Subject')); ?> :
</div>
<div class="formw">
<input id="txt_subject_id" type="text" style="width:400px;">
</div>
</div>
<br />
<div class="row">
<div class="label">
<?php echo api_xml_http_response_encode(get_lang('Message')); ?> :
</div>
<div class="formw">
<textarea id="txt_area_invite" rows="5" cols="55"></textarea>
</div>
</div>
<br />
<div class="row">
<div class="label">
</div>
<div class="formw">
<button class="save" type="button" value="<?php echo api_xml_http_response_encode(get_lang('SendMessage')); ?>" onclick="action_database_panel('5','<?php echo $userfriend_id;?>')"><?php echo api_xml_http_response_encode(get_lang('SendMessage')) ?></button>
</div>
</div>
</div>
<?php
$user_info=api_get_user_info($userfriend_id);
echo '<div id="display_response_id" style="height:200px;">';
$form = new FormValidator('add_user', null, null, null, array('class'=>'form-vertical'));
//$username = api_xml_http_response_encode(get_lang('To')).api_xml_http_response_encode(api_get_person_name($user_info['firstName'], $user_info['lastName']));
$form->addElement('label', get_lang('To'), api_get_person_name($user_info['firstName'], $user_info['lastName']));
////$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('text', 'subject', get_lang('Subject'), array('id'=>'txt_subject_id','class'=>'span4'));
$form->addElement('textarea', 'message', get_lang('Message'), array('id'=>'txt_area_invite','class'=>'span4'));
$form->addElement('style_submit_button', 'send', get_lang('SendMessage'), array('onclick'=>"action_database_panel('5','".$userfriend_id."')"));
$form->display();
echo '</div>';
} else {
// friend invitation message
?>
<div id="display_response_id" style="height:200px;">
<?php echo api_xml_http_response_encode(get_lang('AddPersonalMessage')); ?> :<br /><br />
<textarea id="txt_area_invite" rows="5" cols="55"></textarea><br /><br />
<textarea id="txt_area_invite" rows="5" class="span6" ></textarea><br /><br />
<button class="save" type="button" value="<?php echo api_xml_http_response_encode(get_lang('SocialAddToFriends')); ?>" onclick="action_database_panel('4','<?php echo $userfriend_id;?>')" >
<?php echo api_xml_http_response_encode(get_lang('SendInvitation')) ?></button>
</div>
@ -80,4 +54,4 @@ if (api_get_setting('allow_message_tool')=='true') {
}
}
?>
</div>
</div>

@ -69,7 +69,7 @@ $user_info = UserManager :: get_user_info_by_id(api_get_user_id());
$social_left_content = SocialManager::show_social_menu('home');
$social_right_content .= '<div class="social_user_information" style="width:280px">';
$social_right_content .= '<div class="row"><div class="social_user_information span5">';
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('ContactInformation').'</div>';
@ -90,7 +90,7 @@ $social_left_content = SocialManager::show_social_menu('home');
$skill = new Skill();
$skills = $skill->get_user_skills(api_get_user_id(), true);
$social_right_content .= '<div class="left" style="width:280px">';
$social_right_content .= '<div class="clear"></div>';
$social_right_content .= '<div class="social-groups-home-title">'.get_lang('Skills').'</div>';
$lis = '';
if (!empty($skills)) {
@ -102,11 +102,11 @@ $social_left_content = SocialManager::show_social_menu('home');
$url = api_get_path(WEB_CODE_PATH).'social/skills_tree.php';
$social_right_content .= Display::url(get_lang('ViewSkillsTree'), $url);
$social_right_content .= '</div>';
$social_right_content .= '</div>'; // end social_user_information
//Search box
$social_right_content .= '<div class="social-box-right">';
$social_right_content .= '<div class="span6">';
$social_right_content .= UserManager::get_search_form('');
$social_right_content .= '<br />';
@ -165,6 +165,7 @@ $social_left_content = SocialManager::show_social_menu('home');
$social_right_content .= Display::return_sortable_grid('home_group', array(), $groups_pop, array('hide_navigation'=>true, 'per_page' => 100), array(), false, array(true, true, true,true,true));
}
$social_right_content .= '</div>';
$social_right_content .= '</div>';
$tpl = new Template(get_lang('Social'));
$tpl->assign('social_left_content', $social_left_content);

@ -96,101 +96,99 @@ $social_left_content = SocialManager::show_social_menu('invitations');
$social_right_content = '<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) + count($pending_invitations);
if ($total_invitations == 0 && count($_GET) <= 0) {
$social_right_content .= '<a href="search.php">'.get_lang('TryAndFindSomeFriends').'</a><br /><br />';
}
$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) + count($pending_invitations);
if ($total_invitations == 0 && count($_GET) <= 0) {
$social_right_content .= '<a href="search.php">'.get_lang('TryAndFindSomeFriends').'</a><br /><br />';
}
if ($number_loop != 0) {
$social_right_content .= '<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
$sender_user_id = $invitation['user_sender_id'];
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="invitation_confirm">';
$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 = Security::remove_XSS($invitation['title'], STUDENT, true);
$content = Security::remove_XSS($invitation['content'], STUDENT, true);
$date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
?>
<table cellspacing="0" border="0">
$social_right_content .= '<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>
<img src="'.$friends_profile['file'].'" '.$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>
<a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</a>
<div>
<?php echo $title.' : '.$content;?>
'.$title.' : '.$content.'
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
'.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>
<button class="save" name="btn_accepted" type="submit" id="btn_accepted_'.$sender_user_id.'" value="'.get_lang('Accept').' "onclick="javascript:register_friend(this)">
'.get_lang('Accept').'</button>
<button class="cancel" name="btn_denied" type="submit" id="btn_deniedst_'.$sender_user_id.' " value="'.get_lang('Deny').' " onclick="javascript:denied_friend(this)" >
'.get_lang('Deny').'</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
</div>';
}
}
if (count($list_get_invitation_sent) > 0 ) {
echo '<h2>'.get_lang('InvitationSent').'</h2>';
$social_right_content .= '<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 = Security::remove_XSS($invitation['title'], STUDENT, true);
$content = Security::remove_XSS($invitation['content'], STUDENT, true);
$date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
?>
$sender_user_id = $invitation['user_receiver_id'];
$social_right_content .= '<div id="id_'.$sender_user_id.'" class="invitation_confirm">';
$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 = Security::remove_XSS($invitation['title'], STUDENT, true);
$content = Security::remove_XSS($invitation['content'], STUDENT, true);
$date = api_convert_and_format_date($invitation['send_date'], DATE_TIME_FORMAT_LONG);
$social_right_content .= '
<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>
<img src="'.$friends_profile['file'].'" '.$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>
<a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</a>
<div>
<?php echo $title.' : '.$content;?>
'. $title.' : '.$content.'
</div>
<div>
<?php echo get_lang('DateSend').' : '.$date;?>
'. get_lang('DateSend').' : '.$date.'
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php
';
}
}

@ -1,15 +1,11 @@
<div id="social-content">
<div id="social-content-left">
{$social_left_content}
</div>
<div class="row-fluid">
<div class="social-menu">
<div class="span3">
{$social_left_content}
{$social_left_menu}
</div>
<div id="social-content-right">
<div class="span9">
{$social_right_content}
</div>
</div>
<div class="clear">&nbsp;</div>
</div>
Loading…
Cancel
Save