|
|
@ -99,6 +99,11 @@ echo '<h4>修改搜索引擎</h4>
|
|
|
|
<br>注意:当前仅支持搜索词作为末尾,例如:<code>https://www.baidu.com/s?word=搜索内容</code><br>如果使用GET请求搜索,搜索词不处于末尾,如<code>https://www.baidu.com/s?wd=搜索词&ie=UTF-8</code>可将搜索词参数调换到末尾,如<code>https://www.baidu.com/s?ie=UTF-8&wd=搜索词</code>多个GET参数用以<code>&</code>分隔<br>如果搜索词不在末尾且非GET请求,如<code>https://xxx.com/s/搜索词.html</code>类似情况,可用PHP页面定制搜索接口<a href="https://blog.lylme.com/archives/lylme_spage.html#souphp">查看教程</a></small>
|
|
|
|
<br>注意:当前仅支持搜索词作为末尾,例如:<code>https://www.baidu.com/s?word=搜索内容</code><br>如果使用GET请求搜索,搜索词不处于末尾,如<code>https://www.baidu.com/s?wd=搜索词&ie=UTF-8</code>可将搜索词参数调换到末尾,如<code>https://www.baidu.com/s?ie=UTF-8&wd=搜索词</code>多个GET参数用以<code>&</code>分隔<br>如果搜索词不在末尾且非GET请求,如<code>https://xxx.com/s/搜索词.html</code>类似情况,可用PHP页面定制搜索接口<a href="https://blog.lylme.com/archives/lylme_spage.html#souphp">查看教程</a></small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label>*搜索引擎主页: (*必填)</label><br>
|
|
|
|
|
|
|
|
<input type="text" class="form-control" name="homepage" value="'.$row['sou_homepage'].'" required placeholder="如:https://www.baidu.com">
|
|
|
|
|
|
|
|
<small class="help-block">例:百度搜索 <code>https://www.baidu.com</code>,<a href="https://www.baidu.com">百度搜索</a></small>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label>搜索引擎手机端地址: (选填) </label><br>
|
|
|
|
<label>搜索引擎手机端地址: (选填) </label><br>
|
|
|
|
<input type="text" class="form-control" name="waplink" value="'.$row['sou_waplink'].'" placeholder="一般情况下留空">
|
|
|
|
<input type="text" class="form-control" name="waplink" value="'.$row['sou_waplink'].'" placeholder="一般情况下留空">
|
|
|
|
<small class="help-block">注:百度搜索的电脑端和手机端不会自适应,需要手动设置手机端,如<code>https://m.baidu.com/s?word=</code><br>如果你添加的搜索区分手机端和PC端,则需要手动设置。<code>一般情况下留空即可</code></small>
|
|
|
|
<small class="help-block">注:百度搜索的电脑端和手机端不会自适应,需要手动设置手机端,如<code>https://m.baidu.com/s?word=</code><br>如果你添加的搜索区分手机端和PC端,则需要手动设置。<code>一般情况下留空即可</code></small>
|
|
|
@ -140,18 +145,19 @@ $name=$_POST['name'];
|
|
|
|
$alias=$_POST['alias'];
|
|
|
|
$alias=$_POST['alias'];
|
|
|
|
$hint=$_POST['hint'];
|
|
|
|
$hint=$_POST['hint'];
|
|
|
|
$link=$_POST['link'];
|
|
|
|
$link=$_POST['link'];
|
|
|
|
|
|
|
|
$homepage=$_POST['homepage'];
|
|
|
|
$waplink=$_POST['waplink'];
|
|
|
|
$waplink=$_POST['waplink'];
|
|
|
|
$color=$_POST['color'];
|
|
|
|
$color=$_POST['color'];
|
|
|
|
$icon=$_POST['icon'];
|
|
|
|
$icon=$_POST['icon'];
|
|
|
|
if($_POST['st']==true){$st=1;}else{$st=0;}
|
|
|
|
if($_POST['st']==true){$st=1;}else{$st=0;}
|
|
|
|
$sou_order = $sousrows+1;
|
|
|
|
$sou_order = $sousrows+1;
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($name) && empty($alias)&& empty($hint) && empty($link) && empty($color) && empty($icon)){
|
|
|
|
if (empty($name) && empty($alias)&& empty($hint) && empty($link)&& empty($homepage) && empty($color) && empty($icon)){
|
|
|
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
|
|
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
|
|
|
} else {
|
|
|
|
} 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
|
|
|
|
$sql="INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_homepage`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES
|
|
|
|
(NULL, '".$alias."', '".$name."', '".$hint."', '".$color."', '".$link."', '".$waplink."', '".$icon."', '".$st."', '".$sou_order."');
|
|
|
|
(NULL, '".$alias."', '".$name."', '".$hint."', '".$color."', '".$link."','".$homepage."', '".$waplink."', '".$icon."', '".$st."', '".$sou_order."');
|
|
|
|
";
|
|
|
|
";
|
|
|
|
|
|
|
|
|
|
|
|
if($DB->query($sql)){
|
|
|
|
if($DB->query($sql)){
|
|
|
@ -171,6 +177,7 @@ $name=$_POST['name'];
|
|
|
|
$alias=$_POST['alias'];
|
|
|
|
$alias=$_POST['alias'];
|
|
|
|
$hint=$_POST['hint'];
|
|
|
|
$hint=$_POST['hint'];
|
|
|
|
$link=$_POST['link'];
|
|
|
|
$link=$_POST['link'];
|
|
|
|
|
|
|
|
$homepage=$_POST['homepage'];
|
|
|
|
$waplink=$_POST['waplink'];
|
|
|
|
$waplink=$_POST['waplink'];
|
|
|
|
$color=$_POST['color'];
|
|
|
|
$color=$_POST['color'];
|
|
|
|
$icon=$_POST['icon'];
|
|
|
|
$icon=$_POST['icon'];
|
|
|
@ -181,7 +188,7 @@ if (empty($name) && empty($alias)&& empty($hint) && empty($link) && empty($color
|
|
|
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
|
|
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
|
|
|
} else {
|
|
|
|
} 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.";";
|
|
|
|
$sql="UPDATE `lylme_sou` SET `sou_alias` = '".$alias."', `sou_name` = '".$name."', `sou_hint` = '".$hint."', `sou_color` = '".$color."', `sou_link` = '".$link."',`sou_homepage` = '".$homepage."', `sou_waplink` = '".$waplink."', `sou_icon` = '".$icon."', `sou_st` = '".$st."', `sou_order` = '".$order."' WHERE `lylme_sou`.`sou_id` = ".$id.";";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($DB->query($sql))
|
|
|
|
if($DB->query($sql))
|
|
|
@ -203,14 +210,14 @@ else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
echo '<div class="alert alert-info">系统共有 <b>'.$sousrows.'</b> 个搜索引擎<br/><a href="./sou.php?set=add" class="btn btn-primary">新增搜索引擎</a></div> <div class="table-responsive">
|
|
|
|
echo '<div class="alert alert-info">系统共有 <b>'.$sousrows.'</b> 个搜索引擎<br/><a href="./sou.php?set=add" class="btn btn-primary">新增搜索引擎</a></div> <div class="table-responsive">
|
|
|
|
<table class="table table-striped">
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead><tr><th>排序权重</th><th>名称</th><th>别名</th><th>地址</th><th>状态</th><th>操作</th></tr></thead>
|
|
|
|
<thead><tr><th>排序权重</th><th>名称</th><th>别名</th><th>地址</th></th><th>主页</th><th>状态</th><th>操作</th></tr></thead>
|
|
|
|
<tbody>';
|
|
|
|
<tbody>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$rs=$DB->query("SELECT * FROM `lylme_sou` ORDER BY `lylme_sou`.`sou_order` ASC");
|
|
|
|
$rs=$DB->query("SELECT * FROM `lylme_sou` ORDER BY `lylme_sou`.`sou_order` ASC");
|
|
|
|
while($res = $DB->fetch($rs))
|
|
|
|
while($res = $DB->fetch($rs))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
echo '<tr><td><b>'.$res['sou_order'].'</b></td><td><b><font color="'.$res['sou_color'].'">'.$res['sou_name'].'</font></b></td><td>'.$res['sou_alias'].'</td><td>'.$res['sou_link'].'</td><td>';
|
|
|
|
echo '<tr><td><b>'.$res['sou_order'].'</b></td><td><b><font color="'.$res['sou_color'].'">'.$res['sou_name'].'</font></b></td><td>'.$res['sou_alias'].'</td><td>'.$res['sou_link'].'</td><td>'.$res['sou_homepage'].'</td><td>';
|
|
|
|
|
|
|
|
|
|
|
|
if($res['sou_st'] == 1){echo '<span class="label label-success">开启</span>';}else{echo '<span class="label label-danger">关闭</span>';}
|
|
|
|
if($res['sou_st'] == 1){echo '<span class="label label-success">开启</span>';}else{echo '<span class="label label-danger">关闭</span>';}
|
|
|
|
|
|
|
|
|
|
|
|