插件代码上传
This commit is contained in:
68
plugin/404/main.php
Normal file
68
plugin/404/main.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
$redirect_url = GetVars('redirect_url', 'POST');
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if ($redirect_url != "" && !preg_match("/^http[s]{0,1}:\/\/.+\.\w+/", $redirect_url)) {
|
||||
$zbp->ShowHint('bad', '自定义 Url 不正确');
|
||||
} else {
|
||||
$zbp->Config('zxd_ctrlcenter')-> plugin_404_redirect_url = $redirect_url;
|
||||
$zbp->SaveConfig('zxd_ctrlcenter');
|
||||
$zbp->ShowHint('good');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!--代码-->
|
||||
<div class="content-box-content">
|
||||
<!--收录设置-->
|
||||
<div id="tab-fetch" class="tab-content default-tab"
|
||||
style="border:none;padding:0px;margin:0;">
|
||||
<div style="clear:both;"></div>
|
||||
<form name="Thx_auto_link_fetch" method="post">
|
||||
<?php if (function_exists('CheckIsRefererValid')) {
|
||||
echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';
|
||||
}
|
||||
?>
|
||||
<table name='base' style="padding:0px;margin:0px;width:100%;">
|
||||
<tr>
|
||||
<th width="20%">
|
||||
<p>
|
||||
<b>配置项</b>
|
||||
</p>
|
||||
</th>
|
||||
<th width="50%">
|
||||
<p>
|
||||
<b>设置</b>
|
||||
</p>
|
||||
</th>
|
||||
<th width="30%">
|
||||
<p>
|
||||
<b>说明</b>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p align="center">
|
||||
<b>重定向链接</b>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<input type="url" id="redirect_url" name="redirect_url"
|
||||
value="<?php if ($zbp->Config('zxd_ctrlcenter')->plugin_404_redirect_url) {
|
||||
echo $zbp->Config('zxd_ctrlcenter')->plugin_404_redirect_url ?: 0;
|
||||
}
|
||||
?>">
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<span align="center">输入重定向的【完整】链接地址</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p></p>
|
||||
<input type="submit" class="button" value="<?php echo $lang['msg']['submit'] ?>" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user