- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/classes/general/captcha.php
- Класс: CCaptcha
- Вызов: CCaptcha::CreateImageError
function CreateImageError($arMsg)
{
$this->image = imagecreate($this->imageWidth, $this->imageHeight);
$bgColor = imagecolorallocate($this->image, 0, 0, 0);
$textColor = imagecolorallocate($this->image, 255, 255, 255);
if (!is_array($arMsg))
$arMsg = array($arMsg);
$bTextOut = false;
$y = 5;
for ($i = 0, $n = count($arMsg); $i < $n; $i++)
{
if (trim($arMsg[$i]) <> '')
{
$bTextOut = true;
imagestring($this->image, 3, 5, $y, $arMsg[$i], $textColor);
$y += 15;
}
}
if (!$bTextOut)
{
imagestring($this->image, 3, 5, 5, "Error!", $textColor);
imagestring($this->image, 3, 5, 20, "Reload the page!", $textColor);
}
}