public function do_showMessages() { $u_id = intval($this->input['u_id']); $id = intval($this->input['id']); $user_ = new user(); $info = $user_->getUserById($u_id); $info = $info[0]; $to_name = $info['username']; include_once ROOT_PATH . 'lib/messages/messages.class.php'; $mMessages = new messages(); $mm = $mMessages->get_one_msg($id); $mm = $mm[0]; $key = array_keys($mm); $salt_str = $key[0]; $user_info = $this->user; $messages = $mm[$salt_str]; ob_start(); include hg_load_template("user_dialog"); $html = ob_get_contents(); ob_end_clean(); echo $html . '[[[------------]]]' . $salt_str . '[[[------------]]]' . $to_name; }
public function do_showMessages() { $u_id = intval($this->input['u_id']); $id = intval($this->input['id']); $user_ = new user(); $info = $user_->getUserById($u_id); $info = $info[0]; $to_name = $info['username']; include_once ROOT_PATH . 'lib/messages/messages.class.php'; $mMessages = new messages(); $mm = $mMessages->get_one_msg($id); $mm = $mm[0]; $key = array_keys($mm); $salt_str = $key[0]; $user_info = $this->user; $messages = $mm[$salt_str]; ob_start(); $this->tpl->addVar('salt_str', $salt_str); $this->tpl->addVar('messages', $messages); $this->tpl->addVar('user_info', $user_info); $this->tpl->addVar('key', $key); $this->tpl->addVar('mm', $mm); $this->tpl->addVar('to_name', $to_name); $this->tpl->addVar('info', $info); $this->tpl->addVar('id', $id); $this->tpl->addVar('u_id', $u_id); $this->tpl->outTemplate('user_dialog'); $html = ob_get_contents(); ob_end_clean(); echo $html . '[[[------------]]]' . $salt_str . '[[[------------]]]' . $to_name; }