Example #1
0
                $editfile = $wpdb->query("UPDATE {$wpdb->downloads} SET {$file_sql} file_name = '{$file_name}', file_des = '{$file_des}', file_hash = '{$file_hash}', {$file_size_sql} file_permission = {$file_permission}, file_updated_date = '{$file_updated_date}' {$timestamp_sql} {$hits_sql} WHERE file_id = {$file_id};");
                if (!$editfile) {
                    hacklogdm_admin::add_error(sprintf(__('Error In Editing File \'%s (%s)\'', hacklogdm::textdomain), $file_name, $file));
                } else {
                    hacklogdm_admin::add_message(sprintf(__('File \'%s (%s)\' Edited Successfully', hacklogdm::textdomain), $file_name, $file));
                }
            }
            break;
            /*************************************************************************************************
             * action delete
             **************************************************************************************************/
        /*************************************************************************************************
         * action delete
         **************************************************************************************************/
        case __('Delete File', hacklogdm::textdomain):
            hacklogdm_admin::delete_file();
            break;
    }
}
// Determines Which Mode It Is
switch ($mode) {
    /*************************************************************************************************
     * Edit A File
     **************************************************************************************************/
    case 'edit':
        // check the  file_id to see if the file exists.
        if (!hacklogdm_admin::id_exists($file_id)) {
            hacklogdm_admin::add_error(__('Error file_id!File id does not exists.', hacklogdm::textdomain));
            hacklogdm_admin::add_block_error('<p><a href="' . $_SERVER['HTTP_REFERER'] . '" >' . __('Return', hacklogdm::textdomain) . '</a></p>');
            hacklogdm_admin::show_message_or_error();
            exit;