|
|
|
|
@ -29,7 +29,6 @@ require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'message.lib.php'; |
|
|
|
|
|
|
|
|
|
$request=api_is_xml_http_request(); |
|
|
|
|
$nameTools = api_xml_http_response_encode(get_lang('Messages')); |
|
|
|
|
/* |
|
|
|
|
----------------------------------------------------------- |
|
|
|
|
@ -143,7 +142,6 @@ function show_compose_to_user ($receiver_id) { |
|
|
|
|
function manage_form ($default, $select_from_user_list = null) { |
|
|
|
|
global $charset; |
|
|
|
|
$table_message = Database::get_main_table(TABLE_MESSAGE); |
|
|
|
|
$request=api_is_xml_http_request(); |
|
|
|
|
|
|
|
|
|
$group_id = intval($_REQUEST['group_id']); |
|
|
|
|
$message_id = intval($_GET['message_id']); |
|
|
|
|
@ -239,15 +237,48 @@ if ($group_id != 0) { |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/social/groups.php?id='.$group_id.'">'.Display::return_icon('back.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('BackToGroup')).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?group_id='.$group_id.'">'.Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('ComposeMessage')).'</a>'; |
|
|
|
|
} else { |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',api_xml_http_response_encode(get_lang('Inbox'))).api_xml_http_response_encode(get_lang('Inbox')).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',api_xml_http_response_encode(get_lang('ComposeMessage'))).api_xml_http_response_encode(get_lang('ComposeMessage')).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',api_xml_http_response_encode(get_lang('Outbox'))).api_xml_http_response_encode(get_lang('Outbox')).'</a>'; |
|
|
|
|
if (api_get_setting('extended_profile') == 'true') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).' '.get_lang('ViewSharedProfile').'</a>'; |
|
|
|
|
} |
|
|
|
|
if (api_get_setting('allow_message_tool') == 'true') { |
|
|
|
|
echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>'; |
|
|
|
|
} |
|
|
|
|
$show = isset($_GET['show']) ? '&show='.Security::remove_XSS($_GET['show']) : ''; |
|
|
|
|
|
|
|
|
|
//echo '<span style="float:right; padding-top:7px;">'; |
|
|
|
|
|
|
|
|
|
if (isset($_GET['type']) && $_GET['type'] == 'extended') { |
|
|
|
|
echo '<a href="profile.php?type=reduced'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditNormalProfile')).' '.get_lang('EditNormalProfile').'</a>'; |
|
|
|
|
} else { |
|
|
|
|
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).' '.get_lang('EditExtendProfile').'</a>'; |
|
|
|
|
} |
|
|
|
|
//echo '</span>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isset($_POST['compose'])) { |
|
|
|
|
echo '<div id="inbox-wrapper">'; |
|
|
|
|
//LEFT COLUMN |
|
|
|
|
echo '<div id="inbox-menu">'; |
|
|
|
|
echo '<ul>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>'; |
|
|
|
|
echo '</ul>'; |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
echo '<div id="inbox">'; |
|
|
|
|
|
|
|
|
|
//MAIN CONTENT |
|
|
|
|
|
|
|
|
|
if (!isset($_POST['compose'])) { |
|
|
|
|
if(isset($_GET['re_id'])) { |
|
|
|
|
$message_id = $_GET['re_id']; |
|
|
|
|
$receiver_id = api_get_user_id(); |
|
|
|
|
@ -257,7 +288,7 @@ if (!isset($_POST['compose'])) { |
|
|
|
|
} else { |
|
|
|
|
show_compose_to_any($_user['user_id']); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
$restrict = false; |
|
|
|
|
if (isset($_POST['id_text_name'])) { |
|
|
|
|
@ -285,13 +316,16 @@ if (!isset($_POST['compose'])) { |
|
|
|
|
Display::display_error_message(api_xml_http_response_encode(get_lang('ErrorSendingMessage'))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
============================================================================== |
|
|
|
|
FOOTER |
|
|
|
|
============================================================================== |
|
|
|
|
*/ |
|
|
|
|
if ($request===false) { |
|
|
|
|
Display::display_footer(); |
|
|
|
|
} |
|
|
|
|
Display::display_footer(); |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
|