/** * @return string */ function getContent() { $output = $this->getText(); if ($this->getAttribute('adm:htmlEditor') !== true) { $output = $this->encodePlainText(); if ($this->getAttribute('forceP')) { $output = org_glizy_helpers_Html::forceP($output); } return $output; } else { $output = javascript_to_html($output); // esegue la paginazione if (!is_null($this->getAttribute("paginate"))) { $paginateClass =& $this->getAttribute("paginate"); $this->_content = $paginateClass->splitTextResult($output); } if ($this->getAttribute('parseInternalLinks')) { $output = org_glizy_helpers_Link::parseInternalLinks($output); } $attributes = array(); $attributes['id'] = $this->getId(); $attributes['class'] = $this->getAttribute('cssClass'); $wrapTag = $this->getAttribute('wrapTag'); $outputTag = !empty($wrapTag) ? '<' . $wrapTag . ' ' . $this->_renderAttributes($attributes) . '>' : ''; $outputTag .= $output; $outputTag .= !empty($wrapTag) ? '</' . $wrapTag . '>' : ''; return $outputTag; } }
function __construct(&$parent, &$node) { $this->_treeManager =& $parent; $this->attributes =& $node; $this->id = $this->attributes['id']; $this->parentId = $this->attributes['parentId']; $this->pageType = $this->attributes['pageType']; $this->title = javascript_to_html($this->attributes['title']); $this->titleLink = javascript_to_html($this->attributes['titleLink']); $this->order = $this->attributes['order']; $this->isVisible = $this->attributes['isVisible']; $this->depth = $this->attributes['depth']; $this->type = $this->attributes['type']; $this->isLocked = $this->attributes['isLocked']; $this->creationDate = $this->attributes['creationDate']; $this->modificationDate = $this->attributes['modificationDate']; $this->showTitle = $this->attributes['showTitle']; $this->hasComment = $this->attributes['hasComment']; $this->printPdf = $this->attributes['printPdf'] == 1; $this->cssClass = $this->attributes['cssClass']; $this->icon = $this->attributes['icon']; if (isset($this->attributes['linkDescription'])) { $this->linkDescription = javascript_to_html($this->attributes['linkDescription']); } if (isset($this->attributes['moduleClass'])) { $this->url = $this->attributes['moduleClass']; } if (isset($this->attributes['extendsPermissions'])) { $this->url = $this->attributes['extendsPermissions']; } if (isset($this->attributes['url'])) { $this->url = $this->attributes['url']; } if (isset($this->attributes['select'])) { $this->select = $this->attributes['select']; } }
$mime_type = 'image/png'; $extension = '.png'; $send_buffer_size = 4096; // check for GD support if (!function_exists('ImageCreate')) { fatal_error('Error: Server does not support PHP image generation'); } // clean up text if (empty($_GET['text'])) { fatal_error('Error: No text specified.'); } $text = $_GET['text']; if (get_magic_quotes_gpc()) { $text = stripslashes($text); } $text = javascript_to_html($text); // look for cached copy, send if it exists $hash = md5(basename($font_file) . $font_size . $font_color . $background_color . $transparent_background . $text); $cache_filename = $cache_folder . '/' . $_GET['text'] . $extension; if ($cache_images && ($file = @fopen($cache_filename, 'rb'))) { header('Content-type: ' . $mime_type); while (!feof($file)) { print $buffer = fread($file, $send_buffer_size); } fclose($file); exit; } // check font availability $font_found = is_readable($font_file); if (!$font_found) { fatal_error($font_file);