diff --git a/admin/sou.php b/admin/sou.php new file mode 100644 index 0000000..1a8fc52 --- /dev/null +++ b/admin/sou.php @@ -0,0 +1,245 @@ + +
+ +
+ +
+
+
+
+新增搜索接 +
+
+
+
+ +搜索引擎名称,如百度一下搜狗搜索 +
+
+
+ +注:仅支持字母,不能和其他搜索引擎的别名相同
建议填写搜索引擎的拼音或英文,如百度填写baidu
+
+
+
+ +
+
+
+ +例:百度搜索 https://www.baidu.com/s?word=查看获取接口教程 +
注意:当前仅支持搜索词作为末尾,例如:https://www.baidu.com/s?word=搜索内容
如果使用GET请求搜索,搜索词不处于末尾,如https://www.baidu.com/s?wd=搜索词&ie=UTF-8可将搜索词参数调换到末尾,如https://www.baidu.com/s?ie=UTF-8&wd=搜索词多个GET参数用以&分隔
如果搜索词不在末尾且非GET请求,如https://xxx.com/s/搜索词.html类似情况,可用PHP页面定制搜索接口查看教程
+
+
+
+ +例:百度搜索的电脑端和手机端不会自适应,需要手动设置手机端,如https://m.baidu.com/s?word=
如果你添加的搜索区分手机端和PC端,则需要手动设置。一般情况下留空即可
+
+
+
+ +(*必填) 填写颜色的十六进制,如: #FF0000(红色)
默认值:#696a6d
+
+
+
+ +方案1:粘贴图标的SVG代码(推荐) 查看教程
方案2:使用图片地址,需要img标签,如<img src="/assets/img/logo.png" />
+
+
+ + + 说明:是否启用该搜索引擎(默认启用) +
+
+ +
+
<<返回 +
'; +} +elseif($set=='edit') +{ +$id=$_GET['id']; +$row2 = mysqli_query($con,"select * from lylme_sou where sou_id='$id' limit 1"); +$row=mysqli_fetch_assoc($row2); +echo '

修改搜索引擎

+
+
+
+
+ +搜索引擎名称,如百度一下搜狗搜索 +
+
+
+ +注:仅支持字母,不能和其他搜索引擎的别名相同
建议填写搜索引擎的拼音或英文,如百度填写baidu
+
+
+
+ +
+
+
+ +例:百度搜索 https://www.baidu.com/s?word=查看获取接口教程 +
注意:当前仅支持搜索词作为末尾,例如:https://www.baidu.com/s?word=搜索内容
如果使用GET请求搜索,搜索词不处于末尾,如https://www.baidu.com/s?wd=搜索词&ie=UTF-8可将搜索词参数调换到末尾,如https://www.baidu.com/s?ie=UTF-8&wd=搜索词多个GET参数用以&分隔
如果搜索词不在末尾且非GET请求,如https://xxx.com/s/搜索词.html类似情况,可用PHP页面定制搜索接口查看教程
+
+
+
+ +例:百度搜索的电脑端和手机端不会自适应,需要手动设置手机端,如https://m.baidu.com/s?word=
如果你添加的搜索区分手机端和PC端,则需要手动设置。一般情况下留空即可
+
+
+
+ +(*必填) 填写颜色的十六进制,如: #FF0000(红色)
默认值:#696a6d
+
+
+
+ +方案1:粘贴图标的SVG代码(推荐) 查看教程
方案2:使用图片地址,需要img标签,如<img src="/assets/img/logo.png" />
+
+
+
+ +(*必填) 数字越小越靠前 +
+
+ + + 说明:是否启用该搜索引擎(默认启用) +
+
+ +
+
<<返回 +
'; +} +elseif($set=='add_submit') +{ +$name=$_POST['name']; +$alias=$_POST['alias']; +$hint=$_POST['hint']; +$link=$_POST['link']; +$waplink=$_POST['waplink']; +$color=$_POST['color']; +$icon=$_POST['icon']; +if($_POST['st']==true){$st=1;}else{$st=0;} +$sou_order = $sousrows+1; + +if (empty($name) && empty($alias)&& empty($hint) && empty($link) && empty($color) && empty($icon)){ + echo ''; +} else { + +$sql="INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES +(NULL, '".$alias."', '".$name."', '".$hint."', '".$color."', '".$link."', '".$waplink."', '".$icon."', '".$st."', '".$sou_order."'); +"; + + +if(mysqli_query($con,$sql)){ + echo ''; +}else + echo ''; +} +} +elseif($set=='edit_submit') +{ +$id=$_GET['id']; +$rows2 = mysqli_query($con,"select * from lylme_sou where sou_id='$id' limit 1"); +$rows=mysqli_fetch_assoc($rows2); +if(!$rows) + echo ''; +$name=$_POST['name']; +$alias=$_POST['alias']; +$hint=$_POST['hint']; +$link=$_POST['link']; +$waplink=$_POST['waplink']; +$color=$_POST['color']; +$icon=$_POST['icon']; +$order=$_POST['order']; +if($_POST['st']==true){$st=1;}else{$st=0;} + +if (empty($name) && empty($alias)&& empty($hint) && empty($link) && empty($color) && empty($icon) && empty($order)){ + echo ''; +} else { + +$sql="UPDATE `lylme_sou` SET `sou_alias` = '".$alias."', `sou_name` = '".$name."', `sou_hint` = '".$hint."', `sou_color` = '".$color."', `sou_link` = '".$link."', `sou_waplink` = '".$waplink."', `sou_icon` = '".$icon."', `sou_st` = '".$st."', `sou_order` = '".$order."' WHERE `lylme_sou`.`sou_id` = ".$id.";"; + +if(mysqli_query($con,$sql)) +echo ''; +else + echo ''; +} +} +elseif($set=='delete') +{ +$id=$_GET['id']; +$sql="DELETE FROM lylme_sou WHERE sou_id='$id'"; +if(mysqli_query($con,$sql)) + echo ''; +else + echo ''; +} +else +{ + +$sql=" 1"; +$cons='系统共有 '.$sousrows.' 个搜索引擎
新增搜索引擎'; + +echo '
'; +echo $cons; +echo '
'; + +?> +
+ + + +'; +} +?> + +
排序权重名称别名链接状态操作
'.$res['sou_order'].''.$res['sou_name'].''.$res['sou_alias'].''.$res['sou_link'].''; + +if($res['sou_st'] == 1){echo '开启';}else{echo '关闭';} + +echo '编辑 删除
+
+
+
+
+ + + + + +
+ \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index f03ea6f..fdf6556 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -23,7 +23,7 @@ svg.icon{width:14px;height:14px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:c #search button{position:absolute;top:0;right:0;background:none;border:0;border-radius:20px;width:auto;height:50px;border-radius:0 10px 10px 0;outline:none;background-color:#4e6ef2} #search button:hover{cursor:pointer;background-color:#4662d9} #search button i{color:#ddd;font-size:18px} -.search-group{display:none;padding-left:75px} +.search-group{text-align: center;} .s-current .search-type{padding-left:0;display:block} .s-current{display:block} #search-list{position:relative;overflow-x:auto} @@ -40,6 +40,7 @@ svg.icon{width:14px;height:14px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:c .type-text{position:absolute;left:0;width:75px;padding-left:9pt;font-size:1pc;line-height:31px} .search-type{white-space:nowrap;margin:0} .search-type label{margin:0} +.search-type img {width: 14px;height: 14px;margin: 0 5px 0 8px;vertical-align: -0.15em;fill: currentColor;overflow: hidden;} .search-type li{margin-bottom:10px;display:inline-block;background:#ffffffAD !important;background:rgba(255,255,255,70%);border-radius:10px} .search-type li label{display:inline-block;padding:0 11px;font-size:14px;border-radius:3px 3px 0 0;cursor:pointer} .search-type input:checked+label,.search-type input:hover+label{background-color:#fff;height:50px;border-radius:10px}