本文整理汇总了PHP中cms_html_entity_decode函数的典型用法代码示例。如果您正苦于以下问题:PHP cms_html_entity_decode函数的具体用法?PHP cms_html_entity_decode怎么用?PHP cms_html_entity_decode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cms_html_entity_decode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
if (isset($params['info']) && !empty($params['info'])) {
$txt = trim($params['info']);
for ($i = 0; $i < 5; $i++) {
$tmp = cms_html_entity_decode($txt);
if ($tmp == $txt) {
break;
}
$txt = $tmp;
}
$smarty->assign('template_info', $txt);
}
}
if (isset($params['moddesc'])) {
$smarty->assign('module_description', trim($params['moddesc']));
}
$title = trim($params['title']);
for ($i = 0; $i < 5; $i++) {
$tmp = cms_html_entity_decode($title);
if ($tmp == $title) {
break;
}
$title = $tmp;
}
$smarty->assign('title', cms_html_entity_decode($title));
$smarty->assign('prompt_templatename', $this->Lang('prompt_templatename'));
$smarty->assign('prompt_template', $this->Lang('prompt_template'));
$smarty->assign('template', $this->CreateSyntaxArea($id, $contents, 'templatecontent'));
$smarty->assign('submit', $this->CreateInputSubmit($id, 'submitbutton', $this->Lang('submit')));
$smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancel', $this->Lang('cancel')));
$smarty->assign('formend', $this->CreateFormEnd());
echo $this->ProcessTemplate('edittemplate.tpl');
示例2: lang
}
}
echo "</td>\n";
if ($perm) {
echo "<td class=\"pagepos icons_wide\"><a href=\"changegroupperm.php" . $urlext . "&group_id=" . $onegroup->id . "\">" . $image_permissions . "</a></td>\n";
}
if ($assign) {
echo "<td class=\"pagepos icons_wide\"><a href=\"changegroupassign.php" . $urlext . "&group_id=" . $onegroup->id . "\">" . $image_groupassign . "</a></td>\n";
}
if ($edit) {
echo "<td class=\"icons_wide\"><a href=\"editgroup.php" . $urlext . "&group_id=" . $onegroup->id . "\">";
echo $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'), '', '', 'systemicon');
echo "</a></td>\n";
}
if ($remove && $onegroup->id != 1 && !$userops->UserInGroup($userid, $onegroup->id)) {
echo "<td class=\"icons_wide\"><a href=\"deletegroup.php" . $urlext . "&group_id=" . $onegroup->id . "\" onclick=\"return confirm('" . cms_html_entity_decode(lang('deleteconfirm', $onegroup->name)) . "');\">";
echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
echo "</a></td>\n";
} else {
echo '<td class="icons_wide"> </td>' . "\n";
}
echo "</tr>\n";
$currow == "row1" ? $currow = "row2" : ($currow = "row1");
}
$counter++;
}
echo '</tbody>';
echo "</table>\n";
}
if (check_permission($userid, 'Add Groups')) {
?>
示例3: cms_html_entity_decode
$encoding = $onetemplate->encoding;
$default = $onetemplate->default;
$active = $onetemplate->active;
$lastedited = $onetemplate->modified_date;
}
}
}
if (strlen($template) > 0) {
$CMS_ADMIN_SUBTITLE = $template;
}
$addlScriptSubmit = '';
$modobj = cms_utils::get_syntax_highlighter_module();
if (is_object($modobj)) {
$addlScriptSubmit = $modobj->SyntaxPageFormSubmit();
}
$closestr = cms_html_entity_decode(lang('close'));
$headtext = <<<EOSCRIPT
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function(){
jQuery('[name=apply]').live('click',function(){
var data = jQuery('#Edit_Template').find('input:not([type=submit]), select, textarea').serializeArray();
data.push({ 'name': 'ajax', 'value': 1});
data.push({ 'name': 'apply', 'value': 1 });
\$.post('{$_SERVER['REQUEST_URI']}',data,function(resultdata,text){
var event = jQuery.Event('cms_ajax_apply');
event.response = \$(resultdata).find('Response').text();
event.details = \$(resultdata).find('Details').text();
event.close = '{$closestr}';
jQuery('body').trigger(event);
},'xml');
示例4: while
echo '<tbody>';
# this var is used to show each line with different color
$currow = "row1";
# now showing each line
while ($one = $result->FetchRow()) {
# we store ids of templates found for them not to appear in the dropdown
$csslist[] = $one["assoc_to_id"];
echo "<tr class=\"{$currow}\">\n";
if ($modifytpl) {
echo "<td><a href=\"edittemplate.php" . $urlext . "&template_id=" . $one["assoc_to_id"] . "&from=cssassoc&cssid=" . $id . "\">" . $one["template_name"] . "</a></td>\n";
} else {
echo "<td>" . $one['template_name'] . "</td>\n";
}
# if user has right to delete
if ($modify || $delasso) {
echo "<td><a href=\"deletetemplateassoc.php" . $urlext . "&id=" . $id . "&template_id=" . $one["assoc_to_id"] . "&type={$type}\" onclick=\"return confirm('" . cms_html_entity_decode(lang('deleteassociationconfirm', $one['template_name'])) . "');\">";
echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
echo "</a></td>\n";
} else {
echo "<td> </td>";
}
echo "</tr>\n";
"row1" == $currow ? $currow = "row2" : ($currow = "row1");
}
## foreach
echo '</tbody>';
echo "</table>\n";
}
# end of if result
if ($modify || $addasso) {
# this var is used to store the css ids that should not appear in the
示例5: cms_db_prefix
include 'function.importtemplate.php';
if ($template == 'prettyPhoto') {
$this->SetPreference('default_template_contents', $templatecode);
$this->SetPreference('current_template', $template);
}
}
}
// create preferences
$this->SetPreference('singleimg_template', 'prettyPhoto');
$this->SetPreference('singleimg_template_html', '<a class="group" href="{$image->file|escape:\'url\'|replace:\'%2F\':\'/\'}" title="{$image->title}" rel="prettyPhoto"><img src="{$image->thumb|escape:\'url\'|replace:\'%2F\':\'/\'}" alt="{$image->title}" /></a>');
$this->SetPreference('urlprefix', 'gallery');
$this->SetPreference('allowed_extensions', 'jpg,jpeg,gif,png');
$this->SetPreference('maximagewidth', 800);
$this->SetPreference('maximageheight', 640);
$this->SetPreference('imagejpgquality', 80);
$this->SetPreference('thumbjpgquality', 80);
$this->SetPreference('use_permissions', false);
$this->SetPreference('newgalleries_active', true);
$this->SetPreference('use_comment_wysiwyg', false);
$this->SetPreference('editdirdates', false);
$this->SetPreference('editfiledates', false);
$this->SetPreference('fe_folderpath', 'modules/Gallery/images/folder.png');
$this->SetPreference('be_folderpath', 'modules/Gallery/images/foldersmall.png');
// register an event that the Gallery will issue.
// $this->CreateEvent( 'OnGalleryPreferenceChange' );
$this->AddEventHandler('Core', 'ContentPostRender', false);
// insert defaults
$query = "INSERT INTO " . cms_db_prefix() . "module_gallery (filename, filepath, filedate, fileorder, active, defaultfile, galleryid, title, comment) VALUES (?,?,?,-1,1,0,0,?,?)";
$db->Execute($query, array('', '', date("Y-m-d H:i:s", filemtime('../uploads/images/Gallery')), cms_html_entity_decode($this->Lang('friendlyname')), cms_html_entity_decode($this->Lang('defaultgallerycomment'))));
$query = "INSERT INTO " . cms_db_prefix() . "module_gallery_props (fileid,templateid,hideparentlink) VALUES (?,?,?)";
$db->Execute($query, array(1, 0, 1));
示例6: array
}
$params['detailpage'] = $detailpage;
}
if (isset($params['browsecat']) && $params['browsecat'] == 1) {
$this->DoAction('browsecat', $id, $params, $returnid);
return;
}
$entryarray = array();
$query1 = "\n SELECT \n mn.*, \n mnc.news_category_name, \n mnc.long_name, \n u.username, \n u.first_name,\n u.last_name \n FROM " . cms_db_prefix() . "module_news mn\n LEFT OUTER JOIN " . cms_db_prefix() . "module_news_categories mnc \n ON mnc.news_category_id = mn.news_category_id \n LEFT OUTER JOIN " . cms_db_prefix() . "users u \n ON u.user_id = mn.author_id \n WHERE \n status = 'published' \n AND\n ";
$query2 = "\n SELECT count(mn.news_id) as count\n FROM " . cms_db_prefix() . "module_news mn\n LEFT OUTER JOIN " . cms_db_prefix() . "module_news_categories mnc \n ON mnc.news_category_id = mn.news_category_id \n LEFT OUTER JOIN " . cms_db_prefix() . "users u \n ON u.user_id = mn.author_id \n WHERE \n status = 'published' \n AND\n ";
if (isset($params['category_id'])) {
$query1 .= " ( mnc.news_category_id = '" . (int) $params['category_id'] . "' ) AND ";
$query2 .= " ( mnc.news_category_id = '" . (int) $params['category_id'] . "' ) AND ";
} else {
if (isset($params["category"]) && $params["category"] != '') {
$category = cms_html_entity_decode(trim($params['category']));
$categories = explode(',', $category);
$query1 .= " (";
$query2 .= " (";
$count = 0;
foreach ($categories as $onecat) {
if ($count > 0) {
$query1 .= ' OR ';
$query2 .= ' OR ';
}
if (strpos($onecat, '|') !== FALSE || strpos($onecat, '*') !== FALSE) {
$tmp = $db->qstr(trim(str_replace('*', '%', str_replace("'", '_', $onecat))));
$query1 .= "upper(mnc.long_name) like upper({$tmp})";
$query2 .= "upper(mnc.long_name) like upper({$tmp})";
} else {
$tmp = $db->qstr(trim(str_replace("'", '_', $onecat)));
示例7: lang
$url = "editcss.php" . $urlext . "&css_id=" . $row['assoc_css_id'] . "&from=templatecssassoc&templateid=" . $id;
$tmp['editlink'] = '<a href="' . $url . '">' . $row['css_name'] . '</a>';
$tmp['editimg'] = '<a href="' . $url . '">' . $themeObject->DisplayImage('icons/system/edit.gif', lang('editcss'), '', '', 'systemicon') . '</a>';
if ($modify) {
$downurl = 'listcssassoc.php' . $urlext . '&dir=down&cssid=' . $row['assoc_css_id'] . '&id=' . $id . '&type=template';
$upurl = 'listcssassoc.php' . $urlext . '&dir=up&cssid=' . $row['assoc_css_id'] . '&id=' . $id . '&type=template';
if ($idx > 0) {
$tmp['uplink'] = '<a href="' . $upurl . '">' . $themeObject->DisplayImage('icons/system/arrow-u.gif', lang('up'), '', '', 'systemicon') . '</a>';
}
if ($idx + 1 < $count) {
$tmp['downlink'] = '<a href="' . $downurl . '">' . $themeObject->DisplayImage('icons/system/arrow-d.gif', lang('down'), '', '', 'systemicon') . '</a>';
}
$idx++;
}
if ($delasso) {
$tmp['deletelink'] = "<a href=\"deletecssassoc.php" . $urlext . "&id={$id}&css_id=" . $row["assoc_css_id"] . "&type={$type}\" onclick=\"return confirm('" . cms_html_entity_decode(lang('deleteassociationconfirm', $row["css_name"])) . "');\">" . $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon') . "</a>";
}
$cssassoc[] = $tmp;
}
} else {
redirect('listtemplates.php' . $urlext . '&message=' . lang('sqlerror', 'listcssassoc.php'));
}
if (count($cssassoc)) {
$smarty->assign('cssassoc', $cssassoc);
}
# this var is used to store the css ids that should not appear in the
# dropdown
$notinto = "";
foreach ($csslist as $key) {
$notinto .= "{$key},";
}
示例8: cms_html_entity_decode
<?php
if (!$this->CheckPermission('Modify Templates')) {
// todo, permissions message here
return;
}
if (!isset($params['template'])) {
$this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('error_insufficientparams'));
return;
}
$template = cms_html_entity_decode($params['template']);
$this->DeleteTemplate($template);
$this->myRedirectToTab($id, 'uploadform_template');
示例9: trim
// image type
$val = $params['feu_input_' . $propname];
if (isset($_FILES[$id . 'feu_input_' . $propname]) && $_FILES[$id . 'feu_input_' . $propname]['size'] > 0) {
// It is an upload file type
$result = $this->ManageImageUpload($id, 'feu_input_', $propname, $uid);
if ($result[0] == false) {
$params['error'] = 1;
$params['message'] = $this->Lang('error') . ' ' . $result[1];
$this->Redirect($id, 'changesettings', $returnid, $params);
}
$val = $result[1];
}
} else {
if (isset($params['feu_input_' . $propname])) {
$val = trim($params['feu_input_' . $propname]);
$val = cms_html_entity_decode($val);
} else {
continue;
}
}
// check for forced unique values.
if ($force_unique && !$this->IsUserPropertyValueUnique($uid, $propname, $val)) {
$params['error'] = 1;
$params['message'] = $this->Lang('error_user_nonunique_field_value', $propname);
$this->Redirect($id, 'changesettings', $returnid, $params);
}
$ret = $this->SetUserPropertyFull($propname, $val, $uid);
if ($ret == false) {
$params['error'] = 1;
$params['message'] = $this->Lang('error_settingproperty') . ' ' . $propname;
$this->Redirect($id, 'changesettings', $returnid, $params);
示例10: cms_html_entity_decode
$params['errors'] = $this->Lang('error_insufficientparams');
$this->Redirect($id, $the_action, $returnid, $params);
return;
}
if (isset($params['cancel'])) {
$module->_current_tab = $this->_current_tab;
$module->RedirectToTab($id, $this->_current_tab, '', $the_action);
}
if (!isset($params['templatecontent'])) {
$params['errors'] = $this->Lang('error_insufficientparams');
$module->Redirect($id, $params['origaction'], '', $params);
return;
}
if (!isset($params['template'])) {
$params['errors'] = $this->Lang('error_insufficientparams');
$module->Redirect($id, $params['origaction'], '', $params);
return;
}
$module->SetTemplate($params['prefix'] . $params['template'], cms_html_entity_decode($params['templatecontent'], ENT_QUOTES, get_encoding()));
audit('', $module->GetName(), 'Edited Tempalte ' . $params['prefix'] . $params['template']);
if (isset($params['applybutton'])) {
unset($params['applybutton']);
$_SESSION['cge_edittemplate'] = $params;
$this->Redirect($id, 'edittemplate', $returnid);
}
if ($this->_current_tab != '') {
$module->_current_tab = $this->_current_tab;
$module->RedirectToTab($id, '', '', $the_action);
return;
}
$module->Redirect($id, $the_action);
示例11: display_hierarchy
//.........这里部分代码省略.........
}
/* friendly name column */
if ($columnstodisplay['friendlyname']) {
$columns['friendlyname'] = $one->FriendlyName();
}
/* owner column */
if ($columnstodisplay['owner']) {
$columns['owner'] = ' ';
if ($one->Owner() > -1) {
$columns['owner'] = $users[$one->Owner()]->username;
}
}
/* active column */
if ($columnstodisplay['active']) {
$columns['active'] = ' ';
$txt = '';
if (check_permission($userid, 'Manage All Content') && $one->Type() != 'errorpage') {
if ($one->Active()) {
$txt = $one->DefaultContent() ? $image_true : "<a href=\"{$thisurl}&setinactive=" . $one->Id() . "\" onclick=\"xajax_content_setinactive(" . $one->Id() . ");return false;\">" . $image_set_false . "</a>";
} else {
$txt = "<a href=\"{$thisurl}&setactive=" . $one->Id() . "\" onclick=\"xajax_content_setactive(" . $one->Id() . ");return false;\">" . $image_set_true . "</a>";
}
}
if (!empty($txt)) {
$columns['active'] = $txt;
}
}
/* default content */
if ($columnstodisplay['default']) {
$columns['default'] = ' ';
$txt = '';
if (check_permission($userid, 'Manage All Content')) {
if ($one->IsDefaultPossible()) {
$txt = $one->DefaultContent() ? $image_true : "<a href=\"{$thisurl}&makedefault=" . $one->Id() . "\" onclick=\"if(confirm('" . cms_html_entity_decode(lang("confirmdefault", $one->Name())) . "')) xajax_content_setdefault(" . $one->Id() . ");return false;\">" . $image_set_true . "</a>";
}
}
if (!empty($txt)) {
$columns['default'] = $txt;
}
}
/* move column */
if ($columnstodisplay['move']) {
// code for move up is simple
$columns['move'] = ' ';
$txt = '';
if (check_permission($userid, 'Manage All Content') || $author_allpages) {
$sameLevel = $root->getSiblingCount();
if ($sameLevel > 1) {
if ($one->ItemOrder() - 1 <= 0) {
$txt .= "<a onclick=\"xajax_content_move(" . $one->Id() . ", " . $one->ParentId() . ", 'down'); return false;\" href=\"{$thisurl}&direction=down&content_id=" . $one->Id() . "&parent_id=" . $one->ParentId() . "&page=" . $page . "\">";
$txt .= $downImg;
$txt .= "</a> ";
} else {
if ($one->ItemOrder() - 1 == $sameLevel - 1) {
$txt .= " <a class=\"move_up\" onclick=\"xajax_content_move(" . $one->Id() . ", " . $one->ParentId() . ", 'up'); return false;\" href=\"{$thisurl}&direction=up&content_id=" . $one->Id() . "&parent_id=" . $one->ParentId() . "&page=" . $page . "\">";
$txt .= $upImg;
$txt .= "</a>";
} else {
$txt .= "<a onclick=\"xajax_content_move(" . $one->Id() . ", " . $one->ParentId() . ", 'down'); return false;\" href=\"{$thisurl}&direction=down&content_id=" . $one->Id() . "&parent_id=" . $one->ParentId() . "&page=" . $page . "\">";
$txt .= $downImg;
$txt .= "</a> <a onclick=\"xajax_content_move(" . $one->Id() . ", " . $one->ParentId() . ", 'up'); return false;\" href=\"{$thisurl}&direction=up&content_id=" . $one->Id() . "&parent_id=" . $one->ParentId() . "&page=" . $page . "\">";
$txt .= $upImg;
$txt .= "</a>";
}
}
}
示例12: trim
}
// get the username and password
$username = '';
if (isset($params['input_username'])) {
$username = trim($params['input_username']);
$username = cms_html_entity_decode($username);
}
$password = '';
if (isset($params['input_password'])) {
$password = trim($params['input_password']);
$password = cms_html_entity_decode($password);
}
$repeatpassword = '';
if (isset($params['input_repeatpassword'])) {
$repeatpassword = trim($params['input_repeatpassword']);
$repeatpassword = cms_html_entity_decode($repeatpassword);
}
// check if the username is valid
if ($username == '') {
$params['error'] = 1;
if ($feusers->GetPreference('username_is_email')) {
$params['message'] = $this->Lang('error_emptyemail');
} else {
$params['message'] = $this->Lang('error_emptyusername');
}
return $this->myRedirect($id, 'default', $returnid, $params);
}
//Ok, we have a valid $username, now we check to see
//if we're checking the whitelist (or blacklist) and
//and then if it matches...
if ($this->GetPreference('enable_whitelist', '') != '') {
示例13: trim
if (isset($params['prefix'])) {
$prefix = trim($params['prefix']);
}
if (!isset($params['templatecontent'])) {
$params['errors'] = $this->Lang('error_insufficientparams');
$module->Redirect($id, $params['origaction'], '', $params);
return;
}
if ($template == "" || $prefix == "") {
$params['errors'] = $this->Lang('error_insufficientparams');
$module->Redirect($id, $params['origaction'], '', $params);
return;
}
$newtemplate = $prefix . $template;
// check if this template already exists
$txt = trim($module->GetTemplate($newtemplate));
if ($txt != "") {
$params['errors'] = $this->Lang('error_templatenameexists');
$this->Redirect($id, $params['origaction'], '', $params);
return;
}
// we're ready to set it
$txt = cms_html_entity_decode($params['templatecontent'], ENT_QUOTES, get_encoding());
$module->SetTemplate($newtemplate, $txt);
audit('', $module->GetName(), 'Added Template ' . $newtemplate);
if ($this->_current_tab != '') {
$module->_current_tab = $this->_current_tab;
$module->RedirectToTab($id, '', '', $the_action);
return;
}
$module->Redirect($id, $the_action);
示例14: lang
echo $themeObject->DisplayImage('icons/system/copy.gif', lang('copy'), '', '', 'systemicon');
echo "</a></td>\n";
} else {
echo "<td> </td>";
}
// if user has right to edit
if ($modify) {
echo "<td class=\"icons_wide\"><a href=\"editcss.php" . $urlext . "&css_id=" . $one["css_id"] . "\">";
echo $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'), '', '', 'systemicon');
echo "</a></td>\n";
} else {
echo "<td> </td>";
}
// if user has right to delete
if ($delcss) {
echo "<td class=\"icons_wide\"><a href=\"deletecss.php" . $urlext . "&css_id=" . $one["css_id"] . "\" onclick=\"return confirm('" . cms_html_entity_decode(lang('deleteconfirm', $one['css_name'])) . "');\">";
echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
echo "</a></td>\n";
} else {
echo "<td> </td>";
}
if ($delcss) {
echo '<td><input type="checkbox" name="multistylesheet-' . $one['css_id'] . '" /></td>';
} else {
echo '<td></td>';
}
echo "</tr>\n";
"row1" == $currow ? $currow = "row2" : ($currow = "row1");
}
$counter++;
}
示例15: lang
echo $themeObject->DisplayImage('icons/system/copy.gif', lang('copy'), '', '', 'systemicon');
echo "</a></td>\n";
}
# edit template
if ($edit) {
echo "<td class=\"icons_wide\"><a href=\"edittemplate.php" . $urlext . "&template_id=" . $onetemplate->id . "\">";
echo $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'), '', '', 'systemicon');
echo "</a></td>\n";
}
# remove template
if ($remove) {
echo "<td class=\"icons_wide\">";
if ($onetemplate->default) {
echo ' ';
} else {
echo "<a href=\"deletetemplate.php" . $urlext . "&template_id=" . $onetemplate->id . "\" onclick=\"return confirm('" . cms_html_entity_decode(lang('deleteconfirm', $onetemplate->name)) . "');\">";
echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'), '', '', 'systemicon');
echo "</a>";
}
echo "</td>\n";
}
if ($onetemplate->default) {
echo '<td> </td>';
} else {
echo '<td><input type="checkbox" name="multitemplate-' . $onetemplate->id . '" /></td>';
}
echo "</tr>\n";
$currow == "row1" ? $currow = "row2" : ($currow = "row1");
}
$counter++;
}