begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
<?php
defined('IN_TS') or die('Access Denied.');
return array(
'name' => '更多导航插件',
'version' => '1.0',
'desc' => '扩展网站顶部主导航更多导航链接',
'url' => 'http://www.thinksaas.cn',
'email' => 'thinksaas@qq.com',
'author' => '邱君',
'author_url' => 'http://www.thinksaas.cn',
'isedit' => '1',
);
+43
View File
@@ -0,0 +1,43 @@
<?php
defined('IN_TS') or die('Access Denied.');
//插件编辑
switch($ts){
case "set":
$strAbout = fileRead('plugins/pubs/morenav/about.php');
$arrNav = fileRead('data/plugins_pubs_morenav.php');
if($arrNav==''){
$arrNav = $GLOBALS['tsMySqlCache']->get('plugins_pubs_morenav');
}
include template('edit_set','morenav');
break;
case "do":
$arrNavName = $_POST['navname'];
$arrNavUrl = $_POST['navurl'];
$arrNewPage = $_POST['newpage'];
foreach($arrNavName as $key=>$item){
$navname = tsTrim($item);
$navurl = tsTrim($arrNavUrl[$key]);
$newpage = tsTrim($arrNewPage[$key]);
if($navname && $navurl){
$arrNav[] = array(
'navname' => $navname,
'navurl' => $navurl,
'newpage' => $newpage,
);
}
}
fileWrite('plugins_pubs_morenav.php','data',$arrNav);
$tsMySqlCache->set('plugins_pubs_morenav',$arrNav);
header('Location: '.SITE_URL.'index.php?app=pubs&ac=plugin&plugin=morenav&in=edit&ts=set');
break;
}
+38
View File
@@ -0,0 +1,38 @@
{php include pubTemplate("header_admin")}
<script>
function insertMenu(){
$("#before").before('<tr><td><input name="navname[]" /></td><td><input name="navurl[]" style="width:350px;" /></td><td><input type="checkbox" name="newpage[]" value="1">打开</td></tr>');
}
</script>
<div class="midder">
{php include pubTemplate("plugin_menu")}
<form method="POST" action="{SITE_URL}index.php?app=pubs&ac=plugin&plugin=morenav&in=edit&ts=do">
<table class="table table-hover">
<thead class="thead-light">
<tr><th>链接名字</th><th>链接URL</th><th>新页面打开</th></tr>
</thead>
<tbody>
{loop $arrNav $key $item}
<tr><td><input name="navname[]" value="{$item['navname']}" /></td><td><input name="navurl[]" style="width:350px;" value="{$item['navurl']}" /></td><td><input type="checkbox" name="newpage[]" value="1" {if $item['newpage']}checked{/if}>打开</td></tr>
{/loop}
<tr id="before"><td><input type="submit" value="提 交" /></td><td><a href="javascript:void('0');" onclick="insertMenu();">点我增加链接</a>(说明:如需删除某一项,请将要删除的某项清空提交即可。)</td>
<td></td>
</tr>
</tbody>
</table>
</form>
</div>
{php include pubTemplate("footer_admin")}
+10
View File
@@ -0,0 +1,10 @@
<li class="nav-item active dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
更多
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{loop $arrNav $key $item}
<a class="dropdown-item" {if $item['newpage']}target="_blank"{/if} href="{$item['navurl']}">{$item['navname']}</a>
{/loop}
</div>
</li>
+11
View File
@@ -0,0 +1,11 @@
<?php
defined('IN_TS') or die('Access Denied.');
//头部更多导航插件
function morenav(){
$arrNav = fileRead('data/plugins_pubs_morenav.php');
if($arrNav==''){
$arrNav = $GLOBALS['tsMySqlCache']->get('plugins_pubs_morenav');
}
include template('morenav','morenav');
}
addAction('pub_header_nav','morenav');