$action = strstr($linkParts[1], '?', true); if ($action == false) { $action = strstr($linkParts[1], '/', true); } if ($action == false) { $action = $linkParts[1]; } $permissions = $sf_context->getUserRoleManager()->getScreenPermissions($module, $action); if ($permissions->canRead()) { $url = $reportBuilder->replaceHeaderParam($link, $mergedLinkParams); echo link_to(esc_specialchars(__($column)), $url); } else { echo esc_specialchars(__($column)); } } else { echo esc_specialchars(__($column)); } ?> </td> <?php } else { ?> <input type="hidden" name="<?php echo $key; ?> []" value="<?php echo $column; ?> "/> <?php }
public static function renderYuiNodes($tree, $options = array()) { ProjectConfiguration::getActive()->loadHelpers(array('Qubit', 'Text', 'Escaping')); $yuiTree = array(); foreach ($tree as $key => $item) { $node = array(); if ($item instanceof QubitTerm) { if (QubitTerm::ROOT_ID != $item->id) { $label = render_title($item); $node['label'] = truncate_text($label, 50); if (50 < strlen($label)) { $node['title'] = esc_specialchars($label); } $node['href'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term')); $node['id'] = $item->id; $node['parentId'] = $item->parentId; $node['isLeaf'] = (string) (!$item->hasChildren()); $node['moveUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'default', 'action' => 'move')); $node['expandUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term', 'action' => 'treeView')); } else { $label = render_title($options['currentNode']->taxonomy); $node['label'] = truncate_text($label, 50); if (50 < strlen($label)) { $node['title'] = esc_specialchars($label); } $node['href'] = sfContext::getInstance()->routing->generate(null, array($options['currentNode']->taxonomy, 'module' => 'taxonomy')); $node['id'] = $item->id; $node['parentId'] = null; $node['isLeaf'] = (string) (!$item->hasChildren()); $node['moveUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'default', 'action' => 'move')); $node['expandUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term', 'action' => 'treeView')); } if (isset($options['currentNode']) && $options['currentNode'] === $item) { $node['style'] = 'ygtvlabel currentTextNode'; } } else { $count = intval($item['total']) - intval($item['limit']); $node['label'] = sfContext::getInstance()->i18n->__('+%1% ...', array('%1%' => $count)); $node['parentId'] = $item['parentId']; $node['href'] = '#'; $node['isLeaf'] = 'true'; $node['style'] = 'seeAllNode XmlHttpRequest'; } $yuiTree[] = $node; } return $yuiTree; }
</function> <occupation> <descriptiveNote><?php echo esc_specialchars($resource->functions); ?> </descriptiveNote> </occupation> <mandate> <term><?php echo esc_specialchars($resource->mandates); ?> </term> </mandate> <structureOrGenealogy><?php echo $eac->structureOrGenealogy; ?> </structureOrGenealogy> <generalContext><?php echo $eac->generalContext; ?> </generalContext>
protected static function toDiscursiveSet($value) { // Convert XML entities $value = esc_specialchars($value); // Simple lists $value = preg_replace('/(?:^\\*.*\\r?\\n)*(?:^\\*.*)/m', "<list>\n\$0\n</list>", $value); $value = preg_replace('/(?:^-.*\\r?\\n)*(?:^-.*)/m', "<list>\n\$0\n</list>", $value); $value = preg_replace('/^(?:\\*|-)\\s*(.*)/m', '<item>$1</item>', $value); $value = '<p>' . preg_replace('/(?:\\r?\\n){2,}/', "</p>\n<p>", $value) . '</p>'; return $value; }
<?php echo get_component('search', 'box'); ?> </div> </section> <?php echo get_component_slot('header'); ?> </header> <?php if (sfConfig::get('app_toggleDescription')) { ?> <div id="site-slogan"> <div class="container"> <div class="row"> <div class="span12"> <span><?php echo esc_specialchars(sfConfig::get('app_siteDescription')); ?> </span> </div> </div> </div> </div> <?php }
?> <relation><?php echo url_for(array($resource->repository, 'module' => 'repository'), true); ?> </relation> <relation><?php echo esc_specialchars($resource->repository); ?> </relation> <?php } ?> <?php foreach ($dc->coverage as $item) { ?> <coverage><?php echo esc_specialchars($item); ?> </coverage> <?php } ?> <rights><?php echo esc_specialchars($resource->accessConditions); ?> </rights> </oai_dc:dc>
</p></userestrict> <?php } if (0 < strlen($value = $descendant->getFindingAids(array('cultureFallback' => true)))) { ?> <otherfindaid encodinganalog="3.4.5"><p><?php echo esc_specialchars($value); ?> </p></otherfindaid> <?php } if (0 < count($publicationNotes = $descendant->getNotesByType(array('noteTypeId' => QubitTerm::PUBLICATION_NOTE_ID)))) { foreach ($publicationNotes as $note) { ?> <bibliography encodinganalog="3.5.4"><p><?php echo esc_specialchars($note); ?> </p></bibliography><?php } } if ($descendant->getRgt() == $descendant->getLft() + 1) { ?> </c> <?php } else { array_push($nestedRgt, $descendant->getRgt()); } // close <c> tag when we reach end of child list $rgt = $descendant->getRgt(); while (count($nestedRgt) > 0 && $rgt + 1 == $nestedRgt[count($nestedRgt) - 1]) { $rgt = array_pop($nestedRgt);
foreach ($resource->getChildren() as $item) { ?> <relatedItem id="<?php echo $item->identifier; ?> " type="constituent"><?php $mods = new sfModsPlugin($item); echo esc_specialchars($mods); ?> </relatedItem> <?php } ?> <accessCondition><?php echo esc_specialchars($resource->getAccessConditions(array('cultureFallback' => true))); ?> </accessCondition> <recordInfo> <recordCreationDate><?php echo $resource->createdAt; ?> </recordCreationDate> <recordChangeDate><?php echo $resource->updatedAt; ?> </recordChangeDate> </recordInfo> </mods>