本文整理汇总了PHP中runner_htmlspecialchars函数的典型用法代码示例。如果您正苦于以下问题:PHP runner_htmlspecialchars函数的具体用法?PHP runner_htmlspecialchars怎么用?PHP runner_htmlspecialchars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了runner_htmlspecialchars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchAssign
function searchAssign()
{
parent::searchAssign();
$searchGlobalParams = $this->searchClauseObj->getSearchGlobalParams();
$searchPanelAttrs = $this->searchClauseObj->getSrchPanelAttrs();
// show hide window
$this->xt->assign("showHideSearchWin_attrs", ' title="Floating window"');
$searchOpt_mess = $searchPanelAttrs['srchOptShowStatus'] ? "Hide search options" : "Show search options";
$this->xt->assign("showHideSearchPanel_attrs", 'align="absmiddle" title="' . $searchOpt_mess . '" alt="' . $searchOpt_mess . '"');
$searchforAttrs = "name=\"ctlSearchFor" . $this->id . "\" id=\"ctlSearchFor" . $this->id . "\"";
if ($this->isUseAjaxSuggest) {
$searchforAttrs .= "autocomplete=off ";
}
$searchforAttrs .= ' placeholder="' . "search" . '"';
if ($this->searchClauseObj->isUsedSrch()) {
$valSrchFor = $searchGlobalParams["simpleSrch"];
$searchforAttrs .= " value=\"" . runner_htmlspecialchars($valSrchFor) . "\"";
}
$this->xt->assignbyref("searchfor_attrs", $searchforAttrs);
$this->xt->assign('searchPanelTopButtons', $this->isDisplaySearchPanel);
if ($this->pSet->showSimpleSearchOptions()) {
$simpleSearchTypeCombo = '<select id="simpleSrchTypeCombo' . $this->id . '" name="simpleSrchTypeCombo' . $this->id . '" size="1">';
$simpleSearchTypeCombo .= $this->searchControlBuilder->getSimpleSearchTypeCombo($searchGlobalParams["simpleSrchTypeComboOpt"], $searchGlobalParams["simpleSrchTypeComboNot"]);
$simpleSearchTypeCombo .= "</select>";
$this->xt->assign('simpleSearchTypeCombo', $simpleSearchTypeCombo);
$simpleSearchFieldCombo = '<select id="simpleSrchFieldsCombo' . $this->id . '" name="simpleSrchFieldsCombo' . $this->id . '" size="1">';
$simpleSearchFieldCombo .= $this->searchControlBuilder->simpleSearchFieldCombo($this->allSearchFields, $searchGlobalParams["simpleSrchFieldsComboOpt"]);
$simpleSearchFieldCombo .= "</select>";
$this->xt->assign('simpleSearchFieldCombo', $simpleSearchFieldCombo);
}
}
示例2: buildControl
function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data) {
parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
$inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
$altAttr = ( $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD ) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';
//Alterado por Helbert em 04/06/2015
//Se o campo for de data, cria a class do input como datepiker
if ($this->cfield == "value_DATA_VENCIMENTO_1"
OR $this->cfield == "value_DATA_RECEBIMENTO_1"
OR $this->cfield == "value_DATA_PAGAMENTO_1"
OR $this->cfield == "value1_DATA_VENCIMENTO_1"
OR $this->cfield == "value1_DATA_PAGAMENTO_1"
OR $this->cfield == "value1_DATA_RECEBIMENTO_1"
) {
$class = 'class="datepicker" readonly = "true"';
}
echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . $class . ' type="' . $inputType . '" '
. ($mode == MODE_SEARCH ? ' ' : '') . $altAttr
. 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) .
' value="' . runner_htmlspecialchars($value) . '">';
$this->buildControlEnd($validate);
}
示例3: buildControl
function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
{
if ($this->container->pageType == PAGE_LIST || $this->container->pageType == PAGE_SEARCH) {
$value = prepare_for_db($this->field, $value, "time");
}
parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
echo '<input id="' . $this->ctype . '" ' . $this->inputStyle . ' type="hidden" name="' . $this->ctype . '" value="time">';
$arr_number = parsenumbers((string) $value);
if (count($arr_number) == 6) {
$value = mysprintf("%d:%02d:%02d", array($arr_number[3], $arr_number[4], $arr_number[5]));
}
$timeAttrs = $this->pageObject->pSetEdit->getFormatTimeAttrs($this->field);
if (count($timeAttrs)) {
$input = '<input type="text" ' . $this->inputStyle . ' name="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'id="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field);
if ($timeAttrs["useTimePicker"]) {
$convention = $timeAttrs["hours"];
$loc = getLacaleAmPmForTimePicker($convention, true);
$tpVal = getValForTimePicker($this->type, $value, $loc['locale']);
echo $input . ' value="' . runner_htmlspecialchars($tpVal['val']) . '">';
echo ' ';
echo '<a class="rnr-imgclock" data-icon="timepicker" title="Time" style="display:inline-block; margin:4px 0 0 6px; visibility: hidden;" id="trigger-test-' . $this->cfield . '" /></a>';
} else {
echo $input . ' value="' . runner_htmlspecialchars($value) . '">';
}
}
$this->buildControlEnd($validate);
}
示例4: getValueHighlighted
public function getValueHighlighted($value, $highlightData)
{
$searchWordArr = array();
foreach ($highlightData['searchWords'] as $searchWord) {
$word = preg_replace('/[\\.,]/', '', $searchWord);
$wordArr = str_split($word);
$word = implode("[^\\d]{0,2}", $wordArr);
//add thousands and decimals separators to the pattern
$word = runner_htmlspecialchars($word);
if ($searchOpt == 'Starts with') {
$word = "^" . $word;
}
$searchWordArr[] = $word;
}
$pattern = '/(' . implode('|', $searchWordArr) . ')/';
$searchOpt = $highlightData['searchOpt'];
switch ($searchOpt) {
case 'Equals':
return $this->addHighlightingSpan($value);
case 'Starts with':
return preg_replace($pattern, $this->addHighlightingSpan('$1'), $value);
case 'Contains':
return preg_replace($pattern, $this->addHighlightingSpan('$1'), $value);
default:
return $value;
}
}
示例5: buildControl
function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
{
parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
$inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
$altAttr = ($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';
echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . ' type="' . $inputType . '" ' . ($mode == MODE_SEARCH ? 'autocomplete="off" ' : '') . $altAttr . 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) . ' value="' . runner_htmlspecialchars($value) . '">';
$this->buildControlEnd($validate);
}
示例6: showDBValue
public function showDBValue(&$data, $keylink)
{
$result = $this->getTextValue($data);
if (!$this->container->forExport || $this->container->forExport && $this->container->forExport != "excel" && $this->container->forExport != "csv") {
$result = runner_htmlspecialchars($result);
}
return $result;
}
示例7: buildControl
function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
{
parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
if ($mode == MODE_EDIT || $mode == MODE_ADD || $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) {
echo '<span id="readonly_' . $this->cfield . '" ' . $this->inputStyle . '>' . $this->pageObject->readOnlyFields[$this->field] . '</span>';
}
echo '<input id="' . $this->cfield . '" type="Hidden" name="' . $this->cfield . '" value="' . runner_htmlspecialchars($value) . '">';
$this->buildControlEnd($validate);
}
示例8: searchAssign
function searchAssign()
{
parent::searchAssign();
$searchforAttrs = 'placeholder="' . "buscar" . '"';
$searchGlobalParams = $this->searchClauseObj->getSearchGlobalParams();
if ($this->searchClauseObj->isUsedSrch()) {
$valSrchFor = $searchGlobalParams["simpleSrch"];
$searchforAttrs .= " value=\"" . runner_htmlspecialchars($valSrchFor) . "\"";
}
$searchforAttrs .= " size=\"15\" name=\"ctlSearchFor" . $this->id . "\" id=\"ctlSearchFor" . $this->id . "\"";
$this->xt->assign("searchfor_attrs", $searchforAttrs);
}
示例9: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
$this->upload_handler->tkeys = $keylink;
$filesArray = $this->getFilesArray($data[$this->field]);
$showThumbnails = $this->container->pSet->showThumbnail($this->field);
$isExport = $this->container->pageType == PAGE_EXPORT || $this->container->forExport != '';
if ($showThumbnails) {
$zoomboxRand = rand(11111, 99999);
}
foreach ($filesArray as $file) {
$userFile = $this->upload_handler->buildUserFile($file);
if (!$isExport) {
$value .= $value != "" ? "</br>" : "";
if ($showThumbnails && $userFile["thumbnail_url"] != "" && CheckImageExtension($file["name"])) {
$value .= "<a target=_blank href=\"" . runner_htmlspecialchars($userFile["url"]) . "\" class='zoombox zgallery" . $zoomboxRand . "'><img border='0'";
if ($this->is508) {
$value .= " alt=\"" . runner_htmlspecialchars($userFile["name"]) . "\"";
}
$value .= " src=\"" . runner_htmlspecialchars(GetRootPathForResources($userFile["thumbnail_url"])) . "\" /></a>";
} else {
if ($this->container->pSet->showIcon($this->field)) {
$value .= '<a href="' . runner_htmlspecialchars($userFile["url"]) . '"><img style="vertical-align: middle;" src="' . GetRootPathForResources('images/icons/' . $this->getFileIconByType($file["name"], $file["type"])) . '" /></a>';
}
}
}
if ($this->container->pSet->showCustomExpr($this->field)) {
$value .= fileCustomExpression($file, $data, $this->field, $this->container->pageType);
} else {
if ($isExport) {
$value .= ($value != "" ? ", " : "") . $file["usrName"];
} else {
if ($showThumbnails && $userFile["thumbnail_url"] != "" && CheckImageExtension($file["name"]) && $value != "") {
$value .= "<br />";
}
$label = runner_htmlspecialchars($file["usrName"] != "" ? $file["usrName"] : $file["name"]);
if ($this->searchHighlight) {
$label = $this->highlightSearchWord($label, true, "");
}
$value .= '<a dir="LTR" href="' . runner_htmlspecialchars($userFile["url"]) . '">' . $label . '</a>';
}
}
if ($this->container->pSet->showFileSize($this->field)) {
$fileSizeAndUnit = $this->getFileSizeAndUnits($file["size"]);
$value .= " " . str_format_number(round($fileSizeAndUnit["size"], 2)) . " " . $this->sizeUnits[$fileSizeAndUnit["unitIndex"]];
}
}
return $value;
}
示例10: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
$videoId = 'video_' . GoodFieldName(runner_htmlspecialchars($this->field)) . '_';
$videoId .= $this->getContainer()->id . "_";
if ($this->getContainer()->pageType != PAGE_ADD) {
$videoId .= $this->getContainer()->recId;
} else {
$videoId .= postvalue("id");
}
$type = 'video/mp4';
$fileName = 'file.mp4';
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$fileName = 'file.mp4';
} else {
$type = getContentTypeByExtension(substr($fileName, strrpos($fileName, '.')));
}
}
$href = GetTableLink("mfhandler", "", "filename=" . $fileName . "&table=" . rawurlencode($this->getContainer()->pSet->_table) . "&field=" . rawurlencode($this->field) . "&pageType=" . $this->getContainer()->pageType . $keylink);
$vWidth = $this->getContainer()->pSet->getVideoWidth($this->field);
$vHeight = $this->getContainer()->pSet->getVideoHeight($this->field);
if ($vWidth == 0) {
$vWidth = 300;
}
if ($vHeight == 0) {
$vHeight = 200;
}
$value .= '
<div style="width:' . $vWidth . 'px; height:' . $vHeight . 'px;">
<video class="projekktor" width="' . $vWidth . '" height="' . $vHeight . '" id="' . $videoId . '" type="' . $type . '" src="' . $href . '" >
</video></div>';
if ($this->pageObject != null) {
$this->pageObject->controlsMap['video'][] = $videoId;
}
} else {
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$value = $fileName;
}
}
}
return $value;
}
示例11: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
$fileName = $data[$this->field];
if (strlen($fileName)) {
$fieldIsUrl = $this->container->pSet->isVideoUrlField($this->field);
if (!$fieldIsUrl) {
$this->upload_handler->tkeys = $keylink;
$filesArray = $this->getFilesArray($fileName);
} else {
$filesArray = array($fileName);
}
$title = "";
$titleField = $this->container->pSet->getAudioTitleField($this->field);
if ($titleField) {
$title = runner_htmlspecialchars($data[$titleField]);
}
foreach ($filesArray as $file) {
if ($this->container->pageType == PAGE_EXPORT || $this->container->pageType == PAGE_PRINT || $this->container->forExport != '') {
if ($value != "") {
$value .= ", ";
}
$value .= $fieldIsUrl ? $file : $file["usrName"];
continue;
}
// if file
if (!$fieldIsUrl) {
if (!file_exists(getabspath($file["name"]))) {
continue;
}
}
if ($fieldIsUrl) {
$href = $file;
} else {
$userFile = $this->upload_handler->buildUserFile($file);
$href = runner_htmlspecialchars($userFile["url"]);
if (!$title || !$titleField) {
$title = $userFile["name"];
}
}
$link = '<a title="' . $title . '" href="' . $href . '">' . $title . '</a>';
$value .= ($value == "" ? "" : "<br />") . '<audio controls preload="none" src="' . $href . '">' . $link . '</audio>';
}
}
return $value;
}
示例12: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
$fileNameF = $this->container->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$fileName = "file.bin";
}
} else {
$fileName = "file.bin";
}
if (strlen($data[$this->field])) {
$value = "<a href='" . GetTableLink("getfile", "", "table=" . GetTableURL($this->container->pSet->_table) . "&filename=" . rawurlencode($fileName) . "&field=" . rawurlencode($this->field) . $keylink) . "'>";
$value .= runner_htmlspecialchars($fileName);
$value .= "</a>";
}
return $value;
}
示例13: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
$title = "";
$titleField = $this->container->pSet->getAudioTitleField($this->field);
if ($titleField) {
$title = runner_htmlspecialchars($data[$titleField]);
}
if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
if (!$title) {
$title = "Track.mp3";
}
$href = GetTableLink('getfile', '', 'table=' . GetTableURL($this->container->pSet->_table) . '&field=' . rawurlencode($this->field) . $keylink . '&filename=' . $title);
$link = '<a title="' . $title . '" href="' . $href . '">' . $title . '</a>';
$value = '<audio controls preload="none" src="' . $href . '">' . $link . '</audio>';
} else {
$value = $title;
}
return $value;
}
示例14: showDBValue
public function showDBValue(&$data, $keylink)
{
if (!$this->pageObject) {
return runner_htmlspecialchars($data[$this->field]);
} elseif ($this->pageObject->pageType == PAGE_EXPORT || $this->pageObject->pageType == PAGE_RPRINT && $this->container->forExport == "excel") {
return runner_htmlspecialchars($data[$this->field]);
}
if ($this->pageObject->pageType != PAGE_LIST) {
$mapData = $this->pageObject->addGoogleMapData($this->field, $data);
}
if ($this->pageObject->pageType != PAGE_PRINT && $this->pageObject->pageType != PAGE_RPRINT) {
return '<div id="littleMap_' . GoodFieldName($this->field) . '_' . $this->pageObject->recId . '" style="width: ' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['width'] . 'px; height: ') . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['height'] . 'px;" ') . 'class="littleMap"></div>';
}
if ($mapData['markers'][0]['lat'] == "" && $mapData['markers'][0]['lng'] == "") {
$location = $mapData['markers'][0]['address'];
} else {
$location = $mapData['markers'][0]['lat'] . ',' . $mapData['markers'][0]['lng'];
}
$src = 'http://maps.googleapis.com/maps/api/staticmap?center=' . $location . '&zoom=' . $mapData['zoom'] . '&size=' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['width']) . 'x' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['height']) . '&maptype=mobile&markers=' . $location . '&sensor=false';
return '<img border="0" alt="" src="' . $src . '">';
}
示例15: getValueHighlighted
public function getValueHighlighted($value, $highlightData)
{
$searchWordArr = array();
foreach ($highlightData['searchWords'] as $searchWord) {
$word = $searchWord;
$wordArr = str_split($word);
$word = implode("([\\-\\(]|\\) )?", $wordArr);
$searchWordArr[] = '[(]?' . runner_htmlspecialchars($word);
}
$searchWord = implode('|', $searchWordArr);
$searchOpt = $highlightData['searchOpt'];
switch ($searchOpt) {
case 'Equals':
return $this->addHighlightingSpan($value);
case 'Starts with':
return preg_replace('/^(' . $searchWord . ')/', $this->addHighlightingSpan('$1'), $value);
case 'Contains':
return preg_replace('/(' . $searchWord . ')/', $this->addHighlightingSpan('$1'), $value);
default:
return $value;
}
}