function action_send(&$errors) { global $data; if (false === $data->send_im($this->user_id, $_POST['im_sip_address'], $_POST['im_instant_message'], array(), $errors)) { $this->f->load_defaults(); return false; } return array("m_im_sended=" . RawURLEncode($this->opt['instance_id']), "m_im_sended_uri=" . RawURLencode($_POST['im_sip_address'])); }
function to_get_param($param = null) { if (is_null($param)) { if (isset($GLOBALS['controler']) and is_a($GLOBALS['controler'], 'page_conroler')) { $param = $GLOBALS['controler']->ch_user_param_name(); } else { $param = "user"; } } /* single quote all ":" */ $uid = str_replace(":", "':'", $this->uid); $did = str_replace(":", "':'", $this->did); $realm = str_replace(":", "':'", $this->realm); $username = str_replace(":", "':'", $this->username); return $param . "=" . RawURLencode($uid . ":" . $did . ":" . $username . ":" . $realm); }