コード例 #1
0
ファイル: index.php プロジェクト: ilosada/chamilo-lms-icpna
        }
        display_addcategory_form('', $_GET['id'], 'editcategory');
    }
}
// Storing a new or edited category
if (isset($_POST['StoreCategory'])) {
    if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
        api_not_allowed();
    }
    $return_information = store_addcategory();
    if ($return_information['type'] == 'confirmation') {
        Display::display_confirmation_message($return_information['message']);
    }
    if ($return_information['type'] == 'error') {
        Display::display_error_message(get_lang('FormHasErrorsPleaseComplete') . '<br />' . $return_information['message']);
        display_addcategory_form($_POST['category_name'], $_POST['edit_id'], $postAction);
    }
}
// Move a File
if (($action == 'movesent' or $action == 'movereceived') and isset($_GET['move_id'])) {
    if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
        api_not_allowed();
    }
    display_move_form(str_replace('move', '', $action), $_GET['move_id'], get_dropbox_categories(str_replace('move', '', $action)), $sort_params, $viewReceivedCategory, $viewSentCategory, $view);
}
if (isset($_POST['do_move'])) {
    Display::display_confirmation_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']));
}
// Delete a file
if (($action == 'deletereceivedfile' or $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)) {
コード例 #2
0
ファイル: index.php プロジェクト: jloguercio/chamilo-lms
        }
        display_addcategory_form('', $_GET['id'], 'editcategory');
    }
}
// Storing a new or edited category
if (isset($_POST['StoreCategory'])) {
    if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
        api_not_allowed();
    }
    $return_information = store_addcategory();
    if ($return_information['type'] == 'confirmation') {
        Display::display_confirmation_message($return_information['message']);
    }
    if ($return_information['type'] == 'error') {
        Display::display_error_message(get_lang('FormHasErrorsPleaseComplete') . '<br />' . $return_information['message']);
        display_addcategory_form($categoryName, $editId, $postAction);
    }
}
// Move a File
if ($action == 'movesent' || $action == 'movereceived' and isset($_GET['move_id'])) {
    if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
        api_not_allowed();
    }
    display_move_form(str_replace('move', '', $action), $_GET['move_id'], get_dropbox_categories(str_replace('move', '', $action)), $sort_params, $viewReceivedCategory, $viewSentCategory, $view);
}
if (isset($_POST['do_move'])) {
    Display::display_confirmation_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']));
}
// Delete a file
if ($action == 'deletereceivedfile' || $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)) {