Adding left column to message tool

skala
Julio Montoya 16 years ago
parent 4f08a1d15e
commit ae371c1bb4
  1. 52
      main/messages/inbox.php
  2. 56
      main/messages/new_message.php
  3. 54
      main/messages/outbox.php

@ -135,17 +135,54 @@ if ($_GET['f']=='social') {
echo '</div>';
} else {
//comes from normal profile
/*
echo '<div class=actions>';
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>';
echo '</div>'; */
if (api_get_setting('extended_profile') == 'true') {
echo '<div class="actions">';
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')).'&nbsp;'.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']) ? '&amp;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')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
//echo '</span>';
echo '</div>';
}
}
if (!isset($_GET['del_msg'])) {
echo '<div id="inbox-wrapper">';
//LEFT CONTENT
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($_GET['del_msg'])) {
inbox_display();
} else {
} else {
$num_msg = intval($_POST['total']);
for ($i=0;$i<$num_msg;$i++) {
if($_POST[$i]) {
@ -154,14 +191,17 @@ if (!isset($_GET['del_msg'])) {
}
}
inbox_display();
}
}
echo '</div>';
echo '</div>';
/*
==============================================================================
FOOTER
==============================================================================
*/
if ($request===false) {
Display::display_footer();
}
Display::display_footer();
?>

@ -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')).'&nbsp;'.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']) ? '&amp;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')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.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();
?>

@ -69,11 +69,30 @@ if ($_GET['f']=='social') {
Display::display_header('');
echo '<div class=actions>';
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') {
echo '<div class="actions">';
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')).'&nbsp;'.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']) ? '&amp;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')).'&nbsp;'.get_lang('EditNormalProfile').'</a>';
} else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif', get_lang('EditExtendProfile')).'&nbsp;'.get_lang('EditExtendProfile').'</a>';
}
//echo '</span>';
echo '</div>';
}
/**************************************************************/
$info_delete_outbox=array();
@ -96,7 +115,20 @@ if( trim($info_delete_outbox[0])=='delete' ) {
$table_message = Database::get_main_table(TABLE_MESSAGE);
$user_sender_id=api_get_user_id();
if ($_REQUEST['action']=='delete') {
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 ($_REQUEST['action']=='delete') {
$delete_list_id=array();
if (isset($_POST['out'])) {
$delete_list_id=$_POST['out'];
@ -109,15 +141,21 @@ if ($_REQUEST['action']=='delete') {
}
$delete_list_id=array();
outbox_display();
} elseif ($_REQUEST['action']=='deleteone') {
} elseif ($_REQUEST['action']=='deleteone') {
$delete_list_id=array();
$id=Security::remove_XSS($_GET['id']);
MessageManager::delete_message_by_user_sender(api_get_user_id(),$id);
$delete_list_id=array();
outbox_display();
}else {
}else {
outbox_display();
}
}
echo '</div>';
echo '</div>';
/*
==============================================================================
FOOTER

Loading…
Cancel
Save