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
<?php
/**
* 课程列表
* $Id: product_category_list.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
* @author zhouhj
* @access public
* @package manager.templates
*/
?>
<b>课程列表(<?=$valid_title?>)</b><br />
<br />
<a class="flatbutton" href="course_list.php?valid=ALL">全部</a>
<a class="flatbutton" href="course_list.php?valid=TRUE">上线中</a>
<a class="flatbutton" href="course_list.php?valid=FALSE">已下架</a>
<br /><br />
<a class="flatbutton" href="course_edit_input.php">添加课程</a>
<br /><br />
<div id="result_list">
<table>
<tr>
<th class="contents_title" width="15%">课程名称</th>
<th class="contents_title" width="10%">封面</th>
<th class="contents_title" width="5%">原价</th>
<th class="contents_title" width="5%">活动价</th>
<th class="contents_title" width="15%">分期设置</th>
<th class="contents_title" width="28%">购买链接</th>
<th class="contents_title" width="5%">首页</th>
<th class="contents_title" width="5%">排序</th>
<th class="contents_title">操作</th>
</tr>
<?
if (count($course_list) > 0) {
foreach ($course_list as $course) {
$valid_title = "上架";
if($course->is_valid) {
$valid_title = "下架";
}
//分期设置
$huabei_string = "";
if($course->is_free3) {
$huabei_string .= "[3期免息]";
} else {
$huabei_string .= "[3期不免息]";
}
if($course->is_free6) {
$huabei_string .= "[6期免息]";
} else {
$huabei_string .= "[6期不免息]";
}
if($course->is_free12) {
$huabei_string .= "[12期免息]";
} else {
$huabei_string .= "[12期不免息]";
}
$url = "http://" . SCHOOL_DOMAIN . "/course_detail.php?course_id=" . $course->id;
//首页显示
$is_top_title = "X";
if($course->is_top) {
$is_top_title = "〇";
}
?>
<tr<?=!$course->is_valid ? " class=\"gray_mask\"" : "" ?>>
<td align="center"><?=htmlspecialchars($course->title) ?></td>
<td align="center">
<?
if(!empty($course->thumbnail)) {
?>
<img src="<?=KoalaHandler::getImageUrl($course->thumbnail, "course", "") ?>" style="height:60px;" />
<?
}
?>
</td>
<td align="right"><?=number_format($course->original_price, 2) ?></td>
<td align="right"><?=number_format($course->price, 2) ?></td>
<td align="right"><?=$huabei_string ?></td>
<td align="left"><?=$url ?></td>
<td align="center"><a class="flatbutton" href="course_change_top.php?id=<?=$course->id ?>"><?=$is_top_title ?></a></td>
<td align="center">
<a class="flatbutton" href="course_change_display_order.php?id=<?=$course->id ?>&type=up">↑</a>
<a class="flatbutton" href="course_change_display_order.php?id=<?=$course->id ?>&type=down">↓</a>
</td>
<td align="center">
<a class="flatbutton" href="course_edit_input.php?id=<?=$course->id ?>">编集</a>
<a class="flatbutton" href="course_change_valid.php?id=<?=$course->id ?>"><?=$valid_title?></a>
</td>
</tr>
<?
}
}
?>
</table>
</div>