更新
This commit is contained in:
parent
404afe2b07
commit
27906613d9
@ -1,11 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* 生成图片验证码 */
|
||||
session_start();
|
||||
|
||||
header("Content-type: image/png");
|
||||
|
||||
$image = imagecreatetruecolor(85, 40);
|
||||
$image = imagecreatetruecolor(85, 25);
|
||||
$bgcolor = imagecolorallocate($image, 255, 255, 255);
|
||||
imagecolortransparent($image, $bgcolor);
|
||||
imagefill($image, 0, 0, $bgcolor);
|
||||
@ -17,7 +15,7 @@ $captcha = "";
|
||||
/* 绘制干扰点 */
|
||||
for ($i = 0; $i < 80; $i++) {
|
||||
$pointColor = imagecolorallocate($image, rand(100, 255), rand(100, 255), rand(100, 255));
|
||||
imagesetpixel($image, rand(0, 85), rand(0, 40), $pointColor);
|
||||
imagesetpixel($image, rand(0, 85), rand(0, 25), $pointColor);
|
||||
}
|
||||
|
||||
/* 绘制验证码 */
|
||||
@ -27,7 +25,7 @@ for ($i = 0; $i < 4; $i++) {
|
||||
$fontContent = rand(0, 9);
|
||||
$captcha .= $fontContent;
|
||||
$x = ($i * 85 / 4) + 7;
|
||||
$y = rand(10, 15);
|
||||
$y = rand(3, 8);
|
||||
imagestring($image, $fontSize, $x, $y, $fontContent, $fontColor);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/* 获取主题当前版本号 */
|
||||
function _getVersion()
|
||||
{
|
||||
return "6.9.6";
|
||||
return "6.9.7";
|
||||
};
|
||||
|
||||
/* 判断是否是手机 */
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typecho-joe-next",
|
||||
"version": "6.9.6",
|
||||
"version": "6.9.7",
|
||||
"description": "A Theme Of Typecho",
|
||||
"main": "index.php",
|
||||
"keywords": [
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="list captcha">
|
||||
<input maxlength="4" type="text" autocomplete="off" name="captcha" placeholder="请输入验证码..." />
|
||||
<img style="cursor: pointer;" src="<?php $this->options->themeUrl('core/captcha.php'); ?>" onclick="this.src = this.src">
|
||||
<img style="cursor: pointer; margin-right: 5px;" src="<?php $this->options->themeUrl('core/captcha.php'); ?>" onclick="this.src = this.src">
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
|
Loading…
Reference in New Issue
Block a user