删除无用文件

pull/18/head
icret 2021-05-22 11:37:30 +08:00
parent e30e47cb42
commit e1d1d4ec0a
2 changed files with 0 additions and 106 deletions

View File

@ -1,41 +0,0 @@
<?php
/**
* 图片验证码 http://www.phpxs.com/code/1002990/
*/
session_start();
$num = 4; //验证码个数
$width = 80; //验证码宽度
$height = 20; //验证码高度
$code = ' ';
for ($i = 0; $i < $num; $i++) //生成验证码
{
switch (rand(0, 2)) {
case 0:
$code[$i] = chr(rand(48, 57));
break; //数字
case 1:
$code[$i] = chr(rand(65, 90));
break; //大写字母
case 2:
$code[$i] = chr(rand(97, 122));
break; //小写字母
}
}
$_SESSION["VerifyCode"] = $code;
$image = imagecreate($width, $height);
imagecolorallocate($image, 255, 255, 255);
for ($i = 0; $i < 80; $i++) //生成干扰像素
{
$dis_color = imagecolorallocate($image, rand(0, 2555), rand(0, 255), rand(0, 255));
imagesetpixel($image, rand(1, $width), rand(1, $height), $dis_color);
}
for ($i = 0; $i < $num; $i++) //打印字符到图像
{
$char_color = imagecolorallocate($image, rand(0, 2555), rand(0, 255), rand(0, 255));
imagechar($image, 60, ($width / $num) * $i, rand(0, 5), $code[$i], $char_color);
}
header("Content-type:image/png");
imagepng($image); //输出图像到浏览器
imagedestroy($image);//释放资源

View File

@ -1,65 +0,0 @@
<?php
/*
* 登录页面
*/
require_once 'function.php';
require_once APP_ROOT . '/libs/header.php';
/*
// 提交登录
if (isset($_POST['password'])) {
checkLogin();
Header("Location:../");
}
*/
/*
if (isset($_POST['code'])) {
session_start();
if ((strtoupper($_POST["code"])) == strtoupper(($_SESSION["VerifyCode"]))) {
if (isset($_POST['password'])) {
checkLogin();
Header("Location:../");
}
} else {
echo '
<script> new $.zui.Messager("验证码错误", {type: "danger" // 定义颜色主题
}).show();</script>';
header("refresh:1;"); // 1s后刷新当前页面
}
}
*/
?>
<center>
<div class="center" style="margin: 40px;">
<form class="form-inline" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" onsubmit="return md5_post()">
<div class="form-group">
<div class="has-success">
<label for="password">密码:</label>
<input type="password" name="password" id="password" class="form-control" placeholder="请输入登录密码">
</div>
<input type="hidden" name="password" id="md5_password">
</div>
<div class="form-group">
<div class="has-success">
<label for="code">验证码:</label>
<input type="text" class="form-control" name="code" id="textfield" />
<img id="imgcode" src="<?php echo $config['domain'] . '/libs/VerifyCode.php';?>" onclick="this.src='VerifyCode.php?'+new Date().getTime();" alt="验证码" />
</div>
</div>
<button type="submit" class="btn btn-primary">登录</button>
</form>
</div>
</center>
<script src="../public/static/md5.min.js"></script>
<script>
function md5_post() {
var password = document.getElementById('password');
var md5pwd = document.getElementById('md5_password');
md5pwd.value = md5(password.value);
//可以校验判断表单内容true就是通过提交false阻止提交
return true;
}
</script>
<?php
require_once APP_ROOT . '/libs/footer.php';