0,'userName' => getstring("chat.default.username"), 'ltoken' => 123), "ajaxed"); $page['mailLink'] = "$webimroot/operator/preview.php?preview=$preview&show=mail"; expand("../design/$preview/$show.tpl"); exit; } if($show == 'mailsent') { $page['email'] = "admin@yourdomain.com"; expand("../design/$preview/$show.tpl"); exit; } $templateList = array( array('label' => getlocal("page.preview.userchat"), 'id' => 'chat', 'h' => 420, 'w' => 600), array('label' => getlocal("page.preview.chatsimple"), 'id' => 'chatsimple', 'h' => 420, 'w' => 600), array('label' => getlocal("page.preview.nochat"), 'id' => 'nochat', 'h' => 420, 'w' => 600), array('label' => getlocal("page.preview.leavemessage"), 'id' => 'leavemessage', 'h' => 420, 'w' => 600), array('label' => getlocal("page.preview.leavemessagesent"), 'id' => 'leavemessagesent', 'h' => 420, 'w' => 600), array('label' => getlocal("page.preview.mail"), 'id' => 'mail', 'h' => 254, 'w' => 603), array('label' => getlocal("page.preview.mailsent"), 'id' => 'mailsent', 'h' => 254, 'w' => 603), ); $template = verifyparam("template", "/^\w+$/", "chat"); $page['formpreview'] = $preview; $page['formtemplate'] = $template; $page['availablePreviews'] = $designlist; $page['availableTemplates'] = array("chat", "chatsimple", "nochat", "leavemessage", "leavemessagesent", "mail", "mailsent", "all"); $page['operator'] = topage(get_operator_name($operator)); $page['showlink'] = "$webimroot/operator/preview.php?preview=$preview&show="; $page['previewList'] = array(); foreach($templateList as $tpl) { if($tpl['id'] == $template || $template == 'all') { $page['previewList'][] = $tpl; } } start_html_output(); require('../view/preview.php'); ?>