@@ -134,7 +134,7 @@ if ($dopost == 'quick') { | |||||
$keywords = Html2Text($keywords, 1); | $keywords = Html2Text($keywords, 1); | ||||
$apikey = Html2Text($apikey, 1); | $apikey = Html2Text($apikey, 1); | ||||
if ($apienabled == 1 && empty($apikey)) { | if ($apienabled == 1 && empty($apikey)) { | ||||
ShowMsg("API密钥不能为空", "-1"); | |||||
ShowMsg("跨站调用秘钥不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($ispart != 2) { | if ($ispart != 2) { | ||||
@@ -343,10 +343,10 @@ | |||||
<td><textarea name="description" id="description" class="admin-textarea-sm"></textarea>(标签“{dede:field.description/}”调用)</td> | <td><textarea name="description" id="description" class="admin-textarea-sm"></textarea>(标签“{dede:field.description/}”调用)</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>是否支持跨站数据:</td> | |||||
<td>是否支持跨站调用:</td> | |||||
<td> | <td> | ||||
<input type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||||
<span onclick="makeAPIKey()" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-refresh"></i></span> | |||||
<input type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入跨站调用秘钥"> | |||||
<span class="btn btn-success btn-sm mr-2" title="更新秘钥" onclick="makeAPIKey()"><i class="fa fa-refresh"></i></span> | |||||
<label><input type="radio" name="apienabled" value="1"> 支持</label> | <label><input type="radio" name="apienabled" value="1"> 支持</label> | ||||
<label><input type="radio" name="apienabled" value="0" checked> 不支持</label> | <label><input type="radio" name="apienabled" value="0" checked> 不支持</label> | ||||
</td> | </td> | ||||
@@ -316,10 +316,10 @@ | |||||
<td><textarea name="description" id="description" class="admin-textarea-sm"><?php echo $myrow['description']?></textarea>(标签“{dede:field.description/}”调用)</td> | <td><textarea name="description" id="description" class="admin-textarea-sm"><?php echo $myrow['description']?></textarea>(标签“{dede:field.description/}”调用)</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>是否支持跨站数据:</td> | |||||
<td>是否支持跨站调用:</td> | |||||
<td> | <td> | ||||
<input value="<?php echo $myrow['apikey']?>" type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入字符串类秘钥"> | |||||
<span onclick="makeAPIKey()" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-refresh"></i></span> | |||||
<input value="<?php echo $myrow['apikey']?>" type="text" name="apikey" id="apikey" class="admin-input-md" placeholder="请输入跨站调用秘钥"> | |||||
<span class="btn btn-success btn-sm mr-2" title="更新秘钥" onclick="makeAPIKey()"><i class="fa fa-refresh"></i></span> | |||||
<label><input type="radio" name="apienabled" value="1" <?php if ($myrow['apienabled']=="1") echo "checked='1'";?>> 支持</label> | <label><input type="radio" name="apienabled" value="1" <?php if ($myrow['apienabled']=="1") echo "checked='1'";?>> 支持</label> | ||||
<label><input type="radio" name="apienabled" value="0" <?php if ($myrow['apienabled']=="0") echo "checked='1'";?>> 不支持</label> | <label><input type="radio" name="apienabled" value="0" <?php if ($myrow['apienabled']=="0") echo "checked='1'";?>> 不支持</label> | ||||
</td> | </td> | ||||
@@ -29,7 +29,7 @@ | |||||
<div class="row"> | <div class="row"> | ||||
<div class="col-md-12"> | <div class="col-md-12"> | ||||
<?php | <?php | ||||
if (count($arrMsg) > 0){ | |||||
if (count($arrMsg) > 0) { | |||||
foreach($arrMsg as $msg){ | foreach($arrMsg as $msg){ | ||||
?> | ?> | ||||
<div class="alert alert-warning"><?php echo $msg ?></div> | <div class="alert alert-warning"><?php echo $msg ?></div> | ||||
@@ -47,7 +47,7 @@ | |||||
<legend class="text-success">数据库设置</legend> | <legend class="text-success">数据库设置</legend> | ||||
<hr> | <hr> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<label for="dbtype" class="form-label">数据库类型<i class="ml-2 fa fa-question-circle text-warning" data-toggle="tooltip" title="数据库类型一般为MySQL,类型SQLite用于开发调试,不建议生产中使用"></i></label> | |||||
<label for="dbtype" class="form-label">数据库类型<i class="fa fa-question-circle text-warning ml-2" data-toggle="tooltip" title="数据库类型一般为MySQL,类型SQLite用于开发调试,不建议生产中使用"></i></label> | |||||
<select id="dbtype" name="dbtype" class="form-control form-select"> | <select id="dbtype" name="dbtype" class="form-control form-select"> | ||||
<option value="mysql" selected>MySQL</option> | <option value="mysql" selected>MySQL</option> | ||||
<?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?> | <?php if (extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?> | ||||