Обновил jquery

This commit is contained in:
2023-10-10 11:31:31 +06:00
parent 12c0147d54
commit 573f584ec7
4 changed files with 23 additions and 161 deletions

View File

@ -12,10 +12,12 @@ if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
//$letters = array('a','b','c','d','e','f','g','h','j','k','m','n','p','q','r','s','t','u','v','w','x','y','z','2','3','4','5','6','7','9');
$letters = array('0','1','2','3','4','5','6','7','8','9');
$colors = array('100','200','150','170','190','210','190','160','170','190','210');
//$colors = array('100','200','150','170','190','210','190','160','170','190','210'); //для тёмного стиля
$colors = array('50','100','75','85','95','105','90','80','85','95','105'); //Для светлого стиля
$src = imagecreatetruecolor($width,$height);
$fon = imagecolorallocate($src,58,58,58);
//$fon = imagecolorallocate($src,58,58,58); //Для тёмного стиля
$fon = imagecolorallocate($src,241,241,241); //Для светлого стиля
imagefill($src,0,0,$fon);
$fonts = array();
@ -35,7 +37,16 @@ if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
$font = $path_fonts.$fonts[rand(0,sizeof($fonts)-1)];
$letter = $letters[rand(0,sizeof($letters)-1)];
$size = rand($font_size-2,$font_size+2);
imagettftext($src,$size,rand(0,45),rand($width*0.1,$width-$width*0.1),rand($height*0.2,$height),$color,$font,$letter);
imagettftext(
$src,
$size,
rand(0,45),
rand((int)($width*0.1),(int)($width-$width*0.1)),
rand((int)($height*0.2),$height),
$color,
$font,
$letter
);
}
for($i=0;$i<$let_amount;$i++)
@ -43,9 +54,9 @@ if (isset($_REQUEST['id'])) $id = $_REQUEST['id']; else $id = '';
$color = imagecolorallocatealpha($src,$colors[rand(0,sizeof($colors)-1)],$colors[rand(0,sizeof($colors)-1)],$colors[rand(0,sizeof($colors)-1)],rand(20,40));
$font = $path_fonts.$fonts[rand(0,sizeof($fonts)-1)];
$letter = $letters[rand(0,sizeof($letters)-1)];
$size = rand($font_size*2.1-2,$font_size*2.1+2);
$x = ($i+0.9)*$font_size + rand(4,7);
$y = (($height*2.3)/3) + rand(0,5);
$size = rand((int)($font_size*2.1-2),(int)($font_size*2.1+2));
$x = (int)(($i+0.9)*$font_size + rand(4,7));
$y = (int)((($height*2.3)/3) + rand(0,5));
$cod[] = $letter;
imagettftext($src,$size,rand(0,15),$x,$y,$color,$font,$letter);
}