1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* 单词列表
* $Id: product_category_list.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author zhouhj
* @access public
* @package manager.templates
*/
?>
<script type="text/javascript">
function copyToClipBoard(copyCotent) {
document.addEventListener('copy', save); // 监听浏览器copy事件
document.execCommand('copy'); // 执行copy事件,这时监听函数会执行save函数。
document.removeEventListener('copy', save); // 移除copy事件
// 保存方法
function save(e) {
e.clipboardData.setData('text/plain', copyCotent); // 剪贴板内容设置
e.preventDefault();
}
}
</script>
<b>词集列表</b><br />
<br />
<form name="search_input" method="post" action="?">
<table>
<tr>
<td>系列</td>
<td>
<select name="theme_type">
<?
foreach ($theme_type_list as $theme_type_obj) {
?>
<option value="<?=$theme_type_obj->id ?>"<?=$theme_type_obj->id == $theme_type ? " selected " : "" ?>><?=$theme_type_obj->title ?></option>
<?
}
?>
</select>
</td>
<td><input type="button" value="搜索" onclick="searchWordTheme()" /></td>
</tr>
</table>
</form>
<a class="flatbutton" href="word_theme_edit.php">添加词集</a>
<br /><br />
<div id="result_list">
<table>
<tr>
<th class="contents_title" width="12%">类型</th>
<th class="contents_title" width="12%">名称</th>
<th class="contents_title" width="15%">封面</th>
<th class="contents_title" width="10%">排序</th>
<th class="contents_title" width="10%">单词数量</th>
<th class="contents_title" width="25%">备注</th>
<th class="contents_title">操作</th>
</tr>
<?
if (count($word_theme_list) > 0) {
foreach ($word_theme_list as $word_theme_mst) {
$word_count = WordHandler::getWordCount($word_theme_mst->id);
$url = "http://" . HOST_NAME . "/words.php?theme_id=" . $word_theme_mst->id;
$theme_type_title = WordThemeType::getTitleById($word_theme_mst->theme_type);
?>
<tr>
<td align="center"><?=$theme_type_title ?></td>
<td align="center"><?=$word_theme_mst->title ?></td>
<td align="center">
<?
if(!empty($word_theme_mst->front)) {
?>
<img src="<?=KoalaHandler::getImageUrl($word_theme_mst->front, "theme", "") ?>" style="width:60px;" />
<?
}
?>
</td>
<td align="center">
<a class="flatbutton" href="word_theme_change_display_order.php?id=<?=$word_theme_mst->id ?>&type=up">↑</a>
<a class="flatbutton" href="word_theme_change_display_order.php?id=<?=$word_theme_mst->id ?>&type=down">↓</a>
</td>
<td align="center"><?=$word_count ?></td>
<!--
<td align="left">
<?=$url?>
<input type="button" value="复制" class="button_width_normal" onClick="copyToClipBoard('<?=$url?>');"/>
</td>
-->
<td align="left"><?=htmlspecialchars($word_theme_mst->comment) ?></td>
<td align="center">
<a class="flatbutton" href="word_theme_edit.php?id=<?=$word_theme_mst->id ?>">编集</a>
<a class="flatbutton" href="word_theme_dat_edit.php?id=<?=$word_theme_mst->id ?>">单词设定</a>
</td>
</tr>
<?
}
}
?>
</table>
</div>