本文整理汇总了PHP中Feedback::GetLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::GetLink方法的具体用法?PHP Feedback::GetLink怎么用?PHP Feedback::GetLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::GetLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TextReplace
function TextReplace($_text)
{
if (!empty($this->Messages)) {
$_text = $this->Messages[0]->TextReplace($_text, $this->Group);
$_text = str_replace("%ticket_hash%", $this->GetHash(true), $_text);
$_text = str_replace("%feedback_link%", Feedback::GetLink("tid=" . Encoding::Base64UrlEncode($this->Id)), $_text);
}
return $_text;
}
示例2: CreateArchiveEntry
function CreateArchiveEntry($_internalUser, $_visitor, $custom = "", $etpl = "", $_customsInTranscript = true, $pdm = null)
{
if (!empty($this->ArchiveCreated)) {
return;
}
if (Server::$Inputs[111]->Active) {
$custom .= strip_tags(Server::$Inputs[111]->Caption) . " %efullname%\r\n";
}
if (Server::$Inputs[112]->Active) {
$custom .= strip_tags(Server::$Inputs[112]->Caption) . " %eemail%\r\n";
}
if (!empty($this->Company) && Server::$Inputs[113]->Active) {
$custom .= strip_tags(Server::$Inputs[113]->Caption) . " " . trim($this->UserData->Company) . "\r\n";
}
if (!empty($this->Question) && Server::$Inputs[114]->Active) {
$custom .= strip_tags(Server::$Inputs[114]->Caption) . " " . trim($this->UserData->Text) . "\r\n";
}
if (!empty($this->Phone) && Server::$Inputs[116]->Active) {
$custom .= strip_tags(Server::$Inputs[116]->Caption) . " " . trim($this->UserData->Phone) . "\r\n";
}
if (!empty($this->ChatVoucherId)) {
$custom .= strip_tags(LocalizationManager::$TranslationStrings["client_voucher_id"]) . " " . trim($this->ChatVoucherId) . "\r\n";
}
$customs = array();
if (is_array($this->UserData->Customs)) {
foreach ($this->UserData->Customs as $cind => $value) {
if (Server::$Inputs[$cind]->Active && Server::$Inputs[$cind]->Custom) {
$customs[Server::$Inputs[$cind]->Name] = $value;
if (!isset(Server::$Groups[$this->DesiredChatGroup]->ChatInputsHidden[$cind]) && $_customsInTranscript) {
if (Server::$Inputs[$cind]->Type == "CheckBox") {
$custom .= strip_tags(Server::$Inputs[$cind]->Caption) . " " . (!empty($value) ? "<!--lang_client_yes-->" : "<!--lang_client_no-->") . "\r\n";
} else {
if (Server::$Inputs[$cind]->Type == "ComboBox") {
$custom .= strip_tags(Server::$Inputs[$cind]->Caption) . " " . Server::$Inputs[$cind]->GetClientValue($value) . "\r\n";
} else {
$custom .= strip_tags(Server::$Inputs[$cind]->Caption) . " " . $value . "\r\n";
}
}
}
}
}
}
$tsData = array("", "");
if (!empty(Server::$Groups[$this->DesiredChatGroup]->PredefinedMessages)) {
$pdm = PredefinedMessage::GetByLanguage(Server::$Groups[$this->DesiredChatGroup]->PredefinedMessages, $_visitor->Language);
if (!empty($pdm->EmailChatTranscriptBodyPlaintext)) {
$tsData[0] = $pdm->EmailChatTranscriptBodyPlaintext;
}
if (!empty($pdm->EmailChatTranscriptBodyHTML)) {
$tsData[1] = $pdm->EmailChatTranscriptBodyHTML;
}
}
for ($i = 0; $i < count($tsData); $i++) {
$tsData[$i] = str_replace("%chat_id%", $this->ChatId, $tsData[$i]);
$tsData[$i] = str_replace("%details%", $custom, $tsData[$i]);
$tsData[$i] = str_replace("%external_name%", "%efullname%", $tsData[$i]);
$tsData[$i] = str_replace("%external_email%", "%eemail%", $tsData[$i]);
$tsData[$i] = str_replace("%external_company%", $this->UserData->Company, $tsData[$i]);
$tsData[$i] = str_replace("%external_phone%", $this->UserData->Phone, $tsData[$i]);
$tsData[$i] = str_replace("%question%", $this->UserData->Text, $tsData[$i]);
$tsData[$i] = str_replace("%feedback_link%", Feedback::GetLink("cid=" . Encoding::Base64UrlEncode($this->ChatId)), $tsData[$i]);
$tsData[$i] = Server::$Groups[$this->DesiredChatGroup]->TextReplace($tsData[$i], $_visitor->Language);
if (!empty($this->OperatorId)) {
$tsData[$i] = Server::$Operators[$this->OperatorId]->TextReplace($tsData[$i]);
}
$tsData[$i] = $_visitor->TextReplace($tsData[$i]);
$tsData[$i] = Configuration::Replace($tsData[$i]);
}
$subject = $pdm != null ? $pdm->SubjectChatTranscript : "";
$subject = Mailbox::GetSubject($subject, $this->UserData->Email, $this->UserData->Fullname, $this->DesiredChatGroup, $this->ChatId, $this->UserData->Company, $this->UserData->Phone, Communication::GetIP(), $this->UserData->Text, Server::$Groups[$this->DesiredChatGroup]->GetDescription($_visitor->Language), $this->UserData->Customs);
$internal = $_internalUser != null && $_internalUser->IsBot ? $_internalUser->SystemId : "";
$result = DBManager::Execute(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` WHERE `chat_id`='" . DBManager::RealEscape($this->ChatId) . "';");
if ($result && DBManager::GetRowCount($result) == 0) {
if (Server::$Configuration->File["gl_adct"] == 1 || (!empty(Server::$Configuration->File["gl_rm_chats_time"]) || empty(Server::$Configuration->File["gl_rm_chats"]))) {
$url = Visitor::GetLastURLFromVisitor($this->UserId);
DBManager::Execute(true, "INSERT INTO `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` (`time`,`endtime`,`closed`,`chat_id`,`external_id`,`fullname`,`internal_id`,`group_id`,`area_code`,`html`,`plaintext`,`transcript_text`,`transcript_html`,`email`,`company`,`iso_language`,`iso_country`,`host`,`ip`,`gzip`,`transcript_sent`,`transcript_receiver`,`question`,`customs`,`subject`,`voucher_id`,`ref_url`) VALUES ('" . DBManager::RealEscape($this->FirstActive) . "',0,0,'" . DBManager::RealEscape($this->ChatId) . "','" . DBManager::RealEscape($this->UserId) . "','','" . DBManager::RealEscape($internal) . "','','" . DBManager::RealEscape($this->Code) . "','','','" . DBManager::RealEscape($tsData[0]) . "','" . DBManager::RealEscape($tsData[1]) . "','','','" . DBManager::RealEscape($_visitor->Language) . "','" . DBManager::RealEscape($_visitor->GeoCountryISO2) . "','" . DBManager::RealEscape($_visitor->Host) . "','" . DBManager::RealEscape($_visitor->IP) . "',0,0,'" . DBManager::RealEscape($this->UserData->Email) . "','','" . DBManager::RealEscape(@serialize($customs)) . "','" . DBManager::RealEscape($subject) . "','" . DBManager::RealEscape($this->ChatVoucherId) . "','" . DBManager::RealEscape($url) . "');");
}
$this->ArchiveCreated = 1;
ChatRequest::AcceptAll($this->UserId);
}
}