survey preview

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@454 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-04-05 00:08:26 +00:00
parent 8b39e42913
commit 54a39f982e
2 changed files with 11 additions and 2 deletions

View File

@ -246,6 +246,7 @@ page.preview.redirect=Redirect visitor to another operator window
page.preview.redirected="Visitor is redirected" window
page.preview.showerr=Show errors
page.preview.style_default=-from general settings-
page.preview.survey=Pre-chat survey
page.preview.title=Site style
page.preview.userchat=Chat window (user-mode)
page.translate.descr=If you don't like the translation, please send us an update.

View File

@ -38,7 +38,7 @@ if(!in_array($preview, $stylelist)) {
$preview = $stylelist[0];
}
$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", "");
$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", "");
$showerrors = verifyparam("showerr", "/^on$/", "") == "on";
$errors = array();
if($showerrors) {
@ -52,6 +52,13 @@ if($show == 'chat' || $show == 'mail' || $show == 'leavemessage' || $show == 'le
expand("../styles", "$preview", "$show.tpl");
exit;
}
if($show == 'survey') {
loadsettings();
setup_survey("Visitor", "", "", "", "http://google.com");
setup_logo();
expand("../styles", "$preview", "$show.tpl");
exit;
}
if($show == 'mailsent') {
$page['email'] = "admin@yourdomain.com";
setup_logo();
@ -85,6 +92,7 @@ $templateList = array(
array('label' => getlocal("page.preview.userchat"), 'id' => 'chat', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.chatsimple"), 'id' => 'chatsimple', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.nochat"), 'id' => 'nochat', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.survey"), 'id' => 'survey', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.leavemessage"), 'id' => 'leavemessage', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.leavemessagesent"), 'id' => 'leavemessagesent', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.mail"), 'id' => 'mail', 'h' => 254, 'w' => 603),
@ -104,7 +112,7 @@ $page['formshowerr'] = $showerrors;
$page['availablePreviews'] = $stylelist;
$page['availableTemplates'] = array(
"chat", "chatsimple", "nochat",
"leavemessage", "leavemessagesent",
"survey", "leavemessage", "leavemessagesent",
"mail", "mailsent",
"redirect", "redirected",
"agentchat", "agentrochat",