diff --git a/admin/ajax_apply.php b/admin/ajax_apply.php
new file mode 100644
index 0000000..a6a79fe
--- /dev/null
+++ b/admin/ajax_apply.php
@@ -0,0 +1,54 @@
+window.location.href='./login.php';");
+header('Content-Type:application/json');
+
+$set= isset($_GET['set']) ? $_GET['set'] : null;
+switch($set) {
+ //修改分组
+ case 'status':
+ $id = $_POST['id'];
+ $sw = $_POST['status'];
+ $sql = "UPDATE `lylme_apply` SET `apply_status` = '".$sw."' WHERE `lylme_apply`.`apply_id` = ".$id.";";
+ if($sw==1) {
+ if ($DB->query($sql)) {
+ $applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = ".$id);
+ $name=strip_tags(daddslashes($applyres['apply_name']));
+ $url=strip_tags(daddslashes($applyres['apply_url']));
+ $icon=daddslashes($applyres['apply_icon']);
+ $group_id=strip_tags(daddslashes($applyres['apply_group']));
+ $mail=strip_tags(daddslashes($applyres['apply_mail']));
+ $link_order = $DB->count('select MAX(id) from `lylme_links`')+1;
+ $sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $mail . "的提交 ', '" . $link_order . "');";
+ if($DB->query($sql1)) {
+ exit('{"code": "200","msg":"成功!网站已成功收录!"}');
+ } else {
+ exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}');
+ }
+ }
+ } else if($sw==2){
+ if ($DB->query($sql)) {
+ exit('{"code": "200","msg":"操作成功!"}');
+ }
+ else{
+ exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}');
+ }
+ }
+ else{
+ exit('{"code": "-2","操作失败!-2"}');
+ }
+ break;
+ case 'delete':
+ $id = $_POST['id'];
+ $delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id;
+ if ($DB->query($delsql)) {
+ exit('{"code": "200","msg":"操作成功!"}');
+ }else{
+ exit('{"code": "-2","操作失败!-2"}');
+ }
+ break;
+ default:
+ exit('error');
+ break;
+}
\ No newline at end of file
diff --git a/admin/ajax_link.php b/admin/ajax_link.php
index 52994ac..41336ed 100644
--- a/admin/ajax_link.php
+++ b/admin/ajax_link.php
@@ -50,33 +50,12 @@ switch($submit) {
//获取链接信息
case 'geturl':
- function get_head($url) {
- ini_set("user_agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36 Edg/101.0.1210.39 Lylme/11.24");
- $opts = array(
- 'http'=>array(
- 'method'=>"GET",
- 'timeout'=>4
- )
- );
- $contents = @file_get_contents("compress.zlib://".$url, false, stream_context_create($opts));
- preg_match('/
(.*?)<\/title>/is',$contents,$title); // 获取网站标题
- preg_match('//is', $contents,$icon); // 获取网站icon
- preg_match('/query($sql)) echo ''; else echo '';
}
-} elseif ($set == 'delete') {
- $id = $_GET['id'];
- $delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id;
- if ($DB->query($delsql)) echo ''; else echo '';
}
-elseif ($set == 'status') {
- $id = $_GET['id'];
- $sw = $_GET['sw'];
- $sql = "UPDATE `lylme_apply` SET `apply_status` = '".$sw."' WHERE `lylme_apply`.`apply_id` = ".$id.";";
- if($sw==1) {
- if ($DB->query($sql)) {
- $applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = ".$id);
- $name=strip_tags(daddslashes($applyres['apply_name']));
- $url=strip_tags(daddslashes($applyres['apply_url']));
- $icon=daddslashes($applyres['apply_icon']);
- $group_id=strip_tags(daddslashes($applyres['apply_group']));
- $mail=strip_tags(daddslashes($applyres['apply_mail']));
- $link_order = $DB->count('select MAX(id) from `lylme_links`')+1;
- $sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $mail . "的提交 ', '" . $link_order . "');";
- if($DB->query($sql1)) {
- echo '';
- } else {
- echo '';
- }
- }
- } else if($sw==2){
- if ($DB->query($sql)) {
- echo '';
- }
- else{
- echo '';
- }
- }
- else{
- echo '';
- }
-} else {
+ else {
echo ''.$conf['apply_gg'].'
修改
';
echo '
收录申请统计:
' . $applyrows . ' 次
@@ -170,7 +135,7 @@ elseif ($set == 'status') {
申请收录地址:
'. siteurl().'/apply
访问已审核的图标会被隐藏,点击图标可重新加载
部分网站图标一直处于加载或无法显示,可能原因:无法访问或跨域问题,建议建将图标本地化 ';
?>
-
+
序号 | 图标 | 名称 | 链接 | 访问 | 分组 | 审核 | 操作 | 申请时间 |
@@ -206,12 +171,12 @@ elseif ($set == 'status') {
echo '已通过';
} else {
echo '
- 通过
- 拒绝';
+
+