本文整理汇总了PHP中sensitiveIO::isPositiveInteger方法的典型用法代码示例。如果您正苦于以下问题:PHP sensitiveIO::isPositiveInteger方法的具体用法?PHP sensitiveIO::isPositiveInteger怎么用?PHP sensitiveIO::isPositiveInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sensitiveIO
的用法示例。
在下文中一共展示了sensitiveIO::isPositiveInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addScript
/**
* Add / replace a script to process to the queue.
*
* @param string $module : the module codename in charge of the script process
* @param array $parameters : The script parameters
* @param integer $id : The script id to replace (default : false, add a new script)
* @return void
* @access public
* @static
*/
static function addScript($module, $parameters, $id = false)
{
if ($module && is_array($parameters) && $parameters) {
$sqlFields = "\n\t\t\t\tmodule_reg='" . sensitiveIO::sanitizeSQLString($module) . "',\n\t\t\t\tparameters_reg='" . sensitiveIO::sanitizeSQLString(serialize($parameters)) . "'";
if (sensitiveIO::isPositiveInteger($id)) {
$sql = "\n\t\t\t\t\tupdate\n\t\t\t\t\t\tregenerator\n\t\t\t\t\tset\n\t\t\t\t\t\t" . $sqlFields . "\n\t\t\t\t\twhere\n\t\t\t\t\t\tid_reg='" . $id . "'";
} else {
$sql = "\n\t\t\t\t\tinsert into\n\t\t\t\t\t\tregenerator\n\t\t\t\t\tset\n\t\t\t\t\t\t" . $sqlFields;
}
$q = new CMS_query($sql);
//$q->executePreparedQuery($sql, $sqlParameters);
return true;
}
return false;
}
示例2: scriptInfo
/**
* Module script info : get infos for a given script parameters
*
* @param array $parameters the task parameters
* task : string task to execute
* module : string module codename for the task
* uid : string module uid
* @return string : HTML scripts infos
* @access public
*/
function scriptInfo($parameters)
{
if (isset($parameters['field']) && sensitiveIO::isPositiveInteger($parameters['field'])) {
if (!is_object($this->_objectValues[$parameters['field']]) || !method_exists($this->_objectValues[$parameters['field']], 'scriptInfo')) {
return false;
}
//then pass query to field
return $this->_objectValues[$parameters['field']]->scriptInfo($parameters);
} else {
//this is an object related script
switch ($parameters['task']) {
case 'emailNotification':
global $cms_language;
if ($parameters['type'] == 'validate') {
return $cms_language->getMessage(self::MESSAGE_OBJECT_VALIDATION_AWAIT_NOTIFICATION, false, MOD_POLYMOD_CODENAME);
} elseif ($parameters['type'] == 'delete') {
return $cms_language->getMessage(self::MESSAGE_OBJECT_DELETION_AWAIT_NOTIFICATION, false, MOD_POLYMOD_CODENAME);
}
break;
default:
$this->raiseError('Unknown script task to do : ' . print_r($parameters, true));
return false;
break;
}
}
return false;
}
示例3: setValues
/**
* set object Values
*
* @param array $values : the POST result values
* @param string $prefixname : the prefix used for post names
* @param boolean newFormat : new automne v4 format (default false for compatibility)
* @param integer $objectID : the current object id. Must be set, but default is blank for compatibility with other objects
* @return boolean true on success, false on failure
* @access public
*/
function setValues($values, $prefixName, $newFormat = false, $objectID = '')
{
if (!sensitiveIO::isPositiveInteger($objectID)) {
$this->raiseError('ObjectID must be a positive integer : ' . $objectID);
return false;
}
//get module codename
$moduleCodename = CMS_poly_object_catalog::getModuleCodenameForField($this->_field->getID());
//create a sub prefix for CMS_dialog_href object
$subPrefixName = 'href' . $prefixName . $this->_field->getID() . '_0';
//create object CMS_href & CMS_dialog_href
$hrefDialog = new CMS_dialog_href(new CMS_href($this->_subfieldValues[0]->getValue()), $subPrefixName);
if ($newFormat) {
$hrefDialog->create($values[$subPrefixName], $moduleCodename, $objectID, $this->_field->getID());
if ($hrefDialog->hasError()) {
return false;
}
$href = $hrefDialog->getHREF();
if (!$this->_subfieldValues[0]->setValue($href->getTextDefinition())) {
return false;
}
$content = array('datas' => array('polymodFieldsValue[' . $subPrefixName . ']' => sensitiveIO::decodeEntities($this->_subfieldValues[0]->getValue())));
$view = CMS_view::getInstance();
$view->addContent($content);
} else {
//check for http://
if ($values[$subPrefixName . 'link_external'] && io::strpos($values[$subPrefixName . 'link_external'], 'http://') !== 0) {
$values[$subPrefixName . 'link_external'] = 'http://' . $values[$subPrefixName . 'link_external'];
}
$hrefDialog->doPost($moduleCodename, $objectID, $this->_field->getID());
if ($hrefDialog->hasError()) {
return false;
}
$href = $hrefDialog->getHREF();
if (!$this->_subfieldValues[0]->setValue($href->getTextDefinition())) {
return false;
}
}
return true;
}
示例4: foreach
break;
case 'order':
if (sizeof($paramValue)) {
foreach ($paramValue as $orderName => $orderValue) {
// Order direction
$orderName = trim($orderName, '()');
if ($paramValue && !$value['search'][$searchName][$paramType][$orderName]) {
//mandatory ?
$formok = false;
}
}
}
break;
default:
$paramType = trim($paramType, '()');
if (sensitiveIO::isPositiveInteger($paramType)) {
if ($paramValue && !$value['search'][$searchName][$paramType]) {
//mandatory ?
$formok = false;
}
}
break;
}
}
}
}
}
if (!$formok) {
$cms_message .= $cms_language->getMessage(MESSAGE_FORM_ERROR_MANDATORY_FIELDS);
} else {
if (!$cms_block->writeToPersistence($cms_page->getID(), $cs, $rowTag, RESOURCE_LOCATION_EDITION, false, array("value" => $value))) {
示例5: isDraft
/**
* is this template content in draft ?
*
* @return boolean
* @access public
*/
function isDraft()
{
if (!sensitiveIO::isPositiveInteger($this->getID())) {
return false;
}
$sql = "select \n\t\t\t\t\t1\n\t\t\t\tfrom \n\t\t\t\t\tmod_standard_clientSpaces_edition \n\t\t\t\twhere \n\t\t\t\t\ttemplate_cs='" . $this->getID() . "'";
$q = new CMS_query($sql);
return $q->getNumRows(true) ? true : false;
}
示例6: checkTagValues
protected function checkTagValues(&$tag, $requirements)
{
if (!is_array($requirements)) {
$this->raiseError('Tag requirements must be an array');
return false;
}
foreach ($requirements as $name => $requirementType) {
//check parameter existence
if ($requirementType['mandatory'] && !isset($tag['attributes'][$name])) {
if ($this->_mode == self::CHECK_PARSING_MODE) {
$this->_parsingError .= "\n" . 'Malformed ' . $tag['nodename'] . ' tag : missing \'' . $name . '\' attribute';
return false;
} else {
$this->raiseError('Malformed ' . $tag['nodename'] . ' tag : missing \'' . $name . '\' attribute');
return false;
}
} elseif (isset($tag['attributes'][$name])) {
//if any, check value requirement
$message = false;
switch ($requirementType['value']) {
case 'alphanum':
if ($tag['attributes'][$name] != sensitiveIO::sanitizeAsciiString($tag['attributes'][$name], '', '_')) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute must only be composed with alphanumeric caracters (0-9a-z_) : ' . $tag['attributes'][$name];
}
break;
case 'language':
if (isset($this->_parameters['module'])) {
$languages = CMS_languagesCatalog::getAllLanguages($this->_parameters['module']);
} else {
$languages = CMS_languagesCatalog::getAllLanguages();
}
if (!isset($languages[$tag['attributes'][$name]])) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute must only be a valid language code : ' . $tag['attributes'][$name];
}
break;
case 'object':
if (!sensitiveIO::isPositiveInteger(io::substr($tag['attributes'][$name], 9, -3))) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute does not represent a valid object';
}
break;
case 'field':
if (strrpos($tag['attributes'][$name], 'fields') === false || !sensitiveIO::isPositiveInteger(io::substr($tag['attributes'][$name], strrpos($tag['attributes'][$name], 'fields') + 9, -2))) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute does not represent a valid object field';
}
break;
case 'page':
if (!io::isPositiveInteger($tag['attributes'][$name])) {
// Assuming the structure {websitecodename:pagecodename}
$page = trim($tag['attributes'][$name], "{}");
if (strpos($page, ":") !== false) {
list($websiteCodename, $pageCodename) = explode(':', $page);
$website = CMS_websitesCatalog::getByCodename($websiteCodename);
if (!$website) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute : unknow Website codename : ' . $websiteCodename . '';
} else {
$pageID = CMS_tree::getPageByCodename($pageCodename, $website, false, false);
if (!$pageID) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute : unknow page codename ' . $pageCodename . ' in website : ' . $websiteCodename . '';
}
}
} else {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute must be an integer or use the format websitecodename:pagecodename';
}
} else {
if (!CMS_tree::getPageByID($tag['attributes'][$name])) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute : unknow pageID : ' . $tag['attributes'][$name];
}
}
break;
default:
//check
if (!preg_match('#^' . $requirementType['value'] . '$#i', $tag['attributes'][$name])) {
$message = 'Malformed ' . $tag['nodename'] . ' tag : \'' . $name . '\' attribute must match expression \'' . $requirementType['value'] . '\' : ' . $tag['attributes'][$name];
}
break;
}
if ($message) {
if ($this->_mode == self::CHECK_PARSING_MODE) {
$this->_parsingError .= "\n<br />" . $message;
return false;
} else {
$this->raiseError($message);
return false;
}
}
}
}
return true;
}
示例7: getAll
/**
* Get all form fields
*
* @param integer $formID : the form id for wanted fields
* @param boolean $outputobjects : return array of CMS_forms_field instead of array of ids (default : false)
* @param boolean $withDesactivedFields : add desactived fields to returned list (default : false)
* @access public
* @return array of CMS_forms_field
*/
function getAll($formID, $outputobjects = false, $withDesactivedFields = false)
{
if (!sensitiveIO::isPositiveInteger($formID)) {
$this->raiseError("FormID must be a positive integer : " . $formID);
return false;
}
$sql = "\n\t\t\tselect\n\t\t\t\tid_fld as id\n\t\t\tfrom\n\t\t\t\tmod_cms_forms_fields\n\t\t\twhere\n\t\t\t\tform_fld='" . $formID . "'\n\t\t";
if (!$withDesactivedFields) {
$sql .= " and active_fld = '1'";
}
$sql .= " order by order_fld asc";
$q = new CMS_query($sql);
$return = array();
while ($id = $q->getValue('id')) {
if ($outputobjects) {
$return[$id] = new CMS_forms_field($id);
} else {
$return[$id] = $id;
}
}
return $return;
}
示例8: checkCatId
function checkCatId($catId)
{
return io::strpos($catId, 'cat') === 0 && sensitiveIO::isPositiveInteger(io::substr($catId, 3));
}
示例9: userBelongsToGroup
/**
* Is user belongs to given group ?
*
* @return boolean
* @access public
* @static
*/
static function userBelongsToGroup($userID, $groupID)
{
if (!sensitiveIO::isPositiveInteger($userID) || !sensitiveIO::isPositiveInteger($groupID)) {
CMS_grandFather::raiseError('User id and group id must be positive integers');
return false;
}
$sql = "\n\t\t\tselect\n\t\t\t\t1\n\t\t\tfrom\n\t\t\t\tprofileUsersByGroup\n\t\t\twhere\n\t\t\t\tuserId_gu = '" . SensitiveIO::sanitizeSQLString($userID) . "'\n\t\t\t\tand groupId_gu = '" . SensitiveIO::sanitizeSQLString($groupID) . "'\n\t\t";
$q = new CMS_query($sql);
return $q->getNumRows() ? true : false;
}
示例10: explode
$printableCS = sensitiveIO::request('printableCS') ? explode(',', sensitiveIO::request('printableCS')) : array();
//load interface instance
$view = CMS_view::getInstance();
//set default display mode for this page
$view->setDisplayMode(CMS_view::SHOW_JSON);
//This file is an admin file. Interface must be secure
$view->setSecure();
//CHECKS user has templates clearance
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDIT_TEMPLATES)) {
//templates
CMS_grandFather::raiseError('User has no rights template editions');
$view->setActionMessage($cms_language->getMessage(MESSAGE_ERROR_NO_RIGHTS_FOR_TEMPLATES));
$view->show();
}
//load template if any
if (sensitiveIO::isPositiveInteger($templateId)) {
$template = CMS_pageTemplatesCatalog::getByID($templateId);
if (!$template || $template->hasError()) {
CMS_grandFather::raiseError('Unknown template for given Id : ' . $templateId);
$view->setActionMessage($cms_language->getMessage(MESSAGE_ERROR_UNKNOWN_TEMPLATE));
$view->show();
}
} elseif ($templateId == 'print') {
$templateFile = new CMS_file(PATH_TEMPLATES_FS . "/print.xml");
} else {
$template = false;
}
$cms_message = '';
switch ($action) {
case 'properties':
//Edition
示例11: getInput
/**
* Return the needed form field tag for current object field
*
* @param array $values : parameters values array(parameterName => parameterValue) in :
* id : the form field id to set
* @param multidimentionnal array $tags : xml2Array content of atm-function tag
* @return string : the form field HTML tag
* @access public
*/
function getInput($fieldID, $language, $inputParams)
{
//hidden field : use parent method
if (isset($inputParams['hidden']) && ($inputParams['hidden'] == 'true' || $inputParams['hidden'] == 1)) {
return parent::getInput($fieldID, $language, $inputParams);
}
global $cms_user;
$params = $this->getParamsValues();
if (isset($inputParams['prefix'])) {
$prefixName = $inputParams['prefix'];
} else {
$prefixName = '';
}
//serialize all htmlparameters
//$htmlParameters = $this->serializeHTMLParameters($inputParams);
$html = '';
//create fieldname
$fieldName = $prefixName . $this->_field->getID() . '_0';
//create field value
$value = $this->_subfieldValues[0]->getValue();
if ($params['html']) {
// Insert prefered text editor for textarea field
$module = CMS_poly_object_catalog::getModuleCodenameForField($this->_field->getID());
$toolbarset = !$params['toolbar'] ? $module : $params['toolbar'];
if (class_exists('CMS_wysiwyg_toolbar')) {
$toolbar = CMS_wysiwyg_toolbar::getByCode($toolbarset, $cms_user);
$value = $toolbar->hasModulePlugins() ? CMS_textEditor::parseInnerContent($value, $module) : $value;
}
$CKEditor = new CKEditor(PATH_MAIN_WR . '/ckeditor/');
$CKEditor->returnOutput = true;
$html .= $CKEditor->editor($fieldName, $value, array('language' => $language->getCode(), 'width' => $params['toolbarWidth'] ? $params['toolbarWidth'] : '100%', 'height' => sensitiveIO::isPositiveInteger($params['toolbarHeight']) ? $params['toolbarHeight'] : 200, 'customConfig' => PATH_MAIN_WR . '/ckeditor/config.php?toolbar=' . $toolbarset));
} else {
//serialize all htmlparameters
$htmlParameters = $this->serializeHTMLParameters($inputParams);
//append field id to html field parameters (if not already exists)
$htmlParameters .= !isset($inputParams['id']) ? ' id="' . $prefixName . $this->_field->getID() . '_0"' : '';
$width = '100%';
if ($params['toolbarWidth']) {
$width = io::substr($params['toolbarWidth'], -1, 1) == '%' ? $params['toolbarWidth'] : $params['toolbarWidth'] . 'px';
}
$html .= '<textarea type="text" name="' . $fieldName . '"' . $htmlParameters . ' style="width:' . $width . ';height:' . (sensitiveIO::isPositiveInteger($params['toolbarHeight']) ? $params['toolbarHeight'] : 200) . 'px">' . str_replace('<br />', "\n", str_replace(array("\n", "\r"), "", $value)) . '</textarea>' . "\n";
}
if (POLYMOD_DEBUG) {
$html .= ' <span class="admin_text_alert">(Field : ' . $this->_field->getID() . ' - SubField : 0)</span>';
}
//append html hidden field which store field name
if ($html) {
$html .= '<input type="hidden" name="polymodFields[' . $this->_field->getID() . ']" value="' . $this->_field->getID() . '" />';
}
return $html;
}
示例12: writeToPersistence
/**
* Writes the cmsprofile into persistence (MySQL for now).
*
* @return boolean true on success, false on failure
* @access public
*/
function writeToPersistence()
{
$sql_fields = "\n\t\t\tadministrationClearance_pr='" . SensitiveIO::sanitizeSQLString($this->_adminClearance) . "',\n\t\t\tpageClearancesStack_pr='" . SensitiveIO::sanitizeSQLString($this->_pageClearances->getTextDefinition()) . "',\n\t\t\tvalidationClearancesStack_pr='" . SensitiveIO::sanitizeSQLString($this->_validationClearances->getTextDefinition()) . "',\n\t\t\tmoduleClearancesStack_pr='" . SensitiveIO::sanitizeSQLString($this->_moduleClearances->getTextDefinition()) . "',\n\t\t\ttemplateGroupsDeniedStack_pr='" . SensitiveIO::sanitizeSQLString($this->_templateGroupsDenied->getTextDefinition()) . "',\n\t\t\trowGroupsDeniedStack_pr='" . SensitiveIO::sanitizeSQLString($this->_rowGroupsDenied->getTextDefinition()) . "'\n\t\t";
if ($this->_id) {
$sql = "\n\t\t\t\tupdate\n\t\t\t\t\tprofiles\n\t\t\t\tset\n\t\t\t\t\t" . $sql_fields . "\n\t\t\t\twhere\n\t\t\t\t\tid_pr='" . $this->_id . "'\n\t\t\t";
} else {
$sql = "\n\t\t\t\tinsert into\n\t\t\t\t\tprofiles\n\t\t\t\tset\n\t\t\t\t\t" . $sql_fields;
}
//pr($sql);
$q = new CMS_query($sql);
if ($q->hasError()) {
return false;
} elseif (!$this->_id) {
$this->_id = $q->getLastInsertedID();
}
if (!sensitiveIO::isPositiveInteger($this->_moduleCategoriesClearances->getProfileID())) {
$this->_moduleCategoriesClearances->setProfileID($this->_id);
}
// Write moduleCategories clearances to persistence also
return $this->_moduleCategoriesClearances->writeToPersistence();
}
示例13: setOrders
/**
* Reset websites order
*
* @param array $websitesIDsOrdered : the websites IDs ordered
* @return boolean true on success, false on failure
* @access public
*/
static function setOrders($websitesIDsOrdered)
{
$count = 1;
foreach ($websitesIDsOrdered as $websiteID) {
if (!sensitiveIO::isPositiveInteger($websiteID)) {
CMS_grandFather::raiseError('Website id must be a positive integer : ' . $websiteID);
return false;
}
$sql = "\n\t\t\t\tupdate \n\t\t\t\t\twebsites \n\t\t\t\tset \n\t\t\t\t\torder_web='" . $count . "'\n\t\t\t\twhere\n\t\t\t\t\tid_web='" . $websiteID . "'\n\t\t\t";
$q = new CMS_query($sql);
if ($q->hasError()) {
CMS_grandFather::raiseError('Saving order error for website : ' . $websiteID);
return false;
}
$count++;
}
return true;
}
示例14: getSearch
/**
* Get the search.
*
* @param integer $searchType : the type of the search (see constants)
* @return array of CMS_page the result pages
* @access public
*/
function getSearch($keywords, $user, $public = false, $withPageContent = false)
{
if (is_a($user, 'CMS_profile_user')) {
$cms_language = $user->getLanguage();
} else {
$cms_language = new CMS_language('fr');
}
$results = array();
$count = 0;
/*$messages = array();
$message = '';*/
$where = $order = '';
$foundLinkToIDs = $foundLinkFromIDs = $foundPagesFromTemplate = $foundPagesFromRow = $matches = array();
// Clean keywords
$keywords = SensitiveIO::sanitizeSQLString($keywords);
$keywords = strtr($keywords, ",;", " ");
$blocks = array();
$blocks = array_map("trim", array_unique(explode(" ", $keywords)));
$cleanedBlocks = array();
foreach ($blocks as $block) {
if ($block !== '' || sensitiveIO::isPositiveInteger($block)) {
$block = str_replace(array('%', '_'), array('\\%', '\\_'), $block);
$cleanedBlocks[] = $block;
}
}
// Separate block codes
if ($cleanedBlocks) {
$allDatas = array();
$allCodes = CMS_search::getAllCodes();
foreach ($allCodes as $code) {
$datas = array();
foreach (array_keys($cleanedBlocks) as $key) {
if (strstr($cleanedBlocks[$key], $code . ':')) {
$datas[] = $cleanedBlocks[$key];
unset($cleanedBlocks[$key]);
}
}
if ($datas) {
$allDatas[$code] = $datas;
}
}
$allDatas[self::SEARCH_TYPE_DEFAULT] = $cleanedBlocks;
// Get IDs from all specific codes
$foundIDs = array();
$allLinksNumber = 0;
foreach ($allCodes as $code) {
switch ($code) {
case self::SEARCH_TYPE_LINKTO:
if (isset($allDatas[self::SEARCH_TYPE_LINKTO])) {
$foundLinkToIDs = array();
$where = '';
$count = 0;
foreach ($allDatas[self::SEARCH_TYPE_LINKTO] as $block) {
$tabValues = explode(':', $block);
if (SensitiveIO::isPositiveInteger($tabValues[1])) {
$where .= $count ? ' or ' : '';
$count++;
$where .= " start_lre = '" . $tabValues[1] . "' ";
}
}
if ($where) {
$select = ' stop_lre ';
$from = 'linx_real_public';
$sql = "\n\t\t\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t\t\t\t\t" . $select . "\n\t\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\t\t" . $from . "\n\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t" . $where;
$q = new CMS_query($sql);
$arr = array();
while ($arr = $q->getArray()) {
$foundLinkToIDs[] = $arr["stop_lre"];
}
// Count links number
$allLinksNumber += count($foundLinkToIDs);
$where = $select = '';
}
}
break;
case self::SEARCH_TYPE_LINKFROM:
if (isset($allDatas[self::SEARCH_TYPE_LINKFROM])) {
$foundLinkFromIDs = array();
$where = '';
$count = 0;
/*$messagesIDs = array();*/
foreach ($allDatas[self::SEARCH_TYPE_LINKFROM] as $block) {
$tabValues = explode(':', $block);
if (SensitiveIO::isPositiveInteger($tabValues[1])) {
$where .= $count ? ' or ' : '';
$count++;
$where .= " stop_lre = '" . $tabValues[1] . "' ";
}
}
if ($where) {
$select = ' start_lre ';
$from = 'linx_real_public';
$sql = "\n\t\t\t\t\t\t\t\t\tselect\n\t\t\t\t\t\t\t\t\t\t" . $select . "\n\t\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\t\t" . $from . "\n\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t" . $where;
//.........这里部分代码省略.........
示例15: array
});
tabs.insert(' . $index . ', panel);
}
';
}
break;
case 'edit':
$panelTitle = $cms_language->getMessage(MESSAGE_PAGE_EDIT_CONTENT);
$panelDisabled = $isEditable && !$hasRedirect ? 'false' : 'true';
$panelTipTitle = $cms_language->getMessage(MESSAGE_PAGE_EDIT_CONTENT_TIP_TITLE);
$panelTip = $cms_language->getMessage(MESSAGE_PAGE_EDIT_CONTENT_TIP_DESC);
$panelPicto = 'atm-pic-big-edit';
if ($hasDraft) {
$panelTip .= '<br /><br /><strong>' . $cms_language->getMessage(MESSAGE_PAGE_EDIT_NOT_VALIDATED) . '</strong>';
}
if ($hasLock && sensitiveIO::isPositiveInteger($hasLock)) {
$lockUser = CMS_profile_usersCatalog::getById($hasLock);
$lockDate = $cms_page->getLockDate();
$panelTip .= '<br /><br /><strong>' . $cms_language->getMessage(MESSAGE_PAGE_LOCKEDBY) . ' </strong>' . $lockUser->getFullName() . ' ' . $cms_language->getMessage(MESSAGE_PAGE_LOCKED_ON_AT, array($lockDate->getLocalizedDate($cms_language->getDateFormat()), $lockDate->getLocalizedDate('H:i:s')));
} elseif (!$isEditable) {
$panelTip .= '<br /><br />' . $cms_language->getMessage(MESSAGE_PAGE_EDIT_CONTENT_TIP_DISABLED_DESC);
}
$panelURL = PATH_ADMIN_WR . '/page-content.php?page=' . $cms_page->getID() . ($querystring ? '&' . $querystring : '');
$panelEditable = 'true';
break;
case 'edited':
$panelTitle = $cms_language->getMessage(MESSAGE_PAGE_PREVIZ);
$panelPicto = 'atm-pic-big-edited';
$panelDisabled = $hasPreviz && !$hasRedirect ? 'false' : 'true';
$panelTipTitle = $cms_language->getMessage(MESSAGE_PAGE_PREVIZ_TIP_TITLE);
$panelTip = $cms_language->getMessage(MESSAGE_PAGE_PREVIZ_TIP_DESC);