if (isset($output['rmessage_list'][$val['message_id']])) { ?> <dd> <?php foreach ($output['rmessage_list'][$val['message_id']] as $v) { ?> <dl class="re-content"> <dt><a href="index.php?act=member_snshome&mid=<?php echo $v['from_member_id']; ?> "><?php echo $v['from_member_name']; echo $lang['sns_reply'] . $lang['nc_colon']; ?> </a><span><?php echo uk86_parsesmiles($v['message_body']); ?> </span></dt> <dd data-param="{'msgid':'<?php echo $v['message_id']; ?> '}"><span class="time"><?php echo $v['message_time']; ?> </span></dd> </dl> <?php } ?> </dd> <?php
/** * 短消息回复保存 * * @param * @return */ public function savereplyOp() { //查询会员是否允许发送站内信 $isallowsend = $this->allowSendMessage($_SESSION['member_id']); if (!$isallowsend) { if ($_GET['inajax'] == 1) { showDialog(Uk86Language::uk86_get('home_message_noallowsend')); } else { uk86_showMessage(Uk86Language::uk86_get('home_message_noallowsend'), 'index.php?act=member_message&op=message', 'html', 'error'); } } if ($_POST['form_submit'] == 'ok') { $message_id = intval($_POST["message_id"]); if ($message_id <= 0) { uk86_showMessage(Uk86Language::uk86_get('wrong_argument'), 'index.php?act=member_message&op=message', 'html', 'error'); } $obj_validate = new Uk86Validate(); $obj_validate->validateparam = array(array("input" => $_POST["msg_content"], "require" => "true", "message" => Uk86Language::uk86_get('home_message_reply_content_null'))); $error = $obj_validate->uk86_validate(); if ($error != '') { if ($_GET['inajax'] == 1) { showDialog(Uk86Language::uk86_get('error')); } else { uk86_showMessage(Uk86Language::uk86_get('error') . $error, '', 'html', 'error'); } } $model_message = Model('message'); //查询站内信 $param = array(); $param['message_id'] = "{$message_id}"; $param['no_message_state'] = "2"; //未删除 $message_info = $model_message->getRowMessage($param); if (empty($message_info)) { if ($_GET['inajax'] == 1) { showDialog(Uk86Language::uk86_get('home_message_no_record')); } else { uk86_showMessage(Uk86Language::uk86_get('home_message_no_record') . $error, '', 'html', 'error'); } } //不能回复自己的站内信 if ($message_info['from_member_id'] == $_SESSION['member_id']) { uk86_showMessage(Uk86Language::uk86_get('home_message_no_record'), '', 'html', 'error'); } $insert_arr = array(); if ($message_info['message_parent_id'] > 0) { $insert_arr['message_parent_id'] = $message_info['message_parent_id']; } else { $insert_arr['message_parent_id'] = $message_info['message_id']; } $insert_arr['from_member_id'] = $_SESSION['member_id']; $insert_arr['from_member_name'] = $_SESSION['member_name']; $insert_arr['member_id'] = $message_info['from_member_id']; $insert_arr['to_member_name'] = $message_info['from_member_name']; $insert_arr['msg_content'] = $_POST['msg_content']; $insert_state = $model_message->saveMessage($insert_arr); if ($insert_state) { //更新父类站内信更新时间 $update_arr = array(); $update_arr['message_update_time'] = time(); $update_arr['message_open'] = 1; $model_message->updateCommonMessage($update_arr, array('message_id' => "{$insert_arr['message_parent_id']}")); } if ($_GET['inajax'] == 1) { $insert_arr['msg_id'] = $insert_state; if (strtoupper(CHARSET) == 'GBK') { $insert_arr['msg_content'] = Uk86Language::uk86_getUTF8($insert_arr['msg_content']); } $insert_arr['msg_content'] = uk86_parsesmiles($insert_arr['msg_content']); $data = json_encode($insert_arr); $js = "replyMsgSuccess(" . $data . ")"; showDialog(Uk86Language::uk86_get('home_message_send_success'), '', 'succ', $js); } else { uk86_showMessage(Uk86Language::uk86_get('home_message_send_success'), 'index.php?act=member_message&op=privatemsg'); } } else { if ($_GET['inajax'] == 1) { showDialog(Uk86Language::uk86_get('home_message_reply_command_wrong')); } else { uk86_showMessage(Uk86Language::uk86_get('home_message_reply_command_wrong'), '', 'html', 'error'); } } }
echo $lang['sns_original_comment']; echo $v['trace_orgcommentcount'] > 0 ? "({$v['trace_orgcommentcount']})" : ''; ?> </a></span> </div> <?php } ?> <?php } ?> </div> <?php } else { ?> <?php echo uk86_parsesmiles($v['trace_content']); ?> <?php } ?> </dd> <dd> <span class="goods-time fl"><?php echo date('Y-m-d H:i', $v['trace_addtime']); ?> </span> <span class="fl ml10"><?php echo uk86_snsShareFrom($v['trace_from']); ?> </span> <span class="fr"><a href="javascript:void(0);" nc_type="fd_forwardbtn" data-param='{"txtid":"<?php
echo UPLOAD_SITE_URL . '/' . ATTACH_AVATAR . DS . $v['scomm_memberavatar']; } else { echo UPLOAD_SITE_URL . '/' . ATTACH_COMMON . DS . C('default_user_portrait'); } ?> " onload="javascript:DrawImage(this,30,30);"></a> <div class="detail"> <p class="words"><a target="_blank" href="index.php?act=member_snshome&mid=<?php echo $v['scomm_memberid']; ?> " class="name"><?php echo $v['scomm_membername']; ?> </a><?php echo $lang['nc_colon']; echo uk86_parsesmiles($v['scomm_content']); ?> </p> <p class="other"> <?php if ($_SESSION['member_id'] == $v['scomm_memberid']) { ?> <span class="opt"><a href="javascript:void(0);" nc_type="scomment_del" data-param='{"scid":"<?php echo $v['scomm_id']; ?> ","stid":"<?php echo $v['strace_id']; ?> "}'><?php echo $lang['nc_delete']; ?>
} else { ?> <a href="<?php echo $cms_url . DS . 'index.php?act=' . $output['type_array'][$value['comment_type']]['key'] . '&op=' . $output['type_array'][$value['comment_type']]['key'] . '_detail&' . $output['type_array'][$value['comment_type']]['key'] . '_id=' . $value['comment_object_id']; ?> " target="_blank"> <?php echo $value['comment_object_id']; ?> </a> <?php } ?> </td> <td><?php echo uk86_parsesmiles($value['comment_message']); ?> </td> <td><a href="###" onclick="submit_delete(<?php echo $value['comment_id']; ?> )"><?php echo $lang['nc_del']; ?> </a></td> </tr> <?php } ?> <?php } else {
</dd> </dl> <?php } else { ?> <dl> <dt class="user_log">会员:<?php echo $val['f_name']; ?> </dt> <dd class="time"><?php echo date("Y-m-d H:i:s", $val['add_time']); ?> </dd> <dd class="content"><?php echo uk86_parsesmiles($val['t_msg']); ?> </dd> </dl> <?php } ?> </li> <?php } ?> <?php } ?> <?php } else {
<span class="fd-handle"> <p class="hover-arrow"><i></i><a href="javascript:void(0);" nc_type="sd_del" data-param='{"txtid":"<?php echo $output['strace_info']['strace_id']; ?> ","type":"href"}'><?php echo $lang['nc_delete']; ?> </a></p> </span> <?php } ?> </dt> <dd> <?php echo uk86_parsesmiles($output['strace_info']['strace_content']); ?> </dd> <dd> <span class="goods-time fl"><?php echo date('Y-m-d H:i', $output['strace_info']['strace_time']); ?> </span> <span class="fr"> <a href="javascript:void(0);" nc_type="sd_forwardbtn" data-param='{"txtid":"<?php echo $output['strace_info']['strace_id']; ?> "}'><?php echo $lang['sns_forward']; ?> </a> | <a href="javascript:void(0);" nc_type="sd_commentbtn" data-param='{"txtid":"<?php
/** * 评论保存 **/ public function comment_saveOp() { $data = array(); $data['result'] = 'true'; $comment_object_id = intval($_POST['comment_object_id']); $comment_type = $_POST['comment_type']; $model_name = ''; $count_field = ''; switch ($comment_type) { case 'article': $comment_type = self::ARTICLE; $model_name = 'cms_article'; $count_field = 'article_comment_count'; $comment_object_key = 'article_id'; break; case 'picture': $comment_type = self::PICTURE; $model_name = 'cms_picture'; $count_field = 'picture_comment_count'; $comment_object_key = 'picture_id'; break; default: $comment_type = 0; break; } if ($comment_object_id <= 0 || empty($comment_type) || empty($_POST['comment_message'])) { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('wrong_argument'); self::echo_json($data); } if (!empty($_SESSION['member_id'])) { $param = array(); $param['comment_type'] = $comment_type; $param["comment_object_id"] = $comment_object_id; if (strtoupper(CHARSET) == 'GBK') { $param['comment_message'] = Uk86Language::uk86_getGBK(trim($_POST['comment_message'])); } else { $param['comment_message'] = trim($_POST['comment_message']); } $param['comment_member_id'] = $_SESSION['member_id']; $param['comment_time'] = time(); $model_comment = Model('cms_comment'); if (!empty($_POST['comment_id'])) { $comment_detail = $model_comment->getOne(array('comment_id' => $_POST['comment_id'])); if (empty($comment_detail['comment_quote'])) { $param['comment_quote'] = $_POST['comment_id']; } else { $param['comment_quote'] = $comment_detail['comment_quote'] . ',' . $_POST['comment_id']; } } else { $param['comment_quote'] = ''; } $result = $model_comment->save($param); if ($result) { //评论计数加1 $model = Model($model_name); $update = array(); $update[$count_field] = array('exp', $count_field . '+1'); $condition = array(); $condition[$comment_object_key] = $comment_object_id; $model->modify($update, $condition); //返回信息 $data['result'] = 'true'; $data['message'] = Uk86Language::uk86_get('nc_common_save_succ'); $data['member_name'] = $_SESSION['member_name'] . Uk86Language::uk86_get('nc_colon'); $data['member_avatar'] = uk86_getMemberAvatar($_SESSION['member_avatar']); $data['member_link'] = SITEURL . DS . 'index.php?act=member_snshome&mid=' . $_SESSION['member_id']; $data['comment_message'] = uk86_parsesmiles(stripslashes($param['comment_message'])); $data['comment_time'] = date('Y-m-d H:i:s', $param['comment_time']); $data['comment_id'] = $result; } else { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('nc_common_save_fail'); } } else { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('no_login'); } self::echo_json($data); }
/** * 评论保存 **/ public function comment_saveOp() { $data = array(); $data['result'] = 'true'; $comment_id = intval($_POST['comment_id']); $comment_type = self::get_channel_type($_GET['type']); if ($comment_id <= 0 || empty($comment_type) || empty($_POST['comment_message']) || mb_strlen($_POST['comment_message']) > 140) { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('wrong_argument'); self::echo_json($data); } if (!empty($_SESSION['member_id'])) { $param = array(); $param['comment_type'] = $comment_type['type_id']; $param["comment_object_id"] = $comment_id; if (strtoupper(CHARSET) == 'GBK') { $param['comment_message'] = Uk86Language::uk86_getGBK(trim($_POST['comment_message'])); } else { $param['comment_message'] = trim($_POST['comment_message']); } $param['comment_member_id'] = $_SESSION['member_id']; $param['comment_time'] = time(); $model_comment = Model('micro_comment'); $result = $model_comment->save($param); if ($result) { //评论计数加1 $model = Model("micro_{$_GET['type']}"); $update = array(); $update['comment_count'] = array('exp', 'comment_count+1'); $condition = array(); $condition[$comment_type['type_key']] = $comment_id; $model->table("micro_{$_GET['type']}")->where($condition)->update($update); //返回信息 $data['result'] = 'true'; $data['message'] = Uk86Language::uk86_get('nc_common_save_succ'); $data['member_name'] = $_SESSION['member_name'] . Uk86Language::uk86_get('nc_colon'); $data['member_avatar'] = uk86_getMemberAvatar($_SESSION['member_avatar']); $data['member_link'] = MICROSHOP_SITE_URL . '/index.php?act=home&member_id=' . $_SESSION['member_id']; $data['comment_message'] = uk86_parsesmiles(stripslashes($param['comment_message'])); $data['comment_time'] = date('Y-m-d H:i:s', $param['comment_time']); $data['comment_id'] = $result; //分享内容 if (isset($_POST['share_app_items'])) { $condition = array(); $condition[$comment_type['type_key']] = $_POST['comment_id']; if ($_GET['type'] == 'store') { $info = $model->getOneWithStoreInfo($condition); } else { $info = $model->getOne($condition); } $info['commend_message'] = $param['comment_message']; $info['type'] = $_GET['type']; $info['url'] = MICROSHOP_SITE_URL . DS . "index.php?act={$_GET['type']}&op=detail&{$_GET['type']}_id=" . $_POST['comment_id'] . '#widgetcommenttitle'; self::share_app_publish('comment', $info); } } else { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('nc_common_save_fail'); } } else { $data['result'] = 'false'; $data['message'] = Uk86Language::uk86_get('no_login'); } self::echo_json($data); }
</tr> </thead> <tbody> <?php if (!empty($output['commentlist']) && is_array($output['commentlist'])) { ?> <?php foreach ($output['commentlist'] as $k => $v) { ?> <tr class="hover edit"> <td class="w24"><input type="checkbox" name="c_id[]" value="<?php echo $v['comment_id']; ?> " class="checkitem"></td> <td><?php echo uk86_parsesmiles($v['comment_content']); ?> </td> <td class="w150 align-center"><?php echo $v['comment_membername']; ?> </td> <td class="w150 align-center"><?php echo @date('Y-m-d H:i:s', $v['comment_addtime']); ?> </td> <td class="w150 align-center"><?php echo $v['comment_ip']; ?> </td> <td class="w150 align-center"><?php
<?php if ($_SESSION['store_id'] == $val['strace_storeid']) { ?> <span class="fd-handle"> <a href="javascript:void(0);" nc_type="sd_del" data-param='{"txtid":"<?php echo $val['strace_id']; ?> "}'><i class="icon-trash"></i><?php echo $lang['nc_delete']; ?> </a> </span> <?php } ?> </dt> <dd> <?php echo uk86_parsesmiles($val['strace_content']); ?> </dd> <dd> <span class="goods-time fl"><?php echo date('Y-m-d H:i', $val['strace_time']); ?> </span> <span class="fr"> <a href="javascript:void(0);" nc_type="sd_forwardbtn" data-param='{"txtid":"<?php echo $val['strace_id']; ?> "}'><?php echo $lang['sns_forward']; ?> </a> | <a href="javascript:void(0);" nc_type="sd_commentbtn" data-param='{"txtid":"<?php echo $val['strace_id']; ?> "}'><?php
<?php echo $v['from_member_name']; ?> <?php echo $lang['home_message_speak']; } elseif ($output['drop_type'] == 'msg_system') { echo $v['from_member_name']; } else { echo $v['from_member_name'] . $lang['home_message_speak']; } echo $lang['nc_colon']; ?> </dt> <dd> <p><?php echo nl2br(uk86_parsesmiles($v['message_body'])); ?> </p> <p class="hint">(<?php echo date("Y-m-d H:i", $v['message_time']); ?> )</p> </dd> </dl> <?php } ?> <?php } ?> <?php