#!/usr/local/bin/perl

#
#Container for page's parts.
#

use CGI::Carp qw(fatalsToBrowser);
use CGI;
use CGI qw(:standard);

$query = new CGI;


$gb_path="/home/yourid/public_html/cntdata";

for($cnt=0;$cnt<1000;$cnt++){
    $pattern=time;
    $id="$pattern$pattern$cnt";
    if($id=~/\d*(\d{9})/gi){
	$id_n=$1;
	if(open(TEST, "< $gb_path/$id_n")){
		close(TEST);
	} else {
		open(TEST, ">> $gb_path/$id_n");		
		$infile=$query->param('gbfile');

		binmode( $infile ); 
		binmode( TEST ); 
		undef $/;                        
		while ($bytesread=read($infile,$buffer,1024)) {
			print TEST $buffer;				
		};
		$cnt=100000;
		close(TEST);
	};
    };
};

print "Content-type: text/html\r\n\r\n";
print "<html><body>\n";
print "place into your page something about:\n<br><br>";
print qq~&ltOBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
 ID=flash1 WIDTH=x HEIGHT=y&gt
 &ltPARAM NAME=movie VALUE="yourserver/cgi-bin/getcnt.pl?id=$id_n"&gt &ltPARAM NAME=quality VALUE=high&gt &ltPARAM NAME=bgcolor VALUE=#FFFFFF&gt &ltEMBED src="http://yourserver/cgi-bin/getcnt.pl?id=$id_n" quality=high bgcolor=#FFFFFF  WIDTH=x HEIGHT=y TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt &lt/EMBED&gt
&lt/OBJECT&gt

<br>
<b>NOTE! будте бдительны! X и Y - ширина и высота Вашего мува. Подставьте их - и работайте. Удачи.</b> 
<a href="http://prosto.agava.ru">На главную страницу</a>
~;
print "</body></html>";
exit;                 



