Revert "v2.1.1"

This reverts commit dbfd1285c2.
This commit is contained in:
icret
2021-05-08 15:34:08 +08:00
parent 31987f4d62
commit 09fed3cdd6
11 changed files with 117 additions and 207 deletions

View File

@@ -8,18 +8,12 @@ require_once '../libs/function.php';
/*//////////////////////////////////////////////////////////*/
// 根据token查找用户ID
// 查找token
if (isset($_POST['token'])) {
$getID = '用户ID' . getID($_POST['token']);
$getID = '用户ID:' . getID($_POST['token']);
} else {
$getID = null;
}
// 根据用户ID查找token
if (isset($_POST['id'])) {
$getToken = '用户token' . getIDToken($_POST['id']);
} else {
$getToken = null;
}
// 提交登录
if (isset($_POST['password'])) {
@@ -83,20 +77,6 @@ if (!is_online()) {
查找
</button>
</form>
</div>
<div class="col-md-4">
<div id="title" style="margin: 10px;"></div>
<form class="form-condensed" action="' . $_SERVER['PHP_SELF'] . '" method="post">
<div class="form-group">
<label>
根据ID查找用户Token
</label>
<input type="text" name="id" class="form-control" placeholder="请输入用户ID" value="' . $getToken . '">
</div>
<button type="submit" class="btn btn-mini btn-primary">
查找
</button>
</form>
</div>
<div class="col-md-4">
<div id="title" style="margin: 10px;"></div>
@@ -107,6 +87,7 @@ if (!is_online()) {
</label>
<input type="url" name="url" class="form-control" id="del" placeholder="请输入图片链接" />
</div>
<button type="submit" class="btn btn-mini btn-primary">
删除
</button>
@@ -159,23 +140,4 @@ if (!is_online()) {
}
*/
</script>
<div class="col-md-4">
<table class="table table-hover table-bordered table-condensed table-responsive">
<thead>
<tr>
<th>当前Token列表</th>
</tr>
</thead>
<tbody>
<?php
if (is_online()) {
foreach ($tokenList as $value) {
echo '<tr><td>' . $value . '</td></tr>';
}
}
?>
</tbody>
</table>
</div>
<?php require_once './../libs/footer.php';

View File

@@ -5,18 +5,6 @@
*/
require_once $_SERVER['DOCUMENT_ROOT'] . '/libs/header.php';
require_once '../libs/function.php';
echo '<div class="col-md-4 col-md-offset-4">
<div id="title" style="margin: 10px;"></div>
<form class="form-inline" method="get" action="' . $_SERVER['PHP_SELF'] . '" id="form" name="delForm" onSubmit="getStr();">
<div class="form-group">
<label for="exampleInputInviteCode3">删除图片-格式:</label>
<input type="text" class="form-control" id="exampleInputInviteCode3" name="url" placeholder="https://i1.100024.xyz/i/2021/05/04/10fn9ei.jpg">
</div>
<button type="submit" class="btn btn-primary">删除</button>
</form>
</div>
';
if (empty($_REQUEST)) {
echo '
<script>
@@ -27,12 +15,10 @@ if (empty($_REQUEST)) {
</script>
';
} elseif (isset($_GET['url'])) {
//$img = isset($_GET['hash'])?:$_GET['url'];
$img = $_GET['url'];
echo '
<div class="col-md-12">
<hr />
<a href="' . $img . '" target="_blank"><img src="' . $img . '" alt="简单图床-EasyImage" class="img-thumbnail"></a>
</div>';
//echo '<img data-toggle="lightbox" data-image="' . $img . '" src="' . $img . '" alt="简单图床-EasyImage" class="img-thumbnail">';
echo '<a href="' . $img . '" target="_blank"><img src="' . $img . '" alt="简单图床-EasyImage" class="img-thumbnail"></a>';
}
// 解密删除
@@ -61,26 +47,3 @@ if (is_online()) {
}
require_once '../libs/footer.php';
?>
<script>
var oBtn = document.getElementById('del');
var oTi = document.getElementById('title');
if ('oninput' in oBtn) {
oBtn.addEventListener("input", getWord, false);
} else {
oBtn.onpropertychange = getWord;
}
function getWord() {
oTi.innerHTML = '<img src="' + oBtn.value + '" width="200" class="img-rounded" /><br />';
}
/**
// 动态修改请求地址
function getStr(string, str) {
string = oBtn.value;
str = 'images';
var str_before = string.split(str)[0];
document.delForm.action = str_before + 'del.php';
}
*/
</script>

View File

@@ -32,21 +32,9 @@ function getID($token)
global $tokenList;
$token = preg_replace('/[\W]/', '', $token); // 过滤非字母数字,删除空格
$key = array_search($token, $tokenList);
if ($key >= 0) {
if ($key) {
return $key;
} else {
return ('没有这个用户ID');
}
};
// 通过ID查找用户Token
function getIDToken($id)
{
global $tokenList;
$id = preg_replace('/[\W]/', '', $id); // 过滤非字母数字,删除空格
foreach ($tokenList as $key => $value) {
if ($key == $id) {
return $value;
}
}
};
};