2023-12-17 23:44:51 +08:00
|
|
|
<?php
|
2022-03-20 14:57:47 +08:00
|
|
|
include("../include/common.php");
|
2023-12-17 23:44:51 +08:00
|
|
|
$grouplists = $DB->query("SELECT * FROM `lylme_groups` WHERE `group_pwd` = 0");
|
2022-04-03 21:22:17 +08:00
|
|
|
if(!empty($url = isset($_GET['url']) ? $_GET['url'] : null)) {
|
2022-12-01 04:06:41 +08:00
|
|
|
header('Content-Type:application/json');
|
2023-12-17 23:44:51 +08:00
|
|
|
//获取网站信息
|
|
|
|
$head = get_head($_GET['url']);
|
|
|
|
$head = json_encode($head, JSON_UNESCAPED_UNICODE); //将合并后的数组转换为json
|
2022-12-01 04:06:41 +08:00
|
|
|
exit($head); //输出json
|
|
|
|
|
2023-12-17 23:44:51 +08:00
|
|
|
} elseif(isset($_GET['submit']) == 'post') {
|
|
|
|
if(isset($_REQUEST['authcode'])) {
|
|
|
|
session_start();
|
|
|
|
if(strtolower($_REQUEST['authcode']) == $_SESSION['authcode']) {
|
|
|
|
$status = isset($conf["apply"]) ? $conf["apply"] : 0;
|
|
|
|
if($status == 2) {
|
|
|
|
exit('{"code": "400", "msg": "网站已关闭收录"}');
|
|
|
|
}
|
|
|
|
exit(apply($_POST['name'], $_POST['url'], $_POST['icon'], $_POST['group_id'], $status));
|
|
|
|
} else {
|
|
|
|
exit('{"code": "-6", "msg": "验证码错误"}');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exit();
|
2022-03-20 14:57:47 +08:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
2022-12-01 04:06:41 +08:00
|
|
|
<title>申请收录 - <?php echo explode("-", $conf['title'])[0];
|
|
|
|
?></title>
|
2023-12-17 23:44:51 +08:00
|
|
|
<link rel="icon" href="<?php echo get_urlpath($conf['logo'], siteurl() . '/apply');?>" type="image/ico">
|
2022-04-03 21:22:17 +08:00
|
|
|
<link href="https://cdn.lylme.com/admin/lyear/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<link href="https://cdn.lylme.com/admin/lyear/css/style.min.css" rel="stylesheet">
|
2022-12-01 04:06:41 +08:00
|
|
|
<style>#loading{position:absolute;left:0;top:0;height:100vh;width:100vw;z-index:100;display:none;align-items:center;justify-content:center;color:#bbb;font-size:16px}#loading>img{height:18px;width:18px}.lylme-wrapper{position:relative}.lylme-form{display:flex !important;min-height:100vh;align-items:center !important;justify-content:center !important}.lylme-form:after{content:'';min-height:inherit;font-size:0}.lylme-center{background:#fff;min-width:29.25rem;padding:30px;border-radius:20px;margin:2.85714em}.lylme-header{margin-bottom:1.5rem !important}.lylme-center .has-feedback.feedback-left .form-control-feedback{left:0;right:auto;width:38px;height:38px;line-height:38px;z-index:4;color:#dcdcdc}.lylme-center .has-feedback.feedback-left.row .form-control-feedback{left:15px}.code{height:38px}.apply_gg{margin:20px 0;font-size:15px;line-height:2}.home{text-decoration:none;color:#bbb;line-height:2}li{list-style-type:none}ol,ul{padding-left:10px}</style>
|
2022-03-20 14:57:47 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
2022-12-01 04:06:41 +08:00
|
|
|
<div id="loading"><img src="https://cdn.lylme.com/admin/lyear/img/loading.gif"/>
|
|
|
|
正在获取....</div>
|
2022-05-12 16:54:51 +08:00
|
|
|
<?php
|
2022-12-01 04:06:41 +08:00
|
|
|
if(!empty($background = background())) {
|
2023-12-17 23:44:51 +08:00
|
|
|
$background = str_replace('./', '../', $background);
|
|
|
|
echo '<div class="row lylme-wrapper" style="background-image: url(' . $background . ');background-size: cover;">';
|
2022-12-01 04:06:41 +08:00
|
|
|
} else {
|
2023-12-17 23:44:51 +08:00
|
|
|
echo '<div class="row lylme-wrapper">';
|
2022-12-01 04:06:41 +08:00
|
|
|
}
|
2022-05-12 16:54:51 +08:00
|
|
|
?>
|
2022-03-20 14:57:47 +08:00
|
|
|
<div class="lylme-form">
|
|
|
|
<div class="lylme-center">
|
2023-12-17 23:44:51 +08:00
|
|
|
<?php if($conf["apply"] == 2) {
|
|
|
|
exit('<div class="lylme-header text-center"><h2>网站已关闭收录</h2></div>' . $conf['apply_gg'] . '</div>');
|
|
|
|
}
|
2022-03-26 16:48:07 +08:00
|
|
|
?>
|
2022-03-20 14:57:47 +08:00
|
|
|
<div class="lylme-header text-center"><h2>申请收录</h2></div>
|
2022-05-02 02:09:58 +08:00
|
|
|
<div class="apply_gg">
|
|
|
|
<?php echo $conf['apply_gg']?>
|
|
|
|
</div>
|
2022-06-18 20:54:43 +08:00
|
|
|
<div class="form-group">
|
2022-05-12 16:54:51 +08:00
|
|
|
<label>*URL链接地址:</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="form-control" name="url" placeholder="完整链接或域名" value="" onchange="gurl()" required >
|
|
|
|
<span class="input-group-btn">
|
2022-12-01 04:06:41 +08:00
|
|
|
<button class="btn btn-default" onclick="get_url()" type="button">自动获取</button>
|
2022-05-12 16:54:51 +08:00
|
|
|
</span>
|
|
|
|
</div></div>
|
2022-03-20 14:57:47 +08:00
|
|
|
<div class="form-group has-feedback feedback-left row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<label>* 选择分组:</label>
|
2022-05-06 23:33:45 +08:00
|
|
|
<select title="分组" class="form-control" name="group_id" required>
|
|
|
|
<option value="">请选择</option>
|
2022-03-20 14:57:47 +08:00
|
|
|
<?php
|
2023-12-17 23:44:51 +08:00
|
|
|
$applygroup = $site->getGroups();
|
|
|
|
while($grouplist = $DB->fetch($applygroup)) {
|
|
|
|
echo '
|
|
|
|
<option value="' . $grouplist["group_id"] . '">' . $grouplist["group_name"] . '</option>';
|
2022-03-26 16:48:07 +08:00
|
|
|
}
|
|
|
|
?>
|
2022-03-20 14:57:47 +08:00
|
|
|
</select>
|
|
|
|
<span class="mdi mdi-folder form-control-feedback" aria-hidden="true"></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group has-feedback feedback-left row">
|
|
|
|
<div class="col-xs-12">
|
2022-04-03 21:22:17 +08:00
|
|
|
<label>* 网站名称:</label>
|
|
|
|
<input type="text" class="form-control" id="title" name="name" value="" required placeholder="网站名称">
|
|
|
|
<span class="mdi mdi-format-title form-control-feedback" aria-hidden="true"></span>
|
2022-05-12 16:54:51 +08:00
|
|
|
<small class="help-block">填写网站名称</small>
|
2022-03-20 14:57:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-01 04:06:41 +08:00
|
|
|
<div class="form-group">
|
|
|
|
<label>网站图标:</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<!-- 用于展示上传文件名的表单 -->
|
|
|
|
<input type="text" id="icon" class="form-control" name="icon" placeholder="填写图标的URL地址">
|
|
|
|
<!-- 点击触发按钮 -->
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<input type="file" id="file" onchange="uploadimg()" accept="image/png, image/jpeg,image/gif,image/x-icon" style="display: none" />
|
|
|
|
<button class="btn btn-default" id="uploadImage" onclick="$('#file').click();" type="button">选择</button>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<img id="review" src="" width="100px" height="100px" class="center-block" style="display: none;"/>
|
2022-04-03 21:22:17 +08:00
|
|
|
<span class="mdi mdi-emoticon form-control-feedback" aria-hidden="true"></span>
|
2022-05-12 16:54:51 +08:00
|
|
|
<small class="help-block">填写图标的<code>URL</code>地址,如:<code>http://www.xxx.com/logo.png</code><br>
|
2022-12-01 04:06:41 +08:00
|
|
|
部分网站无法自动获取,请手动填写</small>
|
2022-03-20 14:57:47 +08:00
|
|
|
</div>
|
|
|
|
<div class="form-group has-feedback feedback-left row">
|
2022-12-01 04:06:41 +08:00
|
|
|
<label>* 验证码:</label>
|
2022-05-02 02:09:58 +08:00
|
|
|
<div class="col-xs-8">
|
2022-05-12 17:53:12 +08:00
|
|
|
<input type="text" name="authcode" class="form-control" placeholder="验证码" required>
|
2022-03-20 14:57:47 +08:00
|
|
|
<span class="mdi mdi-check form-control-feedback" aria-hidden="true"></span>
|
|
|
|
</div>
|
2022-05-02 02:09:58 +08:00
|
|
|
<div class="col-xs-4">
|
2022-06-18 20:54:43 +08:00
|
|
|
<img id="captcha_img" title="验证码" src='../include/validatecode.php' class="pull-right code" onclick="recode()"/>
|
2022-03-20 14:57:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2022-12-01 04:06:41 +08:00
|
|
|
<button class="btn btn-primary btn-block" onclick="submit()">提交</button>
|
2022-03-20 14:57:47 +08:00
|
|
|
</div>
|
2022-05-23 13:18:03 +08:00
|
|
|
<center><p><a href="../" class="home">返回首页</a></p><?php echo $conf['copyright']?></center>
|
2022-03-20 14:57:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
2022-05-12 16:54:51 +08:00
|
|
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-2-M/jquery/3.5.1/jquery.min.js" type="application/javascript"></script>
|
|
|
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/layer/3.1.1/layer.min.js" type="application/javascript"></script>
|
2022-06-18 20:54:43 +08:00
|
|
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/sweetalert/2.1.2/sweetalert.min.js" type="application/javascript"></script>
|
2023-01-21 18:31:00 +08:00
|
|
|
<script src="./apply.js" type="application/javascript"></script>
|
2022-03-26 16:48:07 +08:00
|
|
|
</html>
|