Beispiel #1
0
 case "content":
     break;
 case "sale":
     $arrStatus = goods_shop_class::get_order_status();
     $p['url'] = $strUrl . "&view=sale&intPagesize=" . $p['page_size'] . "&intPage=" . $p['page'];
     $p['anchor'] = '#pageT';
     $w = array();
     $w['a.order_status'] = "confirm";
     $t == 'today' and $ext_condit = 'day(date(from_unixtime(a.order_time)))=day(curdate())';
     $arrSaleArr = keke_shop_class::get_sale_info($intId, $w, $p, " a.order_time desc", $ext_condit);
     $arrSaleList = $arrSaleArr['sale_info'];
     $intCount = count($arrSaleList);
     $pages = $arrSaleArr['pages'];
     break;
 case "comment":
     $objComment = keke_comment_class::get_instance('service');
     $arrCommentDatas = $objComment->get_comment_list($intId, $strUrl, $intPage);
     $arrCommentLists = $arrCommentDatas['data'];
     $strPage = $arrCommentDatas['pages'];
     $arrReplyLists = $objComment->get_reply_info($id);
     break;
 case "mark":
     $arrMarkCount = keke_shop_class::get_mark_count($model_code, $sid);
     $p['url'] = $strUrl . "&view=mark&intPagesize=" . $p['page_size'] . "&intPage=" . $p['page'];
     $p['anchor'] = '#pageT';
     $w['model_code'] = $arrModelInfo['model_code'];
     $w['origin_id'] = $intId;
     $w['mark_status'] = $st;
     $w['mark_type'] = $ut;
     $arrMark = keke_user_mark_class::get_mark_info($w, $p, ' mark_id desc ', 'mark_status>0');
     $arrMarkInfo = $arrMark['mark_info'];
Beispiel #2
0
     $strPages = $arrWorkArrs['pages'];
     $arrWorkInfo = $arrWorkArrs['work_info'];
     $arrMark = $arrWorkArrs['mark'];
     if (is_array($arrWorkInfo)) {
         foreach ($arrWorkInfo as $k => $v) {
             $arrFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and origin_id = %d and keep_type = "work"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($v['work_id']), intval($arrTaskInfo['task_id'])));
             if ($arrFavorite) {
                 $arrWorkInfo[$k]['favorite'] = true;
             }
             unset($arrFavorite);
         }
     }
     $arrMark = $arrWorkArrs['mark'];
     break;
 case 'comment':
     $objComment = keke_comment_class::get_instance('task');
     $strUrl .= "&view=comment";
     $arrCommentDatas = $objComment->get_comment_list($id, $strUrl, $page);
     $arrCommentLists = $arrCommentDatas['data'];
     $strPage = $arrCommentDatas['pages'];
     $arrReplyLists = $objComment->get_reply_info($id);
     break;
 case "mark":
     $p['page'] = $page;
     $p['page_size'] = $pagesize;
     $p['url'] = $strUrl . "&view=" . $view . "&page=" . $p['page'] . "&pagesize=" . ($p['page_size'] .= "&s=" . $s);
     $p['anchor'] = '#detail';
     $w['model_code'] = $arrModelInfo['model_code'];
     $w['origin_id'] = $id;
     in_array($s, array(1, 2, 3)) and $w['mark_status'] = $s;
     $s == 101 and $w['mark_type'] = 2;
Beispiel #3
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$objId = intval($objId);
$cid = intval($cid);
$pId = intval($pId);
$content = strval($content);
$objComment = keke_comment_class::get_instance($objType);
switch ($action) {
    case 'add':
    case 'reply':
        $arrData = array("obj_id" => $objId, "origin_id" => $originId, "obj_type" => $objType, "p_id" => $pId, "uid" => $gUid, "username" => $gUserInfo['username'], "content" => kekezu::escape($content), "on_time" => time());
        $intRes = $objComment->save_comment($arrData, $objId, $pId);
        if (!in_array($intRes, array(-1, -2, -3))) {
            $arrCommentInfo = $objComment->get_comment_info($intRes);
            if ($action === 'reply') {
                $arrReCommentInfo = $objComment->get_comment_info($pId);
                $arrCommentInfo['parentcomment'] = $arrReCommentInfo;
            }
            require $kekezu->_tpl_obj->template('taskcomment');
            die;
        }
        echo '你操作的太频繁了,请稍后再试!';
        die;
        break;
    case 'del':
        $arrCommentInfo = $objComment->get_comment_info($cid);
        if ($gUid == ADMIN_UID || $gUserInfo['group_id'] == 7 || $arrCommentInfo['uid'] == $gUid) {
            $intRes = $objComment->del_comment($cid, $objId, $arrCommentInfo['p_id']);
            kekezu::show_msg('删除成功', null, null, null, 'ok');
        }