| | |
| | | /** |
| | | * 微课堂搜索页 |
| | | * ============================================================================ |
| | | * 版权所有 2015-2020 风影科技,并保留所有权利。 |
| | | * 网站地址: https://www.fylesson.com |
| | | * 版权所有 2015-2020 ,并保留所有权利。 |
| | | * 网站地址: |
| | | * ---------------------------------------------------------------------------- |
| | | * 这不是一个自由软件,未购买授权用户无论是否用于商业行为都是侵权行为! |
| | | * 允许已购买用户对程序代码进行修改并在授权域名下使用,但是不允许对程序代码以 |
| | | * 任何形式任何目的进行二次发售,作者将依法保留追究法律责任的权力和最终解释权。 |
| | | |
| | | * ============================================================================ |
| | | */ |
| | | |
| | |
| | | $categorylist[$k]['child'] = pdo_fetchall("SELECT * FROM " . tablename($this -> table_category) . " WHERE uniacid=:uniacid AND parentid=:parentid AND search_show=:search_show ORDER BY displayorder DESC", array(':uniacid'=>$uniacid, ':parentid'=>$v['id'],':search_show'=>1)); |
| | | } |
| | | |
| | | /* 知识点分类 */ |
| | | $hot_knowledge = pdo_fetchall("SELECT * FROM " . tablename("fy_lesson_knowledge_point") . " WHERE uniacid=:uniacid AND is_hot=:is_hot AND search_show=:search_show ORDER BY displayorder DESC", array(':uniacid' => $uniacid, ':is_hot' => 1,':search_show'=>1)); |
| | | $knowledgelist = pdo_fetchall("SELECT * FROM " . tablename("fy_lesson_knowledge_point") . " WHERE uniacid=:uniacid AND parentid=:parentid AND search_show=:search_show ORDER BY displayorder DESC", array(':uniacid'=>$uniacid, ':parentid'=>0,':search_show'=>1)); |
| | | |
| | | foreach ($knowledgelist as $k => $v) { |
| | | $knowledgelist[$k]['child'] = pdo_fetchall("SELECT * FROM " . tablename("fy_lesson_knowledge_point") . " WHERE uniacid=:uniacid AND parentid=:parentid AND search_show=:search_show ORDER BY displayorder DESC", array(':uniacid'=>$uniacid, ':parentid'=>$v['id'],':search_show'=>1)); |
| | | } |
| | | |
| | | if ($op == 'display') { |
| | | |
| | | $keyword = trim($_GPC['keyword']); |
| | |
| | | $sort = trim($_GPC['sort']); |
| | | $attr1 = $_GPC['attr1']; |
| | | $attr2 = $_GPC['attr2']; |
| | | $know_id = $_GPC['knowledge_id']; |
| | | |
| | | $condition = " a.uniacid = '{$uniacid}' AND a.status=1 "; |
| | | $order = " ORDER BY a.displayorder DESC, a.id DESC "; |
| | |
| | | $catname = $common['page_title']['search'] ? $common['page_title']['search'] : '全部分类'; |
| | | } |
| | | |
| | | /* 按知识点搜索 */ |
| | | if ($know_id > 0) { |
| | | $condition .= " AND (a.knowledge_pid='{$know_id}' OR a.knowledge_id='{$know_id}')"; |
| | | $nowknow = pdo_fetch("SELECT name FROM " . tablename("fy_lesson_knowledge_point") . " WHERE uniacid='{$uniacid}' AND id='{$know_id}'"); |
| | | $knowledgename = $nowknow['name']; |
| | | } else { |
| | | $knowledgename = $common['page_title']['search'] ? $common['page_title']['search'] : '知识点'; |
| | | } |
| | | |
| | | /* 综合排序 */ |
| | | if ($sort == 'general') { |
| | | $condition .= " AND a.lesson_type=0"; |
| | |
| | | } elseif ($sort == 'live') { |
| | | $condition .= " AND a.lesson_type=3"; |
| | | $sortname = '直播课程'; |
| | | } elseif ($sort == 'knowledge') { |
| | | $condition .= " AND a.lesson_type=5"; |
| | | $sortname = '知识点课'; |
| | | } elseif ($sort == 'price') { |
| | | $order = " ORDER BY a.price ASC, a.displayorder DESC "; |
| | | $sortname = '价格优先'; |