@ -1,7 +1,7 @@
<?php //$id: $
<?php //$id: $
/* For licensing terms, see /dokeos_license.txt */
/* For licensing terms, see /license.txt */
/**
/**
==============================================================================
* @desc The dropbox is a personal (peer to peer) file exchange module that allows
* @desc The dropbox is a personal (peer to peer) file exchange module that allows
* you to send documents to a certain (group of) users.
* you to send documents to a certain (group of) users.
*
*
@ -20,13 +20,10 @@
* then for every individual document the feedback is retrieved
* then for every individual document the feedback is retrieved
* @todo the implementation of the dropbox categories could (on the database level) have been done more elegantly by storing the category
* @todo the implementation of the dropbox categories could (on the database level) have been done more elegantly by storing the category
* in the dropbox_person table because this table stores the relationship between the files (sent OR received) and the users
* in the dropbox_person table because this table stores the relationship between the files (sent OR received) and the users
==============================================================================
*/
*/
/**
/**
==============================================================================
HISTORY
HISTORY
==============================================================================
Version 1.1
Version 1.1
------------
------------
- dropbox_init1.inc.php: changed include statements to require statements. This way if a file is not found, it stops the execution of a script instead of continuing with warnings.
- dropbox_init1.inc.php: changed include statements to require statements. This way if a file is not found, it stops the execution of a script instead of continuing with warnings.
@ -90,16 +87,15 @@ Version 1.3 (Patrick Cool)
Version 1.4 (Yannick Warnier)
Version 1.4 (Yannick Warnier)
-----------------------------
-----------------------------
- removed all self-built database tables names
- removed all self-built database tables names
==============================================================================
*/
*/
/*
/*
==============================================================================
INIT SECTION
INIT SECTION
==============================================================================
*/
*/
// the file that contains all the initialisation stuff (and includes all the configuration stuff)
// the file that contains all the initialisation stuff (and includes all the configuration stuff)
require_once( "dropbox_init.inc.php");
require_once 'dropbox_init.inc.php';
// get the last time the user accessed the tool
// get the last time the user accessed the tool
if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') {
if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') {
$last_access = get_last_tool_access(TOOL_DROPBOX, $_course['code'], $_user['user_id']);
$last_access = get_last_tool_access(TOOL_DROPBOX, $_course['code'], $_user['user_id']);
@ -115,23 +111,19 @@ event_access_tool(TOOL_DROPBOX);
$dropbox_unid = md5(uniqid(rand(), true));
$dropbox_unid = md5(uniqid(rand(), true));
/*
/*
==============================================================================
DISPLAY SECTION
DISPLAY SECTION
==============================================================================
*/
*/
// Tool introduction
// Tool introduction
Display::display_introduction_section(TOOL_DROPBOX);
Display::display_introduction_section(TOOL_DROPBOX);
/*
/*
-----------------------------------------------------------
ACTIONS: add a dropbox file, add a dropbox category.
ACTIONS: add a dropbox file, add a dropbox category.
-----------------------------------------------------------
*/
*/
// *** display the form for adding a new dropbox item. ***
// *** display the form for adding a new dropbox item. ***
if ($_GET['action']=="add" ) {
if ($_GET['action'] == 'add' ) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
display_add_form();
display_add_form();
@ -146,48 +138,46 @@ if (isset($_POST['submitWork'])) {
}
}
// *** display the form for adding a category ***
// display the form for adding a category
if ($_GET['action']=="addreceivedcategory" or $_GET['action']=="addsentcategory" ) {
if ($_GET['action'] == 'addreceivedcategory' or $_GET['action'] == 'addsentcategory' ) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
display_addcategory_form($_POST['category_name'],'',$_GET['action']);
display_addcategory_form($_POST['category_name'],'',$_GET['action']);
}
}
// *** editing a category: displaying the form ***
// editing a category: displaying the form
if ($_GET['action'] == 'editcategory' and isset($_GET['id'])) {
if ($_GET['action'] == 'editcategory' and isset($_GET['id'])) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
if (!$_POST) {
if (!$_POST) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
display_addcategory_form('', $_GET['id'], 'editcategory');
display_addcategory_form('', $_GET['id'], 'editcategory');
}
}
}
}
// *** storing a new or edited category ***
// storing a new or edited category
if (isset($_POST['StoreCategory'])) {
if (isset($_POST['StoreCategory'])) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
$return_information = store_addcategory();
$return_information = store_addcategory();
if( $return_information['type'] == 'confirmation')
if ($return_information['type'] == 'confirmation') {
{
Display :: display_confirmation_message($return_information['message']);
Display :: display_confirmation_message($return_information['message']);
}
}
if( $return_information['type'] == 'error')
if ($return_information['type'] == 'error') {
{
Display :: display_error_message(get_lang('FormHasErrorsPleaseComplete').'< br / > '.$return_information['message']);
Display :: display_error_message(get_lang('FormHasErrorsPleaseComplete').'< br / > '.$return_information['message']);
display_addcategory_form($_POST['category_name'], $_POST['edit_id'], $_POST['action']);
display_addcategory_form($_POST['category_name'], $_POST['edit_id'], $_POST['action']);
}
}
}
}
// *** Move a File ***
// Move a File
if (($_GET['action'] == 'movesent' OR $_GET['action'] == 'movereceived') AND isset($_GET['move_id'])) {
if (($_GET['action'] == 'movesent' OR $_GET['action'] == 'movereceived') AND isset($_GET['move_id'])) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
display_move_form(str_replace('move', '', $_GET['action']), $_GET['move_id'], get_dropbox_categories(str_replace('move', '', $_GET['action'])));
display_move_form(str_replace('move', '', $_GET['action']), $_GET['move_id'], get_dropbox_categories(str_replace('move', '', $_GET['action'])));
@ -196,9 +186,9 @@ if ($_POST['do_move']) {
Display :: display_confirmation_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']));
Display :: display_confirmation_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']));
}
}
// *** Delete a file ***
// Delete a file
if (($_GET['action'] == 'deletereceivedfile' OR $_GET['action'] == 'deletesentfile') AND isset($_GET['id']) AND is_numeric($_GET['id'])) {
if (($_GET['action'] == 'deletereceivedfile' OR $_GET['action'] == 'deletesentfile') AND isset($_GET['id']) AND is_numeric($_GET['id'])) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
$dropboxfile = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor);
$dropboxfile = new Dropbox_Person($_user['user_id'], $is_courseAdmin, $is_courseTutor);
@ -213,31 +203,31 @@ if (($_GET['action']=='deletereceivedfile' OR $_GET['action']=='deletesentfile')
Display :: display_confirmation_message($message);
Display :: display_confirmation_message($message);
}
}
// *** Delete a category ***
// Delete a category
if (($_GET['action'] == 'deletereceivedcategory' OR $_GET['action'] == 'deletesentcategory') AND isset($_GET['id']) AND is_numeric($_GET['id'])) {
if (($_GET['action'] == 'deletereceivedcategory' OR $_GET['action'] == 'deletesentcategory') AND isset($_GET['id']) AND is_numeric($_GET['id'])) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
api_not_allowed();
}
}
$message = delete_category($_GET['action'], $_GET['id']);
$message = delete_category($_GET['action'], $_GET['id']);
Display :: display_confirmation_message($message);
Display :: display_confirmation_message($message);
}
}
// *** Do an action on multiple files ***
// Do an action on multiple files
// only the download has is handled separately in dropbox_init_inc.php because this has to be done before the headers are sent
// only the download has is handled separately in dropbox_init_inc.php because this has to be done before the headers are sent
// (which also happens in dropbox_init.inc.php
// (which also happens in dropbox_init.inc.php
if (!isset($_POST['feedback']) & & (strstr($_POST['action'], 'move_received') OR
if (!isset($_POST['feedback']) & & (strstr($_POST['action'], 'move_received') OR
$_POST['action'] == 'delete_received' OR $_POST['action'] == 'download_received' OR
$_POST['action'] == 'delete_received' OR $_POST['action'] == 'download_received' OR
$_POST['action'] == 'delete_sent' OR $_POST['action'] == 'download_sent'))
$_POST['action'] == 'delete_sent' OR $_POST['action'] == 'download_sent')) {
{
$display_message = handle_multiple_actions();
$display_message = handle_multiple_actions();
Display :: display_normal_message($display_message);
Display :: display_normal_message($display_message);
}
}
// *** Store Feedback ***
// Store Feedback
if ($_POST['feedback']) {
if ($_POST['feedback']) {
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false,true)) {
api_not_allowed();
api_not_allowed();
}
}
$check = Security::check_token();
$check = Security::check_token();
@ -248,14 +238,14 @@ if ($_POST['feedback']) {
}
}
}
}
// *** Error Message ***
// Error Message
if (isset($_GET['error']) AND !empty($_GET['error'])) {
if (isset($_GET['error']) AND !empty($_GET['error'])) {
Display :: display_normal_message(get_lang($_GET['error']));
Display :: display_normal_message(get_lang($_GET['error']));
}
}
if ($_GET['action'] != 'add') {
if ($_GET['action']!="add") {
// getting all the categories in the dropbox for the given user
// getting all the categories in the dropbox for the given user
$dropbox_categories = get_dropbox_categories();
$dropbox_categories = get_dropbox_categories();
// creating the arrays with the categories for the received files and for the sent files
// creating the arrays with the categories for the received files and for the sent files
@ -270,7 +260,7 @@ foreach ($dropbox_categories as $category) {
// ACTIONS
// ACTIONS
if ( $_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false ) {
if ($_GET['view'] == 'received' OR ! $dropbox_cnf['sent_received_tabs']) {
//echo '< h3 > '.get_lang('ReceivedFiles').'< / h3 > ';
//echo '< h3 > '.get_lang('ReceivedFiles').'< / h3 > ';
// This is for the categories
// This is for the categories
@ -280,12 +270,11 @@ if ( $_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
$view_dropbox_category_received = 0;
$view_dropbox_category_received = 0;
}
}
/* Menu Received */
/* *** Menu Received *** */
if (api_get_session_id() == 0) {
if (api_get_session_id() == 0) {
echo '< div class = "actions" > ';
echo '< div class = "actions" > ';
if ($view_dropbox_category_received< > 0 & & api_is_allowed_to_session_edit(false,true)) {
if ($view_dropbox_category_received != 0 & & api_is_allowed_to_session_edit(false, true)) {
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_received]['cat_name'].'< / strong > ';
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_received]['cat_name'].'< / strong > ';
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
$movelist[0] = 'Root'; // move_received selectbox content
$movelist[0] = 'Root'; // move_received selectbox content
@ -296,7 +285,7 @@ if ( $_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
} else {
} else {
if (api_is_allowed_to_session_edit(false, true)) {
if (api_is_allowed_to_session_edit(false, true)) {
echo '< div class = "actions" > ';
echo '< div class = "actions" > ';
if ($view_dropbox_category_received< >0 & & api_is_allowed_to_session_edit(false,true)) {
if ($view_dropbox_category_received != 0 & & api_is_allowed_to_session_edit(false, true)) {
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_received]['cat_name'].'< / strong > ';
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_received]['cat_name'].'< / strong > ';
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
$movelist[0] = 'Root'; // move_received selectbox content
$movelist[0] = 'Root'; // move_received selectbox content
@ -307,21 +296,22 @@ if ( $_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
}
}
}
}
}
}
if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
if (!$_GET['view'] OR $_GET['view'] == 'sent' OR !$dropbox_cnf['sent_received_tabs']) {
//echo '< h3 > '.get_lang('SentFiles').'< / h3 > ';
//echo '< h3 > '.get_lang('SentFiles').'< / h3 > ';
// This is for the categories
// This is for the categories
if (isset($_GET['view_sent_category']) AND $_GET['view_sent_category']< > '') {
if (isset($_GET['view_sent_category']) AND $_GET['view_sent_category'] != '') {
$view_dropbox_category_sent = $_GET['view_sent_category'];
$view_dropbox_category_sent = $_GET['view_sent_category'];
} else {
} else {
$view_dropbox_category_sent = 0;
$view_dropbox_category_sent = 0;
}
}
/* ** * Menu Sent *** */
/* Menu Sent */
if (api_get_session_id() == 0) {
if (api_get_session_id() == 0) {
echo '< div class = "actions" > ';
echo '< div class = "actions" > ';
if ($view_dropbox_category_sent< > 0) {
if ($view_dropbox_category_sent != 0) {
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_sent]['cat_name'].'< / strong > ';
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_sent]['cat_name'].'< / strong > ';
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category=0&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category=0&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
} else {
} else {
@ -334,7 +324,7 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
} else {
} else {
if (api_is_allowed_to_session_edit(false, true)) {
if (api_is_allowed_to_session_edit(false, true)) {
echo '< div class = "actions" > ';
echo '< div class = "actions" > ';
if ($view_dropbox_category_sent< > 0) {
if ($view_dropbox_category_sent != 0) {
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_sent]['cat_name'].'< / strong > ';
echo get_lang('CurrentlySeeing').': < strong > '.$dropbox_categories[$view_dropbox_category_sent]['cat_name'].'< / strong > ';
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category=0&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category=0&view='.Security::remove_XSS($_GET['view']).'" > '.Display::return_icon('folder_up.gif', get_lang('Up')).' '.get_lang('Root')."< / a > \n";
} else {
} else {
@ -346,14 +336,11 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
echo '< / div > ';
echo '< / div > ';
}
}
}
}
}
}
/*
/*
-----------------------------------------------------------
THE MENU TABS
THE MENU TABS
-----------------------------------------------------------
*/
*/
if ($dropbox_cnf['sent_received_tabs']) {
if ($dropbox_cnf['sent_received_tabs']) {
?>
?>
@ -367,15 +354,13 @@ if ($dropbox_cnf['sent_received_tabs']) {
}
}
/*
/*
-----------------------------------------------------------
RECEIVED FILES
RECEIVED FILES
-----------------------------------------------------------
*/
*/
if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false ) {
if ($_GET['view'] == 'received' OR ! $dropbox_cnf['sent_received_tabs']) {
//echo '< h3 > '.get_lang('ReceivedFiles').'< / h3 > ';
//echo '< h3 > '.get_lang('ReceivedFiles').'< / h3 > ';
// This is for the categories
// This is for the categories
if (isset($_GET['view_received_category']) AND $_GET['view_received_category']< > '') {
if (isset($_GET['view_received_category']) AND $_GET['view_received_category'] != '') {
$view_dropbox_category_received = $_GET['view_received_category'];
$view_dropbox_category_received = $_GET['view_received_category'];
} else {
} else {
$view_dropbox_category_received = 0;
$view_dropbox_category_received = 0;
@ -394,21 +379,20 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
// the headers of the sortable tables
// the headers of the sortable tables
$column_header = array();
$column_header = array();
$column_header[] = array('', false, '');
$column_header[] = array('', false, '');
$column_header[] = array(get_lang('Type'),true,'style="width:40px"');
$column_header[] = array(get_lang('Type'), true, '', 'style="width:40px; text-align:center "');
$column_header[] = array(get_lang('ReceivedTitle'), TRUE , '');
$column_header[] = array(get_lang('ReceivedTitle'), true , '');
$column_header[] = array(get_lang('Size'), TRUE , '');
$column_header[] = array(get_lang('Size'), true , '');
$column_header[] = array(get_lang('Authors'), TRUE , '');
$column_header[] = array(get_lang('Authors'), true , '');
$column_header[] = array(get_lang('LastResent'), true);
$column_header[] = array(get_lang('LastResent'), true);
if (api_get_session_id()==0)
if (api_get_session_id() == 0) {
$column_header[] = array(get_lang('Modify'), FALSE , '', 'nowrap style="text-align: right"');
$column_header[] = array(get_lang('Modify'), false , '', 'nowrap style="text-align: right"');
elseif (api_is_allowed_to_session_edit(false,true)){
} elseif (api_is_allowed_to_session_edit(false,true)) {
$column_header[] = array(get_lang('Modify'), FALSE , '', 'nowrap style="text-align: right"');
$column_header[] = array(get_lang('Modify'), false , '', 'nowrap style="text-align: right"');
}
}
$column_header[] = array('RealDate', true);
$column_header[] = array('RealDate', true);
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
// An array with the setting of the columns -> 1: columns that we will show, 0:columns that will be hide
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
@ -417,9 +401,9 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
if (api_get_session_id()==0)
if (api_get_session_id() == 0) {
$column_show[] = 1;
$column_show[] = 1;
elseif (api_is_allowed_to_session_edit(false,true)){
} elseif (api_is_allowed_to_session_edit(false, true)) {
$column_show[] = 1;
$column_show[] = 1;
}
}
$column_show[] = 0;
$column_show[] = 0;
@ -437,8 +421,6 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
$column_order[] = 7;
$column_order[] = 7;
$column_order[] = 8;
$column_order[] = 8;
// the content of the sortable table = the received files
// the content of the sortable table = the received files
foreach ($dropbox_person -> receivedWork as $dropbox_file) {
foreach ($dropbox_person -> receivedWork as $dropbox_file) {
$dropbox_file_data = array();
$dropbox_file_data = array();
@ -455,30 +437,29 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
$new_icon = ' '.Display::return_icon('new.gif', get_lang('New'));
$new_icon = ' '.Display::return_icon('new.gif', get_lang('New'));
}
}
$dropbox_file_data[] = build_document_icon_tag('file', $dropbox_file->title);
$dropbox_file_data[] = build_document_icon_tag('file', $dropbox_file->title);
$dropbox_file_data[]='< a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download" > '.Display::return_icon('filesave.gif', get_lang('Download'), array('style'=>'float:right;')).'< / a > < a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'" > '.$dropbox_file->title.'< / a > '.$new_icon.'< br > '.$dropbox_file->description;
$dropbox_file_data[] = '< a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download" > '.Display::return_icon('filesave.gif', get_lang('Download'), array('style' => 'float:right;')).'< / a > < a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'" > '.$dropbox_file->title.'< / a > '.$new_icon.'< br / > '.$dropbox_file->description;
$dropbox_file_data[] = ceil(($dropbox_file->filesize) / 1024).' '.get_lang('kB');
$dropbox_file_data[] = ceil(($dropbox_file->filesize) / 1024).' '.get_lang('kB');
$dropbox_file_data[] = $dropbox_file->author;
$dropbox_file_data[] = $dropbox_file->author;
//$dropbox_file_data[] = $dropbox_file->description;
//$dropbox_file_data[] = $dropbox_file->description;
$dropbox_file_data[]=date_to_str_ago(api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get())).'< br > < span class = "dropbox_date" > '.api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get()).'< / span > ';
$dropbox_file_data[] = date_to_str_ago(api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get())).'< br / > < span class = "dropbox_date" > '.api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get()).'< / span > ';
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=viewfeedback&id='.$dropbox_file->id.'" > '.Display::return_icon('comment_bubble.gif', get_lang('Comment')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=viewfeedback&id='.$dropbox_file->id.'" > '.Display::return_icon('comment_bubble.gif', get_lang('Comment')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=movereceived&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer_fichier.gif', get_lang('Move')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=movereceived&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer_fichier.gif', get_lang('Move')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletereceivedfile&id='.$dropbox_file->id.'" onclick = "return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif',get_lang('Delete')).'< / a > ';
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletereceivedfile&id='.$dropbox_file->id.'" onclick = "javascript: return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif', get_lang('Delete')).'< / a > ';
//$action_icons=' < a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&view_sent_category='.$_GET['view_sent_category'].'&action=movereceived&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer.gif',get_lang('Move')).'< / a >
//$action_icons=' < a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&view_sent_category='.$_GET['view_sent_category'].'&action=movereceived&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer.gif',get_lang('Move')).'< / a >
// < a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&view_sent_category='.$_GET['view_sent_category'].'&action=deletereceivedfile&id='.$dropbox_file->id.'" onclick = "return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif',get_lang('Delete')).'< / a > ';
// < a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$_GET['view_received_category'].'&view_sent_category='.$_GET['view_sent_category'].'&action=deletereceivedfile&id='.$dropbox_file->id.'" onclick = "javascript: return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif', get_lang('Delete')).'< / a > ';
// this is a hack to have an additional row in a sortable table
// this is a hack to have an additional row in a sortable table
if ($_GET['action'] == 'viewfeedback' AND isset($_GET['id']) and is_numeric($_GET['id']) AND $dropbox_file->id == $_GET['id']) {
if ($_GET['action'] == 'viewfeedback' AND isset($_GET['id']) and is_numeric($_GET['id']) AND $dropbox_file->id == $_GET['id']) {
$action_icons .= "< / td > < / tr > \n"; // ending the normal row of the sortable table
$action_icons .= "< / td > < / tr > \n"; // ending the normal row of the sortable table
$action_icons .= '< tr > < td colspan = "2" > < a href = "index.php?" ' . api_get_cidreq ( ) . ' & view_received_category = '.Security::remove_XSS($_GET[' view_received_category ' ] ) . " & amp ; view_sent_category = ".Security::remove_XSS($_GET['view_sent_category'])." & amp ; view = ".Security::remove_XSS($_GET['view'])." \ " > ".get_lang('CloseFeedback')."< / a > < / td > < td colspan = \"7\" > ".feedback($dropbox_file->feedback2)."< / td > \n< / tr > \n";
$action_icons .= '< tr > < td colspan = "2" > < a href = "index.php?" ' . api_get_cidreq ( ) . ' & view_received_category = '.Security::remove_XSS($_GET[' view_received_category ' ] ) . " & amp ; view_sent_category = ".Security::remove_XSS($_GET['view_sent_category'])." & amp ; view = ".Security::remove_XSS($_GET['view'])." \ " > ".get_lang('CloseFeedback')."< / a > < / td > < td colspan = \"7\" > ".feedback($dropbox_file->feedback2)."< / td > \n< / tr > \n";
}
}
if (api_get_session_id()==0)
if (api_get_session_id() == 0) {
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $action_icons;
elseif (api_is_allowed_to_session_edit(false,true)){
} elseif (api_is_allowed_to_session_edit(false, true)) {
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $action_icons;
}
}
$action_icons = '';
$action_icons = '';
@ -489,8 +470,6 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
}
}
}
}
// the content of the sortable table = the categories (if we are not in the root)
// the content of the sortable table = the categories (if we are not in the root)
if ($view_dropbox_category_received == 0) {
if ($view_dropbox_category_received == 0) {
foreach ($dropbox_categories as $category) { // note: this can probably be shortened since the categories for the received files are already in the $dropbox_received_category array;
foreach ($dropbox_categories as $category) { // note: this can probably be shortened since the categories for the received files are already in the $dropbox_received_category array;
@ -505,7 +484,7 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=editcategory&id='.$category['cat_id'].'" > '.Display::return_icon('edit.gif',get_lang('Edit')).'< / a >
$dropbox_category_data[] = '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=editcategory&id='.$category['cat_id'].'" > '.Display::return_icon('edit.gif',get_lang('Edit')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick = "return confirmation(\''.$category['cat_name'].'\');" > '.Display::return_icon('delete.gif',get_lang('Delete')).'< / a > ';
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick = "javascript: return confirmation(\''.$category['cat_name'].'\');" > '.Display::return_icon('delete.gif', get_lang('Delete')).'< / a > ';
}
}
if (is_array($dropbox_category_data) & & count($dropbox_category_data) > 0) {
if (is_array($dropbox_category_data) & & count($dropbox_category_data) > 0) {
$dropbox_data_recieved[] = $dropbox_category_data;
$dropbox_data_recieved[] = $dropbox_category_data;
@ -521,24 +500,22 @@ if ($_GET['view']=='received' OR $dropbox_cnf['sent_received_tabs']==false) {
}
}
}
}
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
$selectlist = array();
$selectlist = array();
}
}
Display::display_sortable_config_table($column_header, $dropbox_data_recieved, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
Display::display_sortable_config_table($column_header, $dropbox_data_recieved, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
}
}
/*
/*
-----------------------------------------------------------
SENT FILES
SENT FILES
-----------------------------------------------------------
*/
*/
if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs']==false) {
if (!$_GET['view'] OR $_GET['view'] == 'sent' OR !$dropbox_cnf['sent_received_tabs']) {
//echo '< h3 > '.get_lang('SentFiles').'< / h3 > ';
//echo '< h3 > '.get_lang('SentFiles').'< / h3 > ';
// This is for the categories
// This is for the categories
if (isset($_GET['view_sent_category']) AND $_GET['view_sent_category']< > '') {
if (isset($_GET['view_sent_category']) AND $_GET['view_sent_category'] != '') {
$view_dropbox_category_sent = $_GET['view_sent_category'];
$view_dropbox_category_sent = $_GET['view_sent_category'];
} else {
} else {
$view_dropbox_category_sent = 0;
$view_dropbox_category_sent = 0;
@ -558,20 +535,19 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
$column_header = array();
$column_header = array();
$column_header[] = array('', false, '');
$column_header[] = array('', false, '');
$column_header[] = array(get_lang('Type'),true,'style="width:40px" ','style="text-align:center"');
$column_header[] = array(get_lang('Type'), true, '', 'style="width:40px; text-align:center"');
$column_header[] = array(get_lang('SentTitle'), TRUE , '');
$column_header[] = array(get_lang('SentTitle'), true , '');
$column_header[] = array(get_lang('Size'), TRUE , '');
$column_header[] = array(get_lang('Size'), true , '');
$column_header[] = array(get_lang('SentTo'), TRUE , '');
$column_header[] = array(get_lang('SentTo'), true , '');
$column_header[] = array(get_lang('LastResent'), TRUE , '');
$column_header[] = array(get_lang('LastResent'), true , '');
if (api_get_session_id()==0)
if (api_get_session_id() == 0) {
$column_header[] = array(get_lang('Modify'), FALSE , '', 'nowrap style="text-align: right"');
$column_header[] = array(get_lang('Modify'), false , '', 'nowrap style="text-align: right"');
elseif (api_is_allowed_to_session_edit(false,true)){
} elseif (api_is_allowed_to_session_edit(false, true)) {
$column_header[] = array(get_lang('Modify'), FALSE , '', 'nowrap style="text-align: right"');
$column_header[] = array(get_lang('Modify'), false , '', 'nowrap style="text-align: right"');
}
}
$column_header[] = array('RealDate', false);
$column_header[] = array('RealDate', FALSE);
$column_show = array();
$column_show = array();
$column_order = array();
$column_order = array();
@ -583,9 +559,9 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
$column_show[] = 1;
if (api_get_session_id()==0)
if (api_get_session_id() == 0) {
$column_show[] = 1;
$column_show[] = 1;
elseif (api_is_allowed_to_session_edit(false,true)){
} elseif (api_is_allowed_to_session_edit(false, true)) {
$column_show[] = 1;
$column_show[] = 1;
}
}
$column_show[] = 0;
$column_show[] = 0;
@ -610,26 +586,25 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
if ($view_dropbox_category_sent == $dropbox_file->category) {
if ($view_dropbox_category_sent == $dropbox_file->category) {
$dropbox_file_data[] = $dropbox_file->id;
$dropbox_file_data[] = $dropbox_file->id;
$dropbox_file_data[] = build_document_icon_tag('file', $dropbox_file->title);
$dropbox_file_data[] = build_document_icon_tag('file', $dropbox_file->title);
$dropbox_file_data[]='< a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download" > '.Display::return_icon('filesave.gif',get_lang('Save'), array('style'=>'float:right;')).'< / a > < a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'" > '.$dropbox_file->title.'< / a > < br > '.$dropbox_file->description;
$dropbox_file_data[] = '< a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download" > '.Display::return_icon('filesave.gif', get_lang('Save'), array('style' => 'float:right;')).'< / a > < a href = "dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'" > '.$dropbox_file->title.'< / a > < br / > '.$dropbox_file->description;
$dropbox_file_data[] = ceil(($dropbox_file->filesize)/1024).' '.get_lang('kB');
$dropbox_file_data[] = ceil(($dropbox_file->filesize)/1024).' '.get_lang('kB');
foreach ($dropbox_file->recipients as $recipient) {
foreach ($dropbox_file->recipients as $recipient) {
$receivers_celldata = display_user_link_work($recipient['user_id'], $recipient['name']).', '.$receivers_celldata;
$receivers_celldata = display_user_link_work($recipient['user_id'], $recipient['name']).', '.$receivers_celldata;
}
}
$receivers_celldata = trim(trim($receivers_celldata), ','); // Removing the trailing comma.
$receivers_celldata = trim(trim($receivers_celldata), ','); // Removing the trailing comma.
$dropbox_file_data[] = $receivers_celldata;
$dropbox_file_data[] = $receivers_celldata;
$dropbox_file_data[]=date_to_str_ago(api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get())).'< br > < span class = "dropbox_date" > '.api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get()).'< / span > ';
$dropbox_file_data[] = date_to_str_ago(api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get())).'< br / > < span class = "dropbox_date" > '.api_get_local_time($dropbox_file->last_upload_date, null, null, date_default_timezone_get()).'< / span > ';
//$dropbox_file_data[] = $dropbox_file->author;
//$dropbox_file_data[] = $dropbox_file->author;
$receivers_celldata = '';
$receivers_celldata = '';
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=viewfeedback&id='.$dropbox_file->id.'" > '.Display::return_icon('comment_bubble.gif', get_lang('Comment')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=viewfeedback&id='.$dropbox_file->id.'" > '.Display::return_icon('comment_bubble.gif', get_lang('Comment')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=movesent&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer_fichier.gif', get_lang('Move')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=movesent&move_id='.$dropbox_file->id.'" > '.Display::return_icon('deplacer_fichier.gif', get_lang('Move')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletesentfile&id='.$dropbox_file->id.'" onclick = "return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif',get_lang('Delete')).'< / a > ';
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletesentfile&id='.$dropbox_file->id.'" onclick = "javascript: return confirmation(\''.$dropbox_file->title.'\');" > '.Display::return_icon('delete.gif', get_lang('Delete')).'< / a > ';
// this is a hack to have an additional row in a sortable table
// this is a hack to have an additional row in a sortable table
if ($_GET['action'] == 'viewfeedback' AND isset($_GET['id']) and is_numeric($_GET['id']) AND $dropbox_file->id==$_GET['id']) {
if ($_GET['action'] == 'viewfeedback' AND isset($_GET['id']) and is_numeric($_GET['id']) AND $dropbox_file->id==$_GET['id']) {
$action_icons .= "< / td > < / tr > \n"; // ending the normal row of the sortable table
$action_icons .= "< / td > < / tr > \n"; // ending the normal row of the sortable table
$action_icons .= "< tr > \n\t< td colspan = \"2\" > < a href = \"index.php?".api_get_cidreq()."&view_received_category=".Security::remove_XSS($_GET['view_received_category'])."&view_sent_category=".Security::remove_XSS($_GET['view_sent_category'])."&view=".Security::remove_XSS($_GET['view'])."\" > ".get_lang('CloseFeedback')."< / a > < / td > < td colspan = \"7\" > ".feedback($dropbox_file->feedback2)."< / td > \n< / tr > \n";
$action_icons .= "< tr > \n\t< td colspan = \"2\" > < a href = \"index.php?".api_get_cidreq()."&view_received_category=".Security::remove_XSS($_GET['view_received_category'])."&view_sent_category=".Security::remove_XSS($_GET['view_sent_category'])."&view=".Security::remove_XSS($_GET['view'])."\" > ".get_lang('CloseFeedback')."< / a > < / td > < td colspan = \"7\" > ".feedback($dropbox_file->feedback2)."< / td > \n< / tr > \n";
}
}
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $dropbox_file->last_upload_date;
$dropbox_file_data[] = $dropbox_file->last_upload_date;
@ -652,7 +627,7 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=editcategory&id='.$category['cat_id'].'" > '.Display::return_icon('edit.gif', get_lang('Edit')).'< / a >
$dropbox_category_data[] = '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=editcategory&id='.$category['cat_id'].'" > '.Display::return_icon('edit.gif', get_lang('Edit')).'< / a >
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletesentcategory&id='.$category['cat_id'].'" onclick = "return confirmation(\''.$category['cat_name'].'\');" > '.Display::return_icon('delete.gif',get_lang('Delete')).'< / a > ';
< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.Security::remove_XSS($_GET['view_received_category']).'&view_sent_category='.Security::remove_XSS($_GET['view_sent_category']).'&view='.Security::remove_XSS($_GET['view']).'&action=deletesentcategory&id='.$category['cat_id'].'" onclick = "javascript: return confirmation(\''.$category['cat_name'].'\');" > '.Display::return_icon('delete.gif', get_lang('Delete')).'< / a > ';
}
}
if (is_array($dropbox_category_data) & & count($dropbox_category_data) > 0) {
if (is_array($dropbox_category_data) & & count($dropbox_category_data) > 0) {
$dropbox_data_sent[] = $dropbox_category_data;
$dropbox_data_sent[] = $dropbox_category_data;
@ -662,10 +637,12 @@ if (!$_GET['view'] OR $_GET['view']=='sent' OR $dropbox_cnf['sent_received_tabs'
// Displaying the table
// Displaying the table
$additional_get_parameters = array('view' => Security::remove_XSS($_GET['view']), 'view_received_category' => Security::remove_XSS($_GET['view_received_category']), 'view_sent_category' => Security::remove_XSS($_GET['view_sent_category']));
$additional_get_parameters = array('view' => Security::remove_XSS($_GET['view']), 'view_received_category' => Security::remove_XSS($_GET['view_received_category']), 'view_sent_category' => Security::remove_XSS($_GET['view_sent_category']));
$selectlist = array('delete_received' => get_lang('Delete'), 'download_received' => get_lang('Download'));
$selectlist = array('delete_received' => get_lang('Delete'), 'download_received' => get_lang('Download'));
if (api_get_session_id()!=0 & & api_is_allowed_to_session_edit(false,true)==false ) {
if (api_get_session_id() != 0 & & ! api_is_allowed_to_session_edit(false, true)) {
$selectlist = array('download_received' => get_lang('Download'));
$selectlist = array('download_received' => get_lang('Download'));
}
}
Display::display_sortable_config_table($column_header, $dropbox_data_sent, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
Display::display_sortable_config_table($column_header, $dropbox_data_sent, $sorting_options, $paging_options, $additional_get_parameters, $column_show, $column_order, $selectlist);
}
}
}
}
Display::display_footer();
Display::display_footer();