<?php
header("Content-type: image/png");
$beg=imagecreatefrompng('images/begunok.png');
$rightimage=imagecreatefromgif('images/right/1.gif');
$usertext="Текст юзера";
$beg_sx=imagesx($beg);
$beg_sy=imagesy($beg);
$out=imagecreate(700,90);
imagecopy($out,$rightimage,0,0,0,0,700,90);
$pixpm=353/12;
$std=$_GET['d'];
$ed=time();
$sid=3600*24;
$sim=3600*30*24;
$sty=mktime(0,0,0,0,0,date('Y',$std));
$offset=$ed-$std;
$days=intval($offset/86400);
$monsz=0;
while($days>30)
{
$monsz++;
$days=$days-30;
}
$beg_x=$monsz*$pixpm;
imagecopy($out,$beg,$beg_x,5,0,0,$beg_sx,$beg_sy);
$black = imageColorAllocate($out, 0, 0, 0);
$white = imageColorAllocate($out, 255, 255, 255);
$font = "micron.ttf";
$text = $usertext.' дней Copyright (c) AllNFS.Ru';
imagefttext($out,6,0,9,50,$black,$font,$text);
imagefttext($out,6,0,11,52,$black,$font,$text);
imagefttext($out,6,0,11,50,$black,$font,$text);
imagefttext($out,6,0,9,52,$black,$font,$text);
imagefttext($out,6,0,10,52,$black,$font,$text);
imagefttext($out,6,0,10,50,$black,$font,$text);
imagefttext($out,6,0,9,51,$black,$font,$text);
imagefttext($out,6,0,11,51,$black,$font,$text);
imagefttext($out,6,0,10,50,-$white,$font,$text);
imagepng($out);
imagedestroy($out);
?>
|