mirror of https://github.com/helloxz/imgurl
del
parent
4aa01400b6
commit
c7ad3fa834
12
footer.php
12
footer.php
|
@ -1,12 +0,0 @@
|
|||
|
||||
<!--页脚-->
|
||||
<div id = "footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!--这是一个开源免费的作品,请为她保留版权-->
|
||||
<div class="col-lg-10 col-md-offset-1">Copyright Ⓒ 2017 Powered by <a href="https://github.com/helloxz/imgurl" title = "ImgURL" target = "_blank" rel = "nofollow">ImgURL</a>. Author: <a href="https://www.xiaoz.me/" title = "小z博客" target = "_blank">xiaoz.me</a>. 请勿上传违反中国大陆法律的图片,违者后果自负。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
73
header.php
73
header.php
|
@ -1,73 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>ImgURL - 简单、纯粹的图床程序。</title>
|
||||
<meta name="generator" content="EverEdit" />
|
||||
<meta name="author" content="xiaoz.me" />
|
||||
<meta name="keywords" content="ImgURL,免费图床,图床程序,小z图床,XZ Pic" />
|
||||
<meta name="description" content="ImgURL是一个简单、纯粹的图床程序,让个人图床多一个选择。" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||
<link rel="Bookmark" href="favicon.ico" />
|
||||
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="./static/uploadfile.css" rel="stylesheet">
|
||||
<link href="./static/style.css" rel="stylesheet">
|
||||
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="./static/jquery.uploadfile.min.js"></script>
|
||||
<script src = "https://libs.xiaoz.top/clipBoard.js/clipBoard.min.js"></script>
|
||||
<script src = "./static/embed.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="msg">
|
||||
<div class = "msg">复制成功!</div>
|
||||
</div>
|
||||
<div id = "loading"><center><img src="./static/ajax-load.gif" alt="" class = "img-responsive center-block"></center></div>
|
||||
<!--导航栏-->
|
||||
<div id="menu">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 col-md-offset-1">
|
||||
<nav class="navbar navbar-inverse" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse"
|
||||
data-target="#example-navbar-collapse">
|
||||
<span class="sr-only">切换导航</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="./index.php">ImgURL</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="example-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="./explore.php">探索发现</a></li>
|
||||
<li><a href="./pro.php">捐赠版</a></li>
|
||||
<li><a href="https://wiki.xiaoz.me/docs/imgurl/" rel = "nofollow" target = "_blank">帮助文档</a></li>
|
||||
<li><a href="./about.php">关于</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<?php
|
||||
if(isset($_COOKIE['uid'])) {
|
||||
include_once('./config.php');
|
||||
$mydir = $config['admindir'];
|
||||
echo "<li><a href='./recycle.php'>回收站</a></li>";
|
||||
echo "<li><a href='./explore.php?dir=$mydir'>管理员</a></li>";
|
||||
echo "<li><a href='./functions.php?type=logout'>退出</a></li>";
|
||||
}
|
||||
else {
|
||||
echo "<li><a href='./login.php'>登录</a></li>";
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--导航栏END-->
|
44
test.php
44
test.php
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
require_once 'wxyt/index.php';
|
||||
use QcloudImage\CIClient;
|
||||
$client = new CIClient('', '', '', '');
|
||||
$client->setTimeout(30);
|
||||
$imginfo = ($client->pornDetect(array('urls'=>array('https://imgurl.org/upload/1712/caace16a4a5b0646.png'))));
|
||||
|
||||
$imginfo = json_decode($imginfo);
|
||||
|
||||
//获取状态码,0为成功
|
||||
//$code = $imginfo->http_code;
|
||||
//转换为数组
|
||||
$imginfo = object2array($imginfo);
|
||||
//状态码,0为成功
|
||||
$code = $imginfo['result_list']['0']->code;
|
||||
$imginfo = object2array($imginfo['result_list']['0']->data);
|
||||
//识别结果,0 正常,1 黄图,2 疑似图片
|
||||
$result = $imginfo['result'];
|
||||
//识别评分,分数越高,越可能是黄图
|
||||
$confidence = $imginfo['confidence'];
|
||||
|
||||
//重新返回json数据
|
||||
$re_data = array(
|
||||
"code" => $code,
|
||||
"result" => $result,
|
||||
"confidence"=> $confidence
|
||||
);
|
||||
echo $re_data = json_encode($re_data);
|
||||
?>
|
||||
|
||||
<?php
|
||||
//对象转数组
|
||||
function object2array($object) {
|
||||
if (is_object($object)) {
|
||||
foreach ($object as $key => $value) {
|
||||
$array[$key] = $value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$array = $object;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue