本文整理汇总了PHP中util_unconvert_htmlspecialchars函数的典型用法代码示例。如果您正苦于以下问题:PHP util_unconvert_htmlspecialchars函数的具体用法?PHP util_unconvert_htmlspecialchars怎么用?PHP util_unconvert_htmlspecialchars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了util_unconvert_htmlspecialchars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Project $project, $count, $selected)
{
$this->label = util_unconvert_htmlspecialchars($project->getPublicName());
$this->count = $count;
$this->value = $project->getGroupId();
$this->selected = $selected;
}
示例2: __construct
public function __construct(array $result)
{
$hp = Codendi_HTMLPurifier::instance();
$this->project_name = util_unconvert_htmlspecialchars($result['group_name']);
$this->project_unix_name = $result['unix_group_name'];
$this->project_description = $hp->purify($result['short_description'], CODENDI_PURIFIER_BASIC, $result['group_id']);
}
示例3: __construct
public function __construct(array $hit, Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->has_highlight = !empty($this->highlight);
$this->display_permissions = isset($hit['fields']['permissions']);
if ($this->display_permissions) {
$this->permissions = implode(', ', $hit['fields']['permissions']);
}
}
示例4: getSummaryPageContent
/**
* getSummaryPageContent
*
* Return the text to display on the summary page
* @return arr[title], arr[content]
*/
function getSummaryPageContent()
{
$hp = Codendi_HTMLPurifier::instance();
$user = UserManager::instance()->getCurrentUser();
$ret = array('title' => $GLOBALS['Language']->getText('include_project_home', 'latest_file_releases'), 'content' => '');
$packages = $this->_getPackagesForUser($user->getId());
if (count($packages)) {
$ret['content'] .= '
<table cellspacing="1" cellpadding="5" width="100%" border="0">
<tr class="boxitem">
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'package') . '
</td>
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'version') . '
</td>
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'download') . '
</td>
</tr>
';
require_once 'FileModuleMonitorFactory.class.php';
$fmmf = new FileModuleMonitorFactory();
foreach ($packages as $package) {
// the icon is different whether the package is monitored or not
if ($fmmf->isMonitoring($package['package_id'], $user, false)) {
$monitor_img = $GLOBALS['HTML']->getImage("ic/notification_stop.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'stop_monitoring'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'stop_monitoring')));
} else {
$monitor_img = $GLOBALS['HTML']->getImage("ic/notification_start.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'start_monitoring'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'start_monitoring')));
}
$ret['content'] .= '
<TR class="boxitem">
<TD>
<B>' . $hp->purify(util_unconvert_htmlspecialchars($package['package_name']), CODENDI_PURIFIER_CONVERT_HTML) . '</B>
<a HREF="/file/filemodule_monitor.php?filemodule_id=' . $package['package_id'] . '&group_id=' . $this->getGroupId() . '">' . $monitor_img . '
</a>
</TD>';
// Releases to display
$ret['content'] .= '<TD>' . $hp->purify($package['release_name'], CODENDI_PURIFIER_CONVERT_HTML) . ' <A href="/file/shownotes.php?group_id=' . $this->getGroupId() . '&release_id=' . $package['release_id'] . '">' . $GLOBALS['HTML']->getImage("ic/text.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'release_notes'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'release_notes'))) . '
</TD>
<TD><A HREF="/file/showfiles.php?group_id=' . $this->getGroupId() . '&release_id=' . $package['release_id'] . '">' . $GLOBALS['Language']->getText('include_project_home', 'download') . '</A></TD></TR>';
}
$ret['content'] .= '</table>';
} else {
$ret['content'] .= '<b>' . $GLOBALS['Language']->getText('include_project_home', 'no_files_released') . '</b>';
}
$ret['content'] .= '
<div align="center">
<a href="/file/showfiles.php?group_id=' . $this->getGroupId() . '">[' . $GLOBALS['Language']->getText('include_project_home', 'view_all_files') . ']</A>
</div>
';
return $ret;
}
示例5: sendNotice
/**
* sendNotice - Notifies of document submissions
*/
function sendNotice($new = true)
{
$BCC = $this->Group->getDocEmailAddress();
if (strlen($BCC) > 0) {
$subject = '[' . $this->Group->getPublicName() . '] New document - ' . $this->getName();
$body = "Project: " . $this->Group->getPublicName() . "\n";
$body .= "Group: " . $groupname . "\n";
$body .= "Document title: " . $this->getName() . "\n";
$body .= "Document description: " . util_unconvert_htmlspecialchars($this->getDescription()) . "\n";
$body .= "Submitter: " . $this->getCreatorRealName() . " (" . $this->getCreatorUserName() . ") \n";
$body .= "\n\n-------------------------------------------------------" . "\nFor more info, visit:" . "\n\n" . util_make_url('/docman/index.php?group_id=' . $this->Group->getID());
util_send_message('', $subject, $body, '', $BCC);
}
return true;
}
示例6: displayFollowupComment
/**
* Output the raw follow-up comment
*
* @param Integer $comment_id Id of the follow-up comment
*
* @return void
*/
function displayFollowupComment($comment_id)
{
echo util_unconvert_htmlspecialchars($this->getFollowup($comment_id));
}
示例7: formatFollowUp
/**
* Format the comment text to a given format according to parameters
*
* @param Integer $groupId Project id
* @param Boolean $commentFormat $value's format
* @param String $value Comment content
* @param Boolean $output Output format
*
* @return String
*/
public function formatFollowUp($groupId, $commentFormat, $value, $output)
{
$commentText = '';
if ($output == self::OUTPUT_EXPORT) {
return util_unconvert_htmlspecialchars($value);
} else {
$hp = $this->getHTMLPurifier();
if ($output == self::OUTPUT_MAIL_TEXT) {
if ($commentFormat == self::FORMAT_HTML) {
$commentText = $hp->purify(util_unconvert_htmlspecialchars($value), CODENDI_PURIFIER_STRIP_HTML);
} else {
$commentText = $value;
}
$commentText = util_unconvert_htmlspecialchars($commentText);
} else {
if ($commentFormat == self::FORMAT_HTML) {
$level = CODENDI_PURIFIER_LIGHT;
} else {
$level = CODENDI_PURIFIER_BASIC;
}
$commentText = $hp->purify(util_unconvert_htmlspecialchars($value), $level, $groupId);
}
return $commentText;
}
}
示例8: exit_error
if (permission_exist('DOCUMENT_READ', $docid)) {
if (!permission_is_authorized('DOCUMENT_READ', $docid, user_getid(), $object_group_id)) {
exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
}
} else {
if (!permission_is_authorized('DOCGROUP_READ', $row['doc_group'], user_getid(), $object_group_id)) {
exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
}
}
if (user_isloggedin()) {
//Insert a new entry in the doc_log table only for restricted documents
$sql = "INSERT INTO doc_log(user_id,docid,time) " . "VALUES ('" . user_getid() . "','" . $docid . "','" . time() . "')";
$res_insert = db_query($sql);
}
// HTML or text files that were copy/pasted are displayed in a Codendi-formatted page.
// Uploaded files are always displayed as-is.
if (($row['filetype'] == 'text/html' || $row['filetype'] == 'text/plain') && $row['filesize'] == 0) {
docman_header(array('title' => $row['title'], 'help' => 'DocumentManager.html'));
if ($object_group_id != $from_group_id) {
$group_name = util_get_group_name_from_id($object_group_id);
print '<H3><span class="feedback">' . $Language->getText('docman_display_doc', 'warning_different_group', array($group_name)) . '</span></H3>';
}
// Document data can now contain HTML tags but not php code
print util_unconvert_htmlspecialchars($row['data']);
docman_footer($params);
} else {
session_redirect("/docman/download.php?docid=" . $docid);
}
} else {
exit_error($Language->getText('global', 'error'), $Language->getText('docman_display_doc', 'error_wrongid'));
}
示例9: frs_display_release_form
//.........这里部分代码省略.........
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="<? echo $GLOBALS['sys_max_size_upload']; ?>">
<input type="hidden" name="postReceived" value="" />
<?php
if ($release->getReleaseId()) {
echo '<input type="hidden" id="release_id" name="release[release_id]" value="' . $release->getReleaseId() . '" />';
}
?>
<TABLE BORDER="0" width="100%">
<TR><TD><FIELDSET><LEGEND><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'fieldset_properties');
?>
</LEGEND>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editpackages', 'p_name');
?>
:</B>
</TD>
<TD>
<?php
$res =& $frspf->getFRSPackagesFromDb($group_id);
$rows = count($res);
if (!$res || $rows < 1) {
echo '<p class="highlight">' . $GLOBALS['Language']->getText('file_admin_qrs', 'no_p_available') . '</p>';
} else {
echo '<SELECT NAME="release[package_id]" id="package_id">';
for ($i = 0; $i < $rows; $i++) {
echo '<OPTION VALUE="' . $res[$i]->getPackageID() . '"';
if ($res[$i]->getPackageID() == $release->getPackageId()) {
echo ' selected';
}
echo '>' . $hp->purify(util_unconvert_htmlspecialchars($res[$i]->getName()), CODENDI_PURIFIER_CONVERT_HTML) . '</OPTION>';
}
echo '</SELECT>';
}
?>
</TD><td></td>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'release_name');
?>
: <span class="highlight"><strong>*</strong></span></B>
</TD>
<TD>
<INPUT TYPE="TEXT" id="release_name" name="release[name]" onBlur="update_news()" value="<?php
echo $hp->purify($release->getName());
?>
">
</TD>
</TR>
<TR>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'release_date');
?>
:</B>
</TD>
<TD>
<?php
echo $GLOBALS['HTML']->getDatePicker('release_date', 'release[date]', isset($release_date) ? $hp->purify($release_date) : format_date('Y-m-d', $release->getReleaseDate()));
?>
</TD>
<td></td>
<TD>
示例10: unconvertHTMLSpecialChars
/**
* Retrieves the converted HTML special characters
*
* @param String $name
*
* @return String
*/
function unconvertHTMLSpecialChars($name)
{
return util_unconvert_htmlspecialchars($this->convertName($name));
}
示例11: __construct
public function __construct(Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->project_uri = '/projects/' . $project->getUnixName();
}
示例12: Graph
$ydata2[$i] = 0;
$i = 1;
$xdata[$i] = $i;
$xlabel[$i] = $month . "-" . $day + 1;
$ydata1[$i] = 0;
$ydata2[$i] = 0;
$i = 2;
}
$graph = new Graph(600, 350);
$graph->addDebug("We appended {$i} rows of data to the graphing set.");
$graph->addDebug("{$begin_time}");
$graph->addDebug("{$sql}");
$data1 = $graph->AddData($xdata, $ydata1, $xlabel);
$data2 = $graph->AddData($xdata, $ydata2, $xlabel);
$graph->DrawGrid('gray');
$graph->LineGraph($data1, 'red');
$graph->LineGraph($data2, 'blue');
$pm = ProjectManager::instance();
$graph->SetTitle("Codendi Statistics: " . util_unconvert_htmlspecialchars($pm->getProject($group_id)->getPublicName()));
$graph->SetSubTitle("Page Views (red) and Downloads (blue) for the past {$i} days");
$graph->SetxTitle('Date');
$graph->SetyTitle('Views (red) / Downloads (blue)');
$graph->DrawAxis();
//$graph->showDebug();
// If PHP3 then assume GD library < 1.6 with only GIF Support
// if PHP4 then we have GD library >= 1.6 with only PNG Support
if (substr(phpversion(), 0, 1) == "3") {
$graph->ShowGraph('gif');
} else {
$graph->ShowGraph('png');
}
示例13: getUnconvertedPublicName
public function getUnconvertedPublicName()
{
return util_unconvert_htmlspecialchars($this->data_array['group_name']);
}
示例14: _set_doesnot_belong_to_project_error
function _set_doesnot_belong_to_project_error($item, $group)
{
$this->feedback->log('warning', $GLOBALS['Language']->getText('plugin_docman', 'item_does_not_belong', array($item->getId(), util_unconvert_htmlspecialchars($group->getPublicName()))));
$this->_viewParams['redirect_to'] = str_replace('group_id=' . $this->request->get('group_id'), 'group_id=' . $item->getGroupId(), $_SERVER['REQUEST_URI']);
$this->view = 'Redirect';
}
示例15: projectName
public function projectName()
{
return util_unconvert_htmlspecialchars($this->project_name);
}