當前位置: 首頁>>代碼示例>>PHP>>正文


PHP sensitiveIO::checkXHTMLValue方法代碼示例

本文整理匯總了PHP中sensitiveIO::checkXHTMLValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP sensitiveIO::checkXHTMLValue方法的具體用法?PHP sensitiveIO::checkXHTMLValue怎麽用?PHP sensitiveIO::checkXHTMLValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sensitiveIO的用法示例。


在下文中一共展示了sensitiveIO::checkXHTMLValue方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

             $view->setActionMessage($cms_language->getJsMessage(MESSAGE_PAGE_ERROR_UPDATE_BLOCK_CONTENT));
         }
     } else {
         CMS_grandFather::raiseError('Can\'t get block class type ' . $blockClass . ' to update content');
         $view->setActionMessage($cms_language->getJsMessage(MESSAGE_PAGE_ERROR_UPDATE_BLOCK_CONTENT));
     }
     break;
 case 'update-block-text':
 case 'update-block-varchar':
     //update block content
     if (class_exists($blockClass)) {
         $cms_block = new $blockClass();
         $cms_block->initializeFromBasicAttributes($blockId);
         if ($action == 'update-block-text') {
             $errors = '';
             if (!sensitiveIO::checkXHTMLValue($value, $errors)) {
                 //Send an error to user about his content
                 $jscontent = "\n\t\t\t\t\tAutomne.message.popup({\n\t\t\t\t\t\tmsg: \t\t\t\t'" . $cms_language->getJsMessage(MESSAGE_PAGE_COPY_PASTE_ERROR) . ($errors ? "<br /><br />" . sensitiveIO::sanitizeJSString($errors) : '') . "',\n\t\t\t\t\t\tbuttons: \t\t\tExt.MessageBox.OK,\n\t\t\t\t\t\tclosable: \t\t\ttrue,\n\t\t\t\t\t\ticon: \t\t\t\tExt.MessageBox.ERROR\n\t\t\t\t\t});";
                 $view->addJavascript($jscontent);
                 $view->show();
             }
             $value = CMS_textEditor::parseOuterContent($value);
         }
         $cms_block->writeToPersistence($cms_page->getID(), $cs, $rowTag, RESOURCE_LOCATION_EDITION, false, array("value" => $value));
         //instanciate the clientspace
         $clientSpace = CMS_moduleClientSpace_standard_catalog::getByTemplateAndTagID($tpl, $cs, $visualMode == PAGE_VISUALMODE_FORM);
         //get block's row from CS
         $row = $clientSpace->getRow($rowId, $rowTag);
         if ($row) {
             //get row datas
             $datas = $row->getData($cms_language, $cms_page, $clientSpace, PAGE_VISUALMODE_FORM);
開發者ID:davidmottet,項目名稱:automne,代碼行數:31,代碼來源:page-content-controler.php

示例2: checkMandatory

 /**
  * check object Mandatories Values
  *
  * @param array $values : the POST result values
  * @param string prefixname : the prefix used for post names
  * @return boolean true on success, false on failure
  * @access public
  */
 function checkMandatory($values, $prefixName, $newFormat = false)
 {
     //if field is required check values
     $params = $this->getParamsValues();
     if ($this->_field->getValue('required')) {
         if (!isset($values[$prefixName . $this->_field->getID() . '_0']) || !$values[$prefixName . $this->_field->getID() . '_0']) {
             return false;
         }
     }
     //check value for copy/paste and XHTML conformity
     if ($newFormat && $params['html'] && isset($values[$prefixName . $this->_field->getID() . '_0']) && $values[$prefixName . $this->_field->getID() . '_0']) {
         $value = $values[$prefixName . $this->_field->getID() . '_0'];
         $errors = '';
         if (!sensitiveIO::checkXHTMLValue($value, $errors)) {
             //Send an error to user about his content
             global $cms_language;
             if (is_object($cms_language)) {
                 return $cms_language->getMessage(self::MESSAGE_OBJECT_TEXT_COPY_PASTE_ERROR, array($this->getFieldLabel($cms_language)), MOD_POLYMOD_CODENAME) . ($errors ? '<br /><br />' . $errors : '');
             } else {
                 return false;
             }
         }
     }
     return true;
 }
開發者ID:davidmottet,項目名稱:automne,代碼行數:33,代碼來源:object_text.php


注:本文中的sensitiveIO::checkXHTMLValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。