96 lines
2.8 KiB
HTML
96 lines
2.8 KiB
HTML
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<title>Title</title>
|
|
|
|
<link rel="stylesheet" href="/public/bootstrap/css/bootstrap.min.css" >
|
|
<script>var siteUrl = '';</script>
|
|
<script src="/public/js/jquery.min.js" type="text/javascript"></script>
|
|
<script src="/public/bootstrap/js/bootstrap.min.js"></script>
|
|
<link href="/public/fontawesome/css/fontawesome-all.css" rel="stylesheet">
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-6 col-6">
|
|
|
|
<form method="get" action="/index.php">
|
|
<input type="hidden" name="app" value="attach" />
|
|
<input type="hidden" name="ac" value="editor" />
|
|
<input type="hidden" name="ts" value="list" />
|
|
<div class="input-group mb-3">
|
|
<input type="text" class="form-control form-control-sm" placeholder="关键词" aria-label="Recipient's username" aria-describedby="button-addon2" name="kw" value="">
|
|
<div class="input-group-append">
|
|
<button class="btn btn-sm btn-outline-secondary" type="submit" id="button-addon2">搜索</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2 col-2">
|
|
</div>
|
|
|
|
<div class="col-md-4 col-4 text-right">
|
|
|
|
<a class="btn btn-sm btn-info" href="/index.php?app=attach&ac=editor&ts=upload">上传新附件</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="page">{$pageUrl}</div>
|
|
|
|
<table class="table table-sm table-bordered table-hover" style="font-size: 14px;">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th>名称</th>
|
|
<th>Size</th>
|
|
<th>积分</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
{loop $attachlist $key $item}
|
|
<tr>
|
|
<td>{$item[attachname]}</td>
|
|
<td>{$item[attachsize]}</td>
|
|
<td>{if $item[pay]==0}<font color="red">Free</font>{else}{$item[pay]}{/if}</td>
|
|
<td>
|
|
<a href="javascript:void('0');" onclick="insertAttach('{tsUrl('attach','show',array('id'=>$item[attachid]))}','{$item[pay]}','{$item[attachname]}')">插入</a>
|
|
</td>
|
|
</tr>
|
|
{/loop}
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
<div class="page">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
//插入附件
|
|
function insertAttach(downurl,pay,attachname){
|
|
|
|
|
|
var html = '<a class="font-weight-bold" target="_blank" href="'+downurl+'">'+attachname+'</a>';
|
|
|
|
self.parent.$('#tseditor').summernote('pasteHTML', html);
|
|
self.parent.$('.ts-attach').removeClass('open').hide();
|
|
self.parent.$('.note-modal-backdrop').hide();
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |