本文整理汇总了PHP中Format::viewableImages方法的典型用法代码示例。如果您正苦于以下问题:PHP Format::viewableImages方法的具体用法?PHP Format::viewableImages怎么用?PHP Format::viewableImages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Format
的用法示例。
在下文中一共展示了Format::viewableImages方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getDraft
function _getDraft($id)
{
if (!($draft = Draft::lookup($id))) {
Http::response(205, "Draft not found. Create one first");
}
$body = Format::viewableImages($draft->getBody());
echo JsonDataEncoder::encode(array('body' => $body, 'draft_id' => (int) $id));
}
示例2: array
if (is_a($template, EmailTemplateGroup)) {
// New template implementation
$id = 0;
$tpl_id = $template->getId();
$name = $template->getName();
$group = $template;
$selected = $_REQUEST['code_name'];
$action = 'implement';
$extras = array('code_name' => $selected, 'tpl_id' => $tpl_id);
$msgtemplates = $template::$all_names;
$desc = $msgtemplates[$selected];
// Attempt to lookup the default data if it is defined
$default = @$template->getMsgTemplate($selected);
if ($default) {
$info['subject'] = $default->getSubject();
$info['body'] = Format::viewableImages($default->getBody());
}
} else {
// Template edit
$id = $template->getId();
$tpl_id = $template->getTplId();
$name = $template->getGroup()->getName();
$desc = $template->getDescription();
$group = $template->getGroup();
$selected = $template->getCodeName();
$action = 'updatetpl';
$extras = array();
$msgtemplates = $group::$all_names;
$info = array_merge(array('subject' => $template->getSubject(), 'body' => $template->getBodyWithImages()), $info);
}
$tpl = $msgtemplates[$selected];
示例3: die
<?php
if (!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) {
die('Access Denied');
}
$pageTypes = array('landing' => __('Landing page'), 'offline' => __('Offline page'), 'thank-you' => __('Thank you page'), 'other' => __('Other'));
$info = $qs = array();
if ($page && $_REQUEST['a'] != 'add') {
$title = __('Update Page');
$action = 'update';
$submit_text = __('Save Changes');
$info = $page->getHashtable();
$info['body'] = Format::viewableImages($page->getBody());
$info['notes'] = Format::viewableImages($info['notes']);
$slug = Format::slugify($info['name']);
$qs += array('id' => $page->getId());
} else {
$title = __('Add New Page');
$action = 'add';
$submit_text = __('Add Page');
$info['isactive'] = isset($info['isactive']) ? $info['isactive'] : 0;
$qs += array('a' => $_REQUEST['a']);
}
$info = Format::htmlchars($errors && $_POST ? $_POST : $info);
?>
<form action="pages.php?<?php
echo Http::build_query($qs);
?>
" method="post" id="save">
<?php
csrf_token();
示例4: elseif
}
}
//page
$nav->setActiveNav('new');
if ($cfg->isClientLoginRequired()) {
if (!$thisclient) {
require_once 'secure.inc.php';
}
elseif ($thisclient->isGuest()) {
require_once 'login.php';
exit();
}
}
require(CLIENTINC_DIR.'header.inc.php');
if($ticket
&& (
(($topic = $ticket->getTopic()) && ($page = $topic->getPage()))
|| ($page = $cfg->getThankYouPage())
)) {
// Thank the user and promise speedy resolution!
echo Format::viewableImages($ticket->replaceVars($page->getBody()));
}
else {
// require(CLIENTINC_DIR.'xmlSchema.php');
require(CLIENTINC_DIR.'open.inc.php');
}
require(CLIENTINC_DIR.'footer.inc.php');
?>
示例5: render
function render($mode = false)
{
$config = $this->field->getConfiguration();
?>
<div class=""><h3><?php
echo Format::htmlchars($this->field->get('label'));
?>
</h3><em><?php
echo Format::htmlchars($this->field->get('hint'));
?>
</em><div><?php
echo Format::viewableImages($config['content']);
?>
</div>
</div>
<?php
}
示例6: die
<?php
if (!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->canManageFAQ()) {
die('Access Denied');
}
$info = $qs = array();
if ($faq) {
$title = __('Update FAQ') . ': ' . $faq->getQuestion();
$action = 'update';
$submit_text = __('Save Changes');
$info = $faq->getHashtable();
$info['id'] = $faq->getId();
$info['topics'] = $faq->getHelpTopicsIds();
$info['answer'] = Format::viewableImages($faq->getAnswer());
$info['notes'] = Format::viewableImages($faq->getNotes());
$qs += array('id' => $faq->getId());
} else {
$title = __('Add New FAQ');
$action = 'create';
$submit_text = __('Add FAQ');
if ($category) {
$qs += array('cid' => $category->getId());
$info['category_id'] = $category->getId();
}
}
//TODO: Add attachment support.
$info = Format::htmlchars($errors && $_POST ? $_POST : $info);
$qstr = Http::build_query($qs);
?>
<form action="faq.php?<?php
echo $qstr;
示例7: getBodyWithImages
function getBodyWithImages()
{
return Format::viewableImages($this->getBody(), ROOT_PATH . 'image.php');
}
示例8: getBodyWithImages
function getBodyWithImages()
{
return Format::viewableImages($this->getBody());
}
示例9: getResponseWithImages
function getResponseWithImages()
{
return Format::viewableImages($this->getResponse());
}
示例10: die
<?php
if (!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin()) {
die('Access Denied');
}
$info = $qs = array();
if ($staff && $_REQUEST['a'] != 'add') {
//Editing Department.
$title = __('Update Agent');
$action = 'update';
$submit_text = __('Save Changes');
$passwd_text = __('To reset the password enter a new one below');
$info = $staff->getInfo();
$info['id'] = $staff->getId();
$info['teams'] = $staff->getTeams();
$info['signature'] = Format::viewableImages($info['signature']);
$qs += array('id' => $staff->getId());
} else {
$title = __('Add New Agent');
$action = 'create';
$submit_text = __('Add Agent');
$passwd_text = __('Temporary password required only for "Local" authentication');
//Some defaults for new staff.
$info['change_passwd'] = 1;
$info['welcome_email'] = 1;
$info['isactive'] = 1;
$info['isvisible'] = 1;
$info['isadmin'] = 0;
$info['timezone_id'] = $cfg->getDefaultTimezoneId();
$info['daylight_saving'] = $cfg->observeDaylightSaving();
$qs += array('a' => 'add');
示例11: getSignature
function getSignature($type, $id = null)
{
global $thisstaff;
if (!$thisstaff) {
Http::response(403, 'Login Required');
}
switch ($type) {
case 'none':
break;
case 'mine':
echo Format::viewableImages($thisstaff->getSignature());
break;
case 'dept':
if (!($dept = Dept::lookup($id))) {
Http::response(404, 'No such department');
}
echo Format::viewableImages($dept->getSignature());
break;
default:
Http::response(400, 'Unknown signature type');
break;
}
}
示例12: __
<h3><?php echo __('Manage Content'); ?> — <?php echo Format::htmlchars($content->getName()); ?></h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<?php if ($errors['err']) { ?>
<div class="error-banner">
<?php echo $errors['err']; ?>
</div>
<?php } ?>
<form method="post" action="#content/<?php echo $info['id']; ?>">
<div class="error"><?php echo $errors['name']; ?></div>
<input type="text" style="width: 100%; font-size: 14pt" name="name" value="<?php
echo Format::htmlchars($info['name']); ?>" />
<div style="margin-top: 5px">
<div class="error"><?php echo $errors['body']; ?></div>
<textarea class="richtext no-bar" name="body"><?php
echo Format::viewableImages($info['body']);
?></textarea>
</div>
<div id="msg_info" style="margin-top:7px"><?php
echo $content->getNotes(); ?></div>
<hr/>
<p class="full-width">
<span class="buttons pull-left">
<input type="reset" value="<?php echo __('Reset'); ?>">
<input type="button" name="cancel" class="<?php
echo $user ? 'cancel' : 'close'; ?>" value="<?php echo __('Cancel'); ?>">
</span>
<span class="buttons pull-right">
<input type="submit" value="<?php echo __('Save Changes'); ?>">
</span>
</p>
示例13: cannedResponse
function cannedResponse($tid, $cid, $format = 'text')
{
global $thisstaff, $cfg;
if (!($ticket = Ticket::lookup($tid)) || !$ticket->checkStaffAccess($thisstaff)) {
Http::response(404, 'Unknown ticket ID');
}
if ($cid && !is_numeric($cid)) {
if (!($response = $ticket->getThread()->getVar($cid))) {
Http::response(422, 'Unknown ticket variable');
}
// Ticket thread variables are assumed to be quotes
$response = "<br/><blockquote>{$response->asVar()}</blockquote><br/>";
// Return text if html thread is not enabled
if (!$cfg->isHtmlThreadEnabled()) {
$response = Format::html2text($response, 90);
} else {
$response = Format::viewableImages($response);
}
// XXX: assuming json format for now.
return Format::json_encode(array('response' => $response));
}
if (!$cfg->isHtmlThreadEnabled()) {
$format .= '.plain';
}
$varReplacer = function (&$var) use($ticket) {
return $ticket->replaceVars($var);
};
include_once INCLUDE_DIR . 'class.canned.php';
if (!$cid || !($canned = Canned::lookup($cid)) || !$canned->isEnabled()) {
Http::response(404, 'No such premade reply');
}
return $canned->getFormattedResponse($format, $varReplacer);
}
示例14: getAnswerWithImages
function getAnswerWithImages()
{
return Format::viewableImages($this->ht['answer']);
}
示例15:
<?php
if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->canManageFAQ()) die('Access Denied');
$info=array();
$qstr='';
if($category && $_REQUEST['a']!='add'){
$title=__('Update Category').': '.$category->getName();
$action='update';
$submit_text=__('Save Changes');
$info=$category->getHashtable();
$info['id']=$category->getId();
$info['notes'] = Format::viewableImages($category->getNotes());
$qstr.='&id='.$category->getId();
}else {
$title=__('Add New Category');
$action='create';
$submit_text=__('Add');
$qstr.='&a='.$_REQUEST['a'];
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="categories.php?<?php echo $qstr; ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('FAQ Category');?></h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">