Commit 4e7774e7 by biao

1

parent 44bb6a12
<?php
//加载
require_once ("../manager_include.inc");
// 参数取得
$tag = ParamUtil::getRequestString("tag");
$selected_tags = ParamUtil::getRequestString("selected_tags");//##分割的字符串
//查询
$param = array();
$param["tag"] = $tag;
$param["delete_flg"] = false;
$tmp_list = ArticleTagsDat::getList($param);
if(empty($tmp_list)) {
//添加新标签
$tmp = new ArticleTagsDat();
$tmp->tag = $tag;
$tmp->click_count = 0;
$tmp->save();
}
//查询所有标签
$param = array();
$param["delete_flg"] = false;
$tag_list = ArticleTagsDat::getList($param, "id", "asc");
ob_start()
?>
<?
if(!empty($tag_list)) {
foreach($tag_list as $tagObj) {
$class_name = "tag";
if(!empty($selected_tags) && strpos($selected_tags,"##" . $tagObj->tag) !== false) {
$class_name = "tag_selected";
}
?>
<p class="<?=$class_name?>" onClick="clickTag('<?=$tagObj->tag?>');"><?=$tagObj->tag?></p>
<?
}
}
?>
<?
$html = ob_get_contents();
ob_end_clean();
print json_encode(array("html"=>$html));
<?php
// 发送短信验证码
require_once ("../manager_include.inc");
$user_id = ParamUtil::getRequestNumber("user_id", 0);
$user_mst = UserMst::getById($user_id);
ErrorLogger::doOutput("Koala...ajax_get_user_comments.php....user_id=" . $user_id, 0);
//回访记录列表
$param = array();
$param["delete_flg"] = false;
$param["user_id"] = $user_id;
$user_comment_list = UserCommentDat::getList($param, "id", "desc");
$index = 0;
ob_start();
foreach($user_comment_list as $tmp) {
$index++;
$account_mst = AccountMst::getById($tmp->account_id);
?>
<div style="display:flex;">
<div><?=$tmp->registration_date?></div>
<div><?=$account_mst->name ?>?></div>
<div><?=$tmp->comment ?>?></div>
<div><?=UserStatus::getTitleById($tmp->status); ?></div>
</div>
<?
}
?>
<div style="display:flex;">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<?
$html = ob_get_contents();
ob_end_clean();
ErrorLogger::doOutput("Koala...ajax_get_user_comments.php....html=" . $html, 0);
print json_encode(array("html"=>$html));
?>
\ No newline at end of file
<?php
//加载
require_once ("../manager_include.inc");
// 参数取得
$login = ParamUtil::getRequestString("login");
$password = ParamUtil::getRequestString("password");
ErrorLogger::doOutput("Koala...ajax_login.php....Start.", 0);
ErrorLogger::doOutput("Koala...ajax_login.php....login=" . $login, 0);
ErrorLogger::doOutput("Koala...ajax_login.php....password=" . $password, 0);
$login = ParamUtil::getRequestString("login");
$password = ParamUtil::getRequestString("password");
$login_ok = false;
if (!empty($login) && !empty($password)) {
$_account = AccountHandler::getAccountByLoginPassword($login, $password);
if ($_account != null) {
$_SESSION["account"] = $_account;
$login_ok = true;
}
}
ErrorLogger::doOutput("Koala...ajax_login.php....End.", 0);
if ($login_ok) {
responseOK("登陆成功!");
} else {
responseNG("登陆失败!");
}
function responseNG($message) {
$result = array("status"=>"NG", "message"=>$message);
print json_encode($result);
exit;
}
function responseOK($message) {
$result = array("status"=>"OK", "message"=>$message);
print json_encode($result);
exit;
}
?>
<?php
//加载
require_once ("../manager_include.inc");
// 参数取得
$theme_id = ParamUtil::getRequestNumber("theme_id", 0);
$word_id = ParamUtil::getRequestNumber("word_id", 0);
$operate = ParamUtil::getRequestString("operate");
if($theme_id==0 || $word_id==0) {
exit;
}
//添加
if($operate == "add") {
//检查是否已经存在
$param = array();
$param["theme_id"] = $theme_id;
$param["word_id"] = $word_id;
$param["delete_flg"] = false;
$theme_word_list = WordThemeDat::getList($param, "display_order", "asc", 0, 1);
if(empty($theme_word_list)) {
$word_count = WordHandler::getWordCount($theme_id);
$theme_word_dat = new WordThemeDat();
$theme_word_dat->theme_id = $theme_id;
$theme_word_dat->word_id = $word_id;
$theme_word_dat->display_order = $word_count + 1;
$theme_word_dat->save();
}
}
//删除
if($operate == "remove") {
$param = array();
$param["theme_id"] = $theme_id;
$param["word_id"] = $word_id;
$param["delete_flg"] = false;
$theme_word_list = WordThemeDat::getList($param, "display_order", "asc", 0, 1);
if(!empty($theme_word_list)) {
$theme_word_list[0]->delete_flg = true;
$theme_word_list[0]->save();
}
}
//查找已经设定的单词列表
$param = array();
$param["theme_id"] = $theme_id;
$param["delete_flg"] = false;
$theme_word_list = WordThemeDat::getList($param, "display_order", "asc");
ob_start()
?>
<?
if(!empty($theme_word_list)) {
$index = 0;
foreach($theme_word_list as $theme_word) {
$index++;
$word_dat = WordDat::getById($theme_word->word_id);
?>
<div class="theme_word_item" onClick="removeWord('<?=$theme_id?>','<?=$theme_word->word_id?>');"><?=$index?>.<?=$word_dat->word?></div>
<?
}
}
?>
<?
$html = ob_get_contents();
ob_end_clean();
print json_encode(array("html"=>$html));
<?php
//加载
require_once ("../manager_include.inc");
// 参数取得
$mobile = ParamUtil::getRequestString("mobile");
$sql = "select u.* from user_mst u, user_buy_couse_dat ub where u.delete_flg=false and ub.delete_flg=false and ub.status='FINISH' and u.id=ub.user_id and u.mobile like '%{$mobile}%'";
$db = &KoalaDBManager::getInstance();
$data_list = $db->executeQuery($sql);
ob_start()
?>
<?
if(!empty($data_list)) {
$index = 0;
foreach($data_list as $data) {
$index++;
$user_id = $data["id"];
$nickname = $data["nickname"];
?>
<div class="search_user_item" onClick="addUser('<?=$user_id?>','<?=$nickname?>');"><?=$index?>.<?=$nickname?></div>
<?
}
}
?>
<?
$html = ob_get_contents();
ob_end_clean();
print json_encode(array("html"=>$html));
<?php
//加载
require_once ("../manager_include.inc");
// 参数取得
$theme_id = ParamUtil::getRequestString("theme_id");
$key_word = ParamUtil::getRequestString("key_word");
$word_dat_list = WordHandler::searchWords($key_word);
ob_start()
?>
<?
if(!empty($word_dat_list)) {
$index = 0;
foreach($word_dat_list as $word_dat) {
$index++;
$word_id = $word_dat["id"];
$word = $word_dat["word"];
?>
<div class="theme_word_item" onClick="addWord('<?=$theme_id?>','<?=$word_id?>');"><?=$index?>.<?=$word?></div>
<?
}
}
?>
<?
$html = ob_get_contents();
ob_end_clean();
print json_encode(array("html"=>$html));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment