Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK ! ¥ìýlÆ Æ generator.rbnu „[µü¤ # frozen_string_literal: true
require_relative 'uploaded_file'
module Rack
module Multipart
class Generator
def initialize(params, first = true)
@params, @first = params, first
if @first && !@params.is_a?(Hash)
raise ArgumentError, "value must be a Hash"
end
end
def dump
return nil if @first && !multipart?
return flattened_params unless @first
flattened_params.map do |name, file|
if file.respond_to?(:original_filename)
if file.path
::File.open(file.path, 'rb') do |f|
f.set_encoding(Encoding::BINARY)
content_for_tempfile(f, file, name)
end
else
content_for_tempfile(file, file, name)
end
else
content_for_other(file, name)
end
end.join << "--#{MULTIPART_BOUNDARY}--\r"
end
private
def multipart?
query = lambda { |value|
case value
when Array
value.any?(&query)
when Hash
value.values.any?(&query)
when Rack::Multipart::UploadedFile
true
end
}
@params.values.any?(&query)
end
def flattened_params
@flattened_params ||= begin
h = Hash.new
@params.each do |key, value|
k = @first ? key.to_s : "[#{key}]"
case value
when Array
value.map { |v|
Multipart.build_multipart(v, false).each { |subkey, subvalue|
h["#{k}[]#{subkey}"] = subvalue
}
}
when Hash
Multipart.build_multipart(value, false).each { |subkey, subvalue|
h[k + subkey] = subvalue
}
else
h[k] = value
end
end
h
end
end
def content_for_tempfile(io, file, name)
length = ::File.stat(file.path).size if file.path
filename = "; filename=\"#{Utils.escape_path(file.original_filename)}\""
<<-EOF
--#{MULTIPART_BOUNDARY}\r
content-disposition: form-data; name="#{name}"#{filename}\r
content-type: #{file.content_type}\r
#{"content-length: #{length}\r\n" if length}\r
#{io.read}\r
EOF
end
def content_for_other(file, name)
<<-EOF
--#{MULTIPART_BOUNDARY}\r
content-disposition: form-data; name="#{name}"\r
\r
#{file}\r
EOF
end
end
end
end
PK ! ÜNû$ $ uploaded_file.rbnu „[µü¤ # frozen_string_literal: true
require 'tempfile'
require 'fileutils'
module Rack
module Multipart
class UploadedFile
# The filename, *not* including the path, of the "uploaded" file
attr_reader :original_filename
# The content type of the "uploaded" file
attr_accessor :content_type
def initialize(filepath = nil, ct = "text/plain", bin = false,
path: filepath, content_type: ct, binary: bin, filename: nil, io: nil)
if io
@tempfile = io
@original_filename = filename
else
raise "#{path} file does not exist" unless ::File.exist?(path)
@original_filename = filename || ::File.basename(path)
@tempfile = Tempfile.new([@original_filename, ::File.extname(path)], encoding: Encoding::BINARY)
@tempfile.binmode if binary
FileUtils.copy_file(path, @tempfile.path)
end
@content_type = content_type
end
def path
@tempfile.path if @tempfile.respond_to?(:path)
end
alias_method :local_path, :path
def respond_to?(*args)
super or @tempfile.respond_to?(*args)
end
def method_missing(method_name, *args, &block) #:nodoc:
@tempfile.__send__(method_name, *args, &block)
end
end
end
end
PK ! Üë&É4