public function replaceFaceEmote($str) { $pre = $this->get('templating.helper.assets')->geturl('bundles/fafatimewebase/images/face/'); $conv = new \Justsy\BaseBundle\Business\Conv(); $str1 = $conv->replaceContent($str, $pre); return $str1; }
public function getCopy($da, $user, $conv_root_id, $FILE_WEBSERVER_URL) { $re = array(); $pre = $this->get('templating.helper.assets')->geturl('bundles/fafatimewebase/images/face/'); $conv = new \Justsy\BaseBundle\Business\Conv(); $ds = $conv->getCopy($da, $user, $conv_root_id, $FILE_WEBSERVER_URL); $rowRoot = $ds["we_convers_list"]["rows"][0]; $re["conv_id"] = $rowRoot["conv_root_id"]; $re["create_staff"] = $rowRoot["login_account"]; $re["create_staff_obj"] = $this->genStaff($rowRoot); $re["post_date"] = $rowRoot["post_date"]; $re["conv_type_id"] = $rowRoot["conv_type_id"]; $re["conv_content"] = $conv->replaceContent($rowRoot["conv_content"], $pre); $re["copy_num"] = $rowRoot["copy_num"]; $re["reply_num"] = $rowRoot["reply_num"]; $re["atten_num"] = $rowRoot["atten_num"]; $re["like_num"] = (double) $rowRoot["like_num"]; $re["iscollect"] = empty($rowRoot["atten_id"]) ? "0" : "1"; $re["comefrom"] = $rowRoot["comefrom_d"]; $re["likes"] = $this->genLikes($ds["we_convers_like"]["rows"], $conv_root_id); $re["attachs"] = $this->genAttachs($ds["we_convers_attach"]["rows"]); $re["replys"] = $this->genReplys($conv, $pre, $ds["we_convers_list"]["rows"], $ds["we_convers_like"]["rows"], $ds["we_convers_attach_reply"]["rows"]); $re["post_to_group"] = $rowRoot["post_to_group"]; $conv_copy = array(); if ($ds["we_convers_list_copy"]["recordcount"] > 0) { $conv_copy_row = $ds["we_convers_list_copy"]["rows"][0]; $conv_copy["conv_id"] = $conv_copy_row["conv_id"]; $conv_copy["create_staff"] = $conv_copy_row["login_account"]; $conv_copy["create_staff_obj"] = $this->genStaff($conv_copy_row); $conv_copy["post_date"] = $conv_copy_row["post_date"]; $conv_copy["conv_type_id"] = $conv_copy_row["conv_type_id"]; $conv_copy["conv_content"] = $conv->replaceContent($conv_copy_row["conv_content"], $pre); $conv_copy["copy_num"] = $conv_copy_row["copy_num"]; $conv_copy["reply_num"] = $conv_copy_row["reply_num"]; $conv_copy["atten_num"] = $conv_copy_row["atten_num"]; $conv_copy["like_num"] = (double) $conv_copy_row["like_num"]; $conv_copy["comefrom"] = $conv_copy_row["comefrom_d"]; $conv_copy["likes"] = $this->genLikes($ds["we_convers_like_copy"]["rows"], $conv_copy_row["conv_id"]); $conv_copy["attachs"] = $this->genAttachs($ds["we_convers_attach_copy"]["rows"]); } else { $conv_copy["conv_id"] = null; } $re["conv_copy"] = $conv_copy; return $re; }