-
Notifications
You must be signed in to change notification settings - Fork 1
/
knowledge.php
41 lines (28 loc) · 950 Bytes
/
knowledge.php
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
<?php
/**
* 本页面核心功能预计
* 问题检索 提问 回答 相似问题 推荐到知识库
*
*/
define('CURSCRIPT', 'user');
require './source/class/class_core.php';
$discuz = C::app();
$discuz->init();
//ajax添加话题标签
if( $_POST['action'] === 'new_topic'){
$topic = C::t('knowledge_topic')->set( array( 'topic_words' => dhtmlspecialchars( trim( $_POST['params']['topic'])) , 'pass' => 0));
echo json_encode( $topic);
exit;
}
if( isset( $_POST['action'])) {
if( 'get_attitude' === $_POST['action']) {
$attitude = C::t('knowledge_answer_attitude')->get_attitude_by_aid( $_POST['params']['aid'] , $_POST['params']['uid']);
echo $attitude['attitude'];
exit;
}else if( 'get_topic' === $_POST['action']) {
}
}
$message = C::t('b_call')->count_newmessage( $_G['uid']);
$mod = $_GET['mod'] ? trim( $_GET['mod']) : 'home';
define('CURMODULE', $mod);
require libfile('knowledge/'.$mod, 'module');