[svn r20460] FS#306 - The "Messages" tool: Improvements for better encoding support.

skala
Ivan Tcholakov 16 years ago
parent 1e1cdaa34f
commit 4d66a774c5
  1. 6
      main/messages/inbox.php
  2. 56
      main/messages/message.class.php
  3. 26
      main/messages/new_message.php
  4. 6
      main/messages/outbox.php
  5. 24
      main/messages/send_message.php
  6. 14
      main/messages/send_message_to_userfriend.inc.php
  7. 6
      main/messages/view_message.php

@ -156,9 +156,9 @@ if ($request===false) {
}
$table_message = Database::get_main_table(TABLE_MESSAGE);
echo '<div id="div_content_messages">&nbsp;&nbsp;';
//api_display_tool_title(mb_convert_encoding(get_lang('Inbox'),'UTF-8',$charset));
//api_display_tool_title(api_convert_encoding(get_lang('Inbox'),'UTF-8',$charset));
echo '<div class=actions>';
echo '<a onclick="compose_and_show_message(\'show\',\'1\')" href="javascript:void(0)">'.Display::return_icon('message_new.png',mb_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset)).mb_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset).'</a>';
echo '<a onclick="compose_and_show_message(\'show\',\'1\')" href="javascript:void(0)">'.Display::return_icon('message_new.png',api_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset)).api_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset).'</a>';
echo '</div>';
echo '</div>';
if (!isset($_GET['del_msg'])) {
@ -182,4 +182,4 @@ if (!isset($_GET['del_msg'])) {
if ($request===false) {
Display::display_footer();
}
?>
?>

@ -46,33 +46,33 @@ class MessageManager {
if ($_SESSION['social_exist']===true) {
$redirect="#remote-tab-2";
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
$success=mb_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
$success=api_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
"&nbsp;<b>".
GetFullUserName($uid).
"</b>".
"<br><a href=\"".
"../social/index.php$redirect\">".
mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
"</a>";
}else {
$success= mb_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
$success= api_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
"&nbsp;<b>".
GetFullUserName($uid).
"</b>".
"<br><a href=\"".
"../social/index.php$redirect\">".
mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
"</a>";
}
} else {
$success= mb_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
$success= api_convert_encoding(get_lang('MessageSentTo'),'UTF-8',$charset).
"&nbsp;<b>".
GetFullUserName($uid).
"</b>".
"<br><a href=\"".
"inbox.php\">".
mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).
"</a>";
}
Display::display_confirmation_message($success, false);
@ -157,15 +157,15 @@ class MessageManager {
$message[1] = Display::return_icon('mail.png',get_lang('UnReadMessage'));//Message without reading
}
$message[2] = mb_convert_encoding(GetFullUserName($result[1]),'UTF-8',$charset);
$message[3] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",mb_convert_encoding($result[2],'UTF-8',$charset)).'</a>';
$message[2] = api_convert_encoding(GetFullUserName($result[1]),'UTF-8',$charset);
$message[3] = '<a onclick="get_action_url_and_show_messages(1,'.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",api_convert_encoding($result[2],'UTF-8',$charset)).'</a>';
$message[5] = '<a onclick="reply_to_messages(\'show\','.$result[0].',\'\')" href="javascript:void(0)">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a onclick="delete_one_message('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
'&nbsp;&nbsp;<a onclick="delete_one_message('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
} else {
$message[2] = GetFullUserName(($result[1]));
$message[3] = '<a href="view_message.php?id='.$result[0].'">'.$result[2].'</a>';
$message[5] = '<a href="new_message.php?re_id='.$result[0].'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="#inbox.php?action=deleteone&id='.$result[0].'">'.Display::return_icon('message_delete.png',mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
'&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="#inbox.php?action=deleteone&id='.$result[0].'">'.Display::return_icon('message_delete.png',api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
}
$message[4] = ($result[3]); //date stays the same
$message_list[] = $message;
@ -280,14 +280,14 @@ class MessageManager {
{
$message[1] = Display::return_icon('mail_send.png',get_lang('MessageSent'));//Message Sent
}
$message[2] = mb_convert_encoding(GetFullUserName($result[4]),'UTF-8',$charset);
$message[3] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",mb_convert_encoding($result[2],'UTF-8',$charset)).'</a>';
$message[5] = '&nbsp;&nbsp;<a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
$message[2] = api_convert_encoding(GetFullUserName($result[4]),'UTF-8',$charset);
$message[3] = '<a onclick="show_sent_message('.$result[0].')" href="javascript:void(0)">'.str_replace("\\","",api_convert_encoding($result[2],'UTF-8',$charset)).'</a>';
$message[5] = '&nbsp;&nbsp;<a onclick="delete_one_message_outbox('.$result[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).'</a>';
} else {
$message[2] = GetFullUserName($result[4]);
$message[3] = '<a onclick="show_sent_message ('.$result[0].')" href="#../messages/view_message.php?id_send='.$result[0].'">'.$result[2].'</a>';
$message[5] = '<a href="new_message.php?re_id='.$result[0].'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
'&nbsp;&nbsp;<a href="outbox.php?action=deleteone&id='.$result[0].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(mb_convert_encoding(get_lang('ConfirmDeleteMessage'),'UTF-8',$charset) ))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
'&nbsp;&nbsp;<a href="outbox.php?action=deleteone&id='.$result[0].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(api_convert_encoding(get_lang('ConfirmDeleteMessage'),'UTF-8',$charset) ))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
}
$message[4] = $result[3]; //date stays the same
$message_list[] = $message;
@ -333,10 +333,10 @@ class MessageManager {
$reply = '<a onclick="reply_to_messages(\'show\','.$_GET['id'].',\'\')" href="javascript:void(0)">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).get_lang('ReplyToMessage').'</a>';
}
echo '<div class=actions>';
echo '<a onclick="close_div_show(\'div_content_messages\')" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset)
).mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).'</a>';
echo '<a onclick="close_div_show(\'div_content_messages\')" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset)
).api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).'</a>';
echo $reply;
echo '<a onclick="delete_one_message('.$row[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).''.mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset).'</a>';
echo '<a onclick="delete_one_message('.$row[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).''.api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset).'</a>';
echo '</div><br />';
echo '
<table class="message_view_table" >
@ -346,13 +346,13 @@ class MessageManager {
<TABLE>
<TR>
<TD width="100%">
<TR> <h1>'.str_replace("\\","",mb_convert_encoding($row[5],'UTF-8',$charset)).'</h1></TR>
<TR> <h1>'.str_replace("\\","",api_convert_encoding($row[5],'UTF-8',$charset)).'</h1></TR>
</TD>
<TR>
<TD>'.mb_convert_encoding(get_lang('From'),'UTF-8',$charset).'&nbsp;<b>'.GetFullUserName($row[1]).'</b> '.mb_convert_encoding(strtolower(get_lang('To')),'UTF-8',$charset).'&nbsp; <b>'.mb_convert_encoding(GetFullUserName($row[2]),'UTF-8',$charset).'</b> </TD>
<TD>'.api_convert_encoding(get_lang('From'),'UTF-8',$charset).'&nbsp;<b>'.GetFullUserName($row[1]).'</b> '.api_convert_encoding(strtolower(get_lang('To')),'UTF-8',$charset).'&nbsp; <b>'.api_convert_encoding(GetFullUserName($row[2]),'UTF-8',$charset).'</b> </TD>
</TR>
<TR>
<TD >'.mb_convert_encoding(get_lang('Date'),'UTF-8',$charset).'&nbsp; '.$row[4].'</TD>
<TD >'.api_convert_encoding(get_lang('Date'),'UTF-8',$charset).'&nbsp; '.$row[4].'</TD>
</TR>
</TR>
</TABLE>
@ -360,7 +360,7 @@ class MessageManager {
<TABLE height=209 width="100%" bgColor=#ffffff>
<TBODY>
<TR>
<TD vAlign=top>'.mb_convert_encoding($row[6],'UTF-8',$charset).'</TD>
<TD vAlign=top>'.api_convert_encoding($row[6],'UTF-8',$charset).'</TD>
</TR>
</TBODY>
</TABLE>
@ -384,8 +384,8 @@ class MessageManager {
if ($row[1]==$user_con[$i])
$band=1;
echo '<div class=actions>';
echo '<a onclick="close_and_open_outbox()" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',mb_convert_encoding(get_lang('BackToOutbox'),'UTF-8',$charset)).mb_convert_encoding(get_lang('BackToOutbox'),'UTF-8',$charset).'</a>';
echo '<a onclick="delete_one_message_outbox('.$row[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).''.mb_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset).'</a>';
echo '<a onclick="close_and_open_outbox()" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',api_convert_encoding(get_lang('BackToOutbox'),'UTF-8',$charset)).api_convert_encoding(get_lang('BackToOutbox'),'UTF-8',$charset).'</a>';
echo '<a onclick="delete_one_message_outbox('.$row[0].')" href="javascript:void(0)" >'.Display::return_icon('message_delete.png',api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset)).''.api_convert_encoding(get_lang('DeleteMessage'),'UTF-8',$charset).'</a>';
echo '</div><br />';
echo '
<table class="message_view_table" >
@ -395,13 +395,13 @@ class MessageManager {
<TABLE>
<TR>
<TD width="100%">
<TR> <h1>'.str_replace("\\","",mb_convert_encoding($row[5],'UTF-8',$charset)).'</h1></TR>
<TR> <h1>'.str_replace("\\","",api_convert_encoding($row[5],'UTF-8',$charset)).'</h1></TR>
</TD>
<TR>
<TD>'.mb_convert_encoding(get_lang('From'),'UTF-8',$charset).'&nbsp;<b>'.GetFullUserName($row[1]).'</b> '.mb_convert_encoding(strtolower(get_lang('To')),'UTF-8',$charset).'&nbsp; <b>'.mb_convert_encoding(GetFullUserName($row[2]),'UTF-8',$charset).'</b> </TD>
<TD>'.api_convert_encoding(get_lang('From'),'UTF-8',$charset).'&nbsp;<b>'.GetFullUserName($row[1]).'</b> '.api_convert_encoding(strtolower(get_lang('To')),'UTF-8',$charset).'&nbsp; <b>'.api_convert_encoding(GetFullUserName($row[2]),'UTF-8',$charset).'</b> </TD>
</TR>
<TR>
<TD >'.mb_convert_encoding(get_lang('Date'),'UTF-8',$charset).'&nbsp; '.$row[4].'</TD>
<TD >'.api_convert_encoding(get_lang('Date'),'UTF-8',$charset).'&nbsp; '.$row[4].'</TD>
</TR>
</TR>
</TABLE>
@ -409,7 +409,7 @@ class MessageManager {
<TABLE height=209 width="100%" bgColor=#ffffff>
<TBODY>
<TR>
<TD vAlign=top>'.mb_convert_encoding($row[6],'UTF-8',$charset).'</TD>
<TD vAlign=top>'.api_convert_encoding($row[6],'UTF-8',$charset).'</TD>
</TR>
</TBODY>
</TABLE>
@ -435,4 +435,4 @@ class MessageManager {
}
}
}
?>
?>

@ -1,4 +1,4 @@
<?php // $Id: new_message.php 20301 2009-05-04 20:58:41Z iflorespaz $
<?php // $Id: new_message.php 20460 2009-05-11 05:41:09Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -51,7 +51,7 @@ require_once'../messages/message.class.php';
require_once(api_get_path(LIBRARY_PATH).'/text.lib.php');
require_once(api_get_path(LIBRARY_PATH).'/formvalidator/FormValidator.class.php');
$request=api_is_xml_http_request();
$nameTools=($request===true) ? mb_convert_encoding(get_lang('Messages'),'UTF-8',$charset) : get_lang('Messages');
$nameTools=($request===true) ? api_convert_encoding(get_lang('Messages'),'UTF-8',$charset) : get_lang('Messages');
/*
-----------------------------------------------------------
Constants and variables
@ -100,7 +100,7 @@ $(document).ready(function (){
});
</script>';
$nameTools=($request===true) ? mb_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset) : get_lang('ComposeMessage');
$nameTools=($request===true) ? api_convert_encoding(get_lang('ComposeMessage'),'UTF-8',$charset) : get_lang('ComposeMessage');
$fck_attribute['Height'] = "150";
$fck_attribute['Width'] = "95%";
$fck_attribute['ToolbarSet'] = "Profil";
@ -132,7 +132,7 @@ function show_compose_reply_to_message ($message_id, $receiver_id) {
die();
}
echo get_lang('To').':&nbsp;<strong>'. GetFullUserName($row[1]).'</strong>';
$default['title'] =mb_convert_encoding(get_lang('EnterTitle'),'UTF-8',$charset);
$default['title'] =api_convert_encoding(get_lang('EnterTitle'),'UTF-8',$charset);
$default['user_list'] = $row[1];
manage_form($default);
}
@ -140,7 +140,7 @@ function show_compose_reply_to_message ($message_id, $receiver_id) {
function show_compose_to_user ($receiver_id) {
global $charset;
echo get_lang('To').':&nbsp;<strong>'. GetFullUserName($receiver_id).'</strong>';
$default['title'] = mb_convert_encoding(get_lang('EnterTitle'),'UTF-8',$charset);
$default['title'] = api_convert_encoding(get_lang('EnterTitle'),'UTF-8',$charset);
$default['user_list'] = $receiver_id;
manage_form($default);
}
@ -167,13 +167,13 @@ function manage_form ($default, $select_from_user_list = null) {
}
$form->addElement('hidden','user_list',0,array('id'=>'user_list'));
}
$form->add_textfield('title', mb_convert_encoding(get_lang('Title'),'UTF-8',$charset));
$form->add_textfield('title', api_convert_encoding(get_lang('Title'),'UTF-8',$charset));
$form->add_html_editor('content', '',false,false);
if (isset($_GET['re_id'])) {
$form->addElement('hidden','re_id',Security::remove_XSS($_GET['re_id']));
$form->addElement('hidden','save_form','save_form');
}
$form->addElement('submit', 'compose',mb_convert_encoding(get_lang('Send'),'UTF-8',$charset));
$form->addElement('submit', 'compose',api_convert_encoding(get_lang('Send'),'UTF-8',$charset));
$form->setDefaults($default);
if ($form->validate()) {
$values = $form->exportValues();
@ -220,7 +220,7 @@ if ($request===false) {
//api_display_tool_title($nameTools);
echo '<div class=actions>';
echo '<a onclick="close_div_show(\'div_content_messages\')" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset)).mb_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).'</a>';
echo '<a onclick="close_div_show(\'div_content_messages\')" href="javascript:void(0)">'.Display::return_icon('folder_up.gif',api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset)).api_convert_encoding(get_lang('BackToInbox'),'UTF-8',$charset).'</a>';
echo '</div>';
if (!isset($_POST['compose'])) {
if(isset($_GET['re_id'])) {
@ -238,14 +238,14 @@ if (!isset($_POST['compose'])) {
}
if (isset($_GET['re_id'])) {
$default['title'] = mb_convert_encoding($_POST['title'],'UTF-8',$charset);
$default['content'] = mb_convert_encoding($_POST['content'],'UTF-8',$charset);
$default['title'] = api_convert_encoding($_POST['title'],'UTF-8',$charset);
$default['content'] = api_convert_encoding($_POST['content'],'UTF-8',$charset);
//$default['user_list'] = $_POST['user_list'];
manage_form($default);
} else {
if ($restrict) {
$default['title'] = mb_convert_encoding($_POST['title'],'UTF-8',$charset);
$default['id_text_name'] = mb_convert_encoding($_POST['id_text_name'],'UTF-8',$charset);
$default['title'] = api_convert_encoding($_POST['title'],'UTF-8',$charset);
$default['id_text_name'] = api_convert_encoding($_POST['id_text_name'],'UTF-8',$charset);
$default['user_list'] = $_POST['user_list'];
manage_form($default);
} else {
@ -261,4 +261,4 @@ if (!isset($_POST['compose'])) {
if ($request===false) {
Display::display_footer();
}
?>
?>

@ -47,7 +47,7 @@ $htmlHeadXtra[]='<script language="javascript">
<!--
function enviar(miforma)
{
if(confirm("'.get_lang("SureYouWantToDeleteSelectedMessages").'"))
if(confirm("'.get_lang('SureYouWantToDeleteSelectedMessages', '').'"))
miforma.submit();
}
function select_all(formita)
@ -113,7 +113,7 @@ if( trim($info_delete_outbox[0])=='delete' ) {
/**************************************************************/
$table_message = Database::get_main_table(TABLE_MESSAGE);
echo '<div id="div_content_messages_sent">&nbsp;&nbsp;';
//api_display_tool_title(mb_convert_encoding(get_lang('Outbox'),'UTF-8',$charset));
//api_display_tool_title(api_convert_encoding(get_lang('Outbox'),'UTF-8',$charset));
echo '</div>';
$user_sender_id=api_get_user_id();
if ($_REQUEST['action']=='delete') {
@ -146,4 +146,4 @@ if ($_REQUEST['action']=='delete') {
if ($request===false) {
Display::display_footer();
}
?>
?>

@ -43,28 +43,28 @@ $user_info=array();
$user_info=api_get_user_info($user_id);
if ($panel_id==2) {
?>
<td height="20"><?php //echo mb_convert_encoding(get_lang('Info'),'UTF-8',$charset).' :'; ?></td>
<td height="20"><?php //echo mb_convert_encoding(get_lang('SocialUserInformationAttach'),'UTF-8',$charset); ?></td>
<td height="20"><?php echo mb_convert_encoding(get_lang('WriteAMessage'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="3" cols="25"></textarea></td>
<td height="20"><input type="button" value="<?php echo mb_convert_encoding(get_lang('SendInviteMessage'),'UTF-8',$charset); ?>" onclick="action_database_panel('4','<?php echo $user_id;?>')" /></td>
<td height="20"><?php //echo api_convert_encoding(get_lang('Info'),'UTF-8',$charset).' :'; ?></td>
<td height="20"><?php //echo api_convert_encoding(get_lang('SocialUserInformationAttach'),'UTF-8',$charset); ?></td>
<td height="20"><?php echo api_convert_encoding(get_lang('WriteAMessage'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="3" cols="25"></textarea></td>
<td height="20"><input type="button" value="<?php echo api_convert_encoding(get_lang('SendInviteMessage'),'UTF-8',$charset); ?>" onclick="action_database_panel('4','<?php echo $user_id;?>')" /></td>
<?php
}
if ($panel_id==1) {
?>
<td height="20"><?php echo mb_convert_encoding(get_lang('To'),'UTF-8',$charset); ?> &nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset); ?></td>
<td height="20"><?php echo mb_convert_encoding(get_lang('Subject'),'UTF-8',$charset); ?> :<br/><input id="txt_subject_id" type="text" style="width:200px;"></td>
<td height="20"><?php echo mb_convert_encoding(get_lang('Message'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="3" cols="25"></textarea></td>
<td height="20"><input type="button" value="<?php echo mb_convert_encoding(get_lang('NewMessage'),'UTF-8',$charset); ?>" onclick="hide_display_message()" />&nbsp;&nbsp;&nbsp; <input type="button" value="<?php echo get_lang('SendMessage'); ?>" onclick="action_database_panel('5','<?php echo $user_id;?>')" /></td>
<td height="20"><?php echo api_convert_encoding(get_lang('To'),'UTF-8',$charset); ?> &nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;<?php echo api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset); ?></td>
<td height="20"><?php echo api_convert_encoding(get_lang('Subject'),'UTF-8',$charset); ?> :<br/><input id="txt_subject_id" type="text" style="width:200px;"></td>
<td height="20"><?php echo api_convert_encoding(get_lang('Message'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="3" cols="25"></textarea></td>
<td height="20"><input type="button" value="<?php echo api_convert_encoding(get_lang('NewMessage'),'UTF-8',$charset); ?>" onclick="hide_display_message()" />&nbsp;&nbsp;&nbsp; <input type="button" value="<?php echo get_lang('SendMessage'); ?>" onclick="action_database_panel('5','<?php echo $user_id;?>')" /></td>
<?php
}
if ($panel_id==3) {
?>
<dl>
<dd><a href="javascript:void(0)" onclick="change_panel('2','<?php echo $user_id; ?>')"><?php echo mb_convert_encoding(get_lang('SendInviteMessage'),'UTF-8',$charset); ?></a></dd>
<dd><a href="javascript:void(0)" onclick="change_panel('1','<?php echo $user_id; ?>')"><?php echo mb_convert_encoding(get_lang('SendMessage'),'UTF-8',$charset);?></a></dd>
<dd><a href="javascript:void(0)" onclick="change_panel('2','<?php echo $user_id; ?>')"><?php echo api_convert_encoding(get_lang('SendInviteMessage'),'UTF-8',$charset); ?></a></dd>
<dd><a href="javascript:void(0)" onclick="change_panel('1','<?php echo $user_id; ?>')"><?php echo api_convert_encoding(get_lang('SendMessage'),'UTF-8',$charset);?></a></dd>
</dl>
<?php
// <dd><a href="main/social/index.php#remote-tab-5"> echo mb_convert_encoding(get_lang('SocialSeeContacts'),'UTF-8',$charset);</a></dd>
// <dd><a href="main/social/index.php#remote-tab-5"> echo api_convert_encoding(get_lang('SocialSeeContacts'),'UTF-8',$charset);</a></dd>
}
if ($panel_id==4) {
@ -75,4 +75,4 @@ if ($panel_id==4) {
} elseif ($panel_id==5) {
UserFriend::send_invitation_friend_user($user_id,$subject_message,$content_message);
}
?>
?>

@ -33,7 +33,7 @@ if ( isset($_REQUEST['user_friend']) ) {
<img class="message-image-info" src="<?php echo $info_path_friend['dir'].$info_path_friend['file']; ?>"/>
<?php
if ($panel != 1) {
echo '<br /><center>'.mb_convert_encoding($info_user_friend['firstName'].' '.$info_user_friend['lastName'],'UTF-8',$charset).'</center>';
echo '<br /><center>'.api_convert_encoding($info_user_friend['firstName'].' '.$info_user_friend['lastName'],'UTF-8',$charset).'</center>';
}
?>
</div>
@ -45,19 +45,19 @@ if ( isset($_REQUEST['user_friend']) ) {
if ($panel == 1) {
//normal message
$user_info=api_get_user_info($userfriend_id);
echo mb_convert_encoding(get_lang('To'),'UTF-8',$charset); ?> :&nbsp;&nbsp;&nbsp;&nbsp;<?php echo mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset); ?>
echo api_convert_encoding(get_lang('To'),'UTF-8',$charset); ?> :&nbsp;&nbsp;&nbsp;&nbsp;<?php echo api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset); ?>
<br/>
<br/><?php echo mb_convert_encoding(get_lang('Subject'),'UTF-8',$charset); ?> :<br/><input id="txt_subject_id" type="text" style="width:300px;"><br/>
<br/><?php echo mb_convert_encoding(get_lang('Message'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="4" cols="41"></textarea>
<br/><?php echo api_convert_encoding(get_lang('Subject'),'UTF-8',$charset); ?> :<br/><input id="txt_subject_id" type="text" style="width:300px;"><br/>
<br/><?php echo api_convert_encoding(get_lang('Message'),'UTF-8',$charset); ?> :<br/><textarea id="txt_area_invite" rows="4" cols="41"></textarea>
<br /><br />
<input type="button" value="<?php echo get_lang('SendMessage'); ?>" onclick="action_database_panel('5','<?php echo $userfriend_id;?>')" />
<?php
} else {
// friend invitation message
echo mb_convert_encoding(get_lang('AddPersonalMessage'),'UTF-8',$charset); ?> :<br/><br/>
echo api_convert_encoding(get_lang('AddPersonalMessage'),'UTF-8',$charset); ?> :<br/><br/>
<textarea id="txt_area_invite" rows="5" cols="41"></textarea><br /><br />
<input type="button" value="<?php echo mb_convert_encoding(get_lang('SocialAddToFriends'),'UTF-8',$charset); ?>" onclick="action_database_panel('4','<?php echo $userfriend_id;?>')" />
<input type="button" value="<?php echo api_convert_encoding(get_lang('SocialAddToFriends'),'UTF-8',$charset); ?>" onclick="action_database_panel('4','<?php echo $userfriend_id;?>')" />
<?php
}
}
@ -73,4 +73,4 @@ if ( isset($_REQUEST['user_friend']) ) {
<div class="message-bottom-title">&nbsp;</div>
</td>
</tr>
</table>
</table>

@ -1,4 +1,4 @@
<?php // $Id: view_message.php 19975 2009-04-22 14:23:01Z pcool $
<?php // $Id: view_message.php 20460 2009-05-11 05:41:09Z ivantcholakov $
/*
==============================================================================
Dokeos - elearning and course management software
@ -80,7 +80,7 @@ $request=api_is_xml_http_request();
if ($request===false) {
Display::display_header('');
}
//api_display_tool_title(mb_convert_encoding(get_lang('ReadMessage'),'UTF-8',$charset));
//api_display_tool_title(api_convert_encoding(get_lang('ReadMessage'),'UTF-8',$charset));
if (isset($_GET['id_send'])) {
MessageManager::show_message_box_sent();
} else {
@ -94,4 +94,4 @@ if (isset($_GET['id_send'])) {
if ($request===false) {
Display::display_footer();
}
?>
?>

Loading…
Cancel
Save