?¡ëPNG  IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À? ¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
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/user1137782/www/china1.by/classwithtostring.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
#!/usr/bin/perl -w # vnstat.cgi -- example cgi for vnStat image output # copyright (c) 2008-2011 Teemu Toivola # # based on mailgraph.cgi # copyright (c) 2000-2007 ETH Zurich # copyright (c) 2000-2007 David Schweikert # released under the GNU General Public License my $host = 'Some Server'; my $scriptname = 'vnstat.cgi'; # temporary directory where to store the images my $tmp_dir = '/tmp/vnstatcgi'; # location of vnstati my $vnstati_cmd = '/usr/bin/vnstati'; # cache time in minutes, set 0 to disable my $cachetime = '15'; # shown interfaces, remove unnecessary lines my @graphs = ( { interface => 'eth0' }, { interface => 'eth1' }, ); ################ my $VERSION = "1.3"; sub graph($$$) { my ($interface, $file, $param) = @_; my $result = `"$vnstati_cmd" -i "$interface" -c $cachetime $param -o "$file"`; } sub print_html() { print "Content-Type: text/html\n\n"; print < Traffic Statistics for $host HEADER for my $n (0..$#graphs) { print "

\"$graphs[$n]{interface}

\n"; } print <Images generated using vnStat image output. FOOTER } sub print_fullhtml($) { my ($interface) = @_; print "Content-Type: text/html\n\n"; print < Traffic Statistics for $host HEADER print "\n
\n"; print "\"${interface}"; print "\n"; print "\"${interface}"; print "
\n"; print "\"${interface}"; print "\n"; print "\"${interface}
\n"; print "\"${interface}"; print "
\n"; print <
 Images generated using vnStat image output. FOOTER } sub send_image($) { my ($file)= @_; -r $file or do { print "Content-type: text/plain\n\nERROR: can't find $file\n"; exit 1; }; print "Content-type: image/png\n"; print "Content-length: ".((stat($file))[7])."\n"; print "\n"; open(IMG, $file) or die; my $data; print $data while read(IMG, $data, 16384)>0; } sub main() { mkdir $tmp_dir, 0755 unless -d $tmp_dir; my $img = $ENV{QUERY_STRING}; if(defined $img and $img =~ /\S/) { if($img =~ /^(\d+)-s$/) { my $file = "$tmp_dir/vnstat_$1.png"; graph($graphs[$1]{interface}, $file, "-s"); send_image($file); } elsif($img =~ /^(\d+)-hs$/) { my $file = "$tmp_dir/vnstat_$1_hs.png"; graph($graphs[$1]{interface}, $file, "-hs"); send_image($file); } elsif($img =~ /^(\d+)-d$/) { my $file = "$tmp_dir/vnstat_$1_d.png"; graph($graphs[$1]{interface}, $file, "-d"); send_image($file); } elsif($img =~ /^(\d+)-m$/) { my $file = "$tmp_dir/vnstat_$1_m.png"; graph($graphs[$1]{interface}, $file, "-m"); send_image($file); } elsif($img =~ /^(\d+)-t$/) { my $file = "$tmp_dir/vnstat_$1_t.png"; graph($graphs[$1]{interface}, $file, "-t"); send_image($file); } elsif($img =~ /^(\d+)-h$/) { my $file = "$tmp_dir/vnstat_$1_h.png"; graph($graphs[$1]{interface}, $file, "-h"); send_image($file); } elsif($img =~ /^(\d+)-f$/) { print_fullhtml($1); } else { die "ERROR: invalid argument\n"; } } else { if ($#graphs == 0) { print_fullhtml(0); } else { print_html(); } } } main();