@ -231,47 +231,47 @@ if ('add' != $action) {
}
// ACTIONS
if ('received' == $view || !$showSentReceivedTabs) {
if ('received' === $view || !$showSentReceivedTabs) {
// This is for the categories
if (isset($viewReceivedCategory) & & '' != $viewReceivedCategory) {
$view_dropbox_category_received = $viewReceivedCategory;
} else {
$view_dropbox_category_received = 0;
}
/* Menu Received */
/* Menu Received */
$actions = '';
if (0 == api_get_session_id()) {
echo '< div class = "actions" > ';
if (0 != $view_dropbox_category_received & & api_is_allowed_to_session_edit(false, true)) {
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'" > '.
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'" > '.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
"< / a > ";
echo get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'< / strong > ';
$actions .= get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'< / strong > ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'" > '.
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'" > '.
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM).'< / a > ';
}
echo '< / div > ' ;
echo Display::toolbarAction('dropbox', [$actions]) ;
} else {
if (api_is_allowed_to_session_edit(false, true)) {
echo '< div class = "actions" > ';
if (0 != $view_dropbox_category_received & & api_is_allowed_to_session_edit(false, true)) {
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'" > '.
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'" > '.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM)."< / a > ";
echo get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'< / strong > ';
$actions .= get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'< / strong > ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'" > '.
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'" > '.
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM).
'< / a > ';
}
echo '< / div > ' ;
echo Display::toolbarAction('dropbox', [$actions]) ;
}
}
}
if (!$view || 'sent' == $view || !$showSentReceivedTabs) {
$actions = '';
if (!$view || 'sent' === $view || !$showSentReceivedTabs) {
// This is for the categories
if (isset($viewSentCategory) & & '' != $viewSentCategory) {
$view_dropbox_category_sent = $viewSentCategory;
@ -281,40 +281,38 @@ if ('add' != $action) {
/* Menu Sent */
if (0 == api_get_session_id()) {
echo '< div class = "actions" > ';
if (empty($viewSentCategory)) {
echo "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\" > ".
$actions .= "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\" > ".
Display::return_icon('upload_file.png', get_lang('Share a new file'), '', ICON_SIZE_MEDIUM).
"< / a > ";
}
if (0 != $view_dropbox_category_sent) {
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'" > '.
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'" > '.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
"< / a > ";
echo get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'< / strong > ';
$actions .= get_lang('Category').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'< / strong > ';
} else {
echo "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\" > ".
$actions .= "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\" > ".
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM)."< / a > \n";
}
echo '< / div > ' ;
echo Display::toolbarAction('dropbox', [$actions]) ;
} else {
if (api_is_allowed_to_session_edit(false, true)) {
echo '< div class = "actions" > ';
if (empty($viewSentCategory)) {
echo "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\" > ".
$actions .= "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\" > ".
Display::return_icon('upload_file.png', get_lang('Share a new file'), '', ICON_SIZE_MEDIUM).
"< / a > ";
}
if (0 != $view_dropbox_category_sent) {
echo get_lang('You are in folder').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'< / strong > ';
echo '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'" > '.
$actions .= get_lang('You are in folder').': < strong > '.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'< / strong > ';
$actions .= '< a href = "'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'" > '.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
"< / a > ";
} else {
echo "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\" > ".
$actions .= "< a href = \"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\" > ".
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM)."< / a > \n";
}
echo '< / div > ' ;
echo Display::toolbarAction('dropbox', [$actions]) ;
}
}
}
@ -339,7 +337,7 @@ if ('add' != $action) {
<?php
}
/* RECEIVED FILES */
if ('received' == $view || !$showSentReceivedTabs) {
if ('received' === $view || !$showSentReceivedTabs) {
// This is for the categories
if (isset($viewReceivedCategory) & & '' != $viewReceivedCategory) {
$view_dropbox_category_received = $viewReceivedCategory;