/** * Return a BoostVersion representation of value. * @return BoostVersion */ static function from($value) { if ($value instanceof BoostVersion) { return $value; } else { if (is_string($value)) { $value = trim($value, " \t\n\r\v/"); switch ($value) { case 'master': return self::master(); case 'develop': return self::develop(); case 'latest': return self::latest(); } // TODO: Make this stricter by only matching whole string. Might break something? if (preg_match('@(\\d+)[._](\\d+)[._](\\d+)([-._ ]?b(?:eta)?(\\d*))?@', $value, $matches)) { return self::release((int) $matches[1], (int) $matches[2], (int) $matches[3], empty($matches[4]) ? false : (int) ($matches[5] ?: 1)); } else { throw new BoostVersion_Exception("Invalid version: " . html_encode($value)); } } else { die("Can't convert to BoostVersion."); } } }
function printHeadingImage($randomImage) { global $_zp_themeroot; $id = getAlbumId(); echo '<div id="randomhead">'; if (is_null($randomImage)) { echo '<img src="' . $_zp_themeroot . '/images/zen-logo.jpg" alt="' . gettext('There were no images from which to select the random heading.') . '" />'; } else { $randomAlbum = $randomImage->getAlbum(); $randomAlt1 = $randomAlbum->getTitle(); if ($randomAlbum->getAlbumId() != $id) { $randomAlbum = $randomAlbum->getParent(); while (!is_null($randomAlbum) && $randomAlbum->getAlbumId() != $id) { $randomAlt1 = $randomAlbum->getTitle() . ":\n" . $randomAlt1; $randomAlbum = $randomAlbum->getParent(); } } $randomImageURL = html_encode(getURL($randomImage)); if (getOption('allow_upscale')) { $wide = 620; $high = 180; } else { $wide = min(620, $randomImage->getWidth()); $high = min(180, $randomImage->getHeight()); } echo "<a href='" . $randomImageURL . "' title='" . gettext('Random picture...') . "'>"; $html = "<img src='" . html_encode($randomImage->getCustomImage(NULL, $wide, $high, $wide, $high, NULL, NULL, !getOption('Watermark_head_image'))) . "' width='{$wide}' height='{$high}' alt=" . '"' . html_encode($randomAlt1) . ":\n" . html_encode($randomImage->getTitle()) . '" />'; $html = zp_apply_filter('custom_image_html', $html, false); echo $html; echo '</a>'; } echo '</div>'; }
function do_bbcode_img($action, $attributes, $content, $params, $node_object) { if ($action == "validate") { return true; } return "<img src=\"" . html_encode($content) . "\" alt=\"\" title=\"\" />"; }
function display($results, $db) { setlocale(LC_MONETARY, 'en_US'); $outputArray = array(); foreach ($results as $result) { $formattedRec = ""; if ($formattedRec == "") { if ($result["grant_title"] != "") { $formattedRec = html_encode($result["grant_title"]) . ", "; } if ($result["funding_status"] == "funded") { if ($result["amount_received"] != "") { $formattedRec = $formattedRec . money_format('%(#10n', $result["amount_received"]) . ", "; } } else { if ($result["funding_status"] == "submitted") { if ($result["amount_received"] != "") { $formattedRec = $formattedRec . money_format('%(#10n', $result["amount_received"]) . ", "; } } } if ($result["type"] != "") { $formattedRec = $formattedRec . html_encode($result["type"]) . ", "; } if (isset($result["agency"]) && $result["agency"] != "") { $formattedRec = $formattedRec . html_encode($result["agency"]) . ", "; } if (isset($result["start_year"])) { $formattedRec = $formattedRec . html_encode($result['start_month']) . "-" . html_encode($result['start_year']) . " / " . (html_encode($result['end_month']) == 0 ? "N/A" : html_encode($result['end_month']) . "-" . html_encode($result['end_year'])) . ", "; } if ($result["principal_investigator"] != "") { $formattedRec = $formattedRec . html_encode($result["principal_investigator"]); } if ($result["co_investigator_list"] != "") { $formattedRec = $formattedRec . html_encode($result["co_investigator_list"]); } // Check for existance of extra comma or colon at the end of the record // if there is one remove it $lengthOfRec = strlen($formattedRec) - 2; $lastChar = substr($formattedRec, $lengthOfRec, 1); if ($lastChar == "," || $lastChar == ":") { $formattedRec = substr($formattedRec, 0, $lengthOfRec); } } // Do not allow duplicates (i.e. multiple faculty report the same publication. if (in_array($formattedRec, $outputArray) === false) { $outputArray[] = $formattedRec; } } if (count($outputArray) > 0) { for ($u = 0; $u < count($outputArray); $u++) { $ctr = $u + 1; $outputString = $outputArray[$u] . "<br /><br />"; echo $outputString; } } else { echo "No Grants for the specified query.<br>"; } }
function set_var(&$result, $var, $type, $multibyte = false, $regex = '') { settype($var, $type); $result = $var; if ($type == 'string') { $result = html_encode($result, $multibyte); } }
function handleOption($option, $currentValue) { $list = unserialize(getOption('filterIPAccess_IP_list')); if (getOption('zp_plugin_filterIPAccess')) { $disabled = ''; } else { $disabled = ' disabled="disabled"'; } $key = 0; foreach ($list as $key => $range) { ?> <input type="textbox" size="20" name="filterIPAccess_ip_start_<?php echo $key; ?> " value="<?php echo html_encode($range['start']); ?> "<?php echo $disabled; ?> /> - <input type="textbox" size="20" name="filterIPAccess_ip_end_<?php echo $key; ?> " value="<?php echo html_encode($range['end']); ?> "<?php echo $disabled; ?> /> <br /> <?php } $i = $key; while ($i < $key + 4) { $i++; ?> <input type="textbox" size="20" name="filterIPAccess_ip_start_<?php echo $i; ?> " value=""<?php echo $disabled; ?> /> - <input type="textbox" size="20" name="filterIPAccess_ip_end_<?php echo $i; ?> " value=""<?php echo $disabled; ?> /> <br /> <?php } }
function html_encode_with_fallback($text) { // Could probably handle this better with php 5.4 or multibyte // extensions. $encoded_text = html_encode($text); if ($text && !$encoded_text) { $encoded_text = html_encode(preg_replace('/[\\x80-\\xFF]/', "�", $text)); } return $encoded_text; }
function filter_test($filter, $params, $expected) { ob_start(); echo_filtered($filter, $params); $result = ob_get_clean(); if (trim($result) != trim($expected)) { global $failure_count; ++$failure_count; echo "<h2>Failure for filter {$filter}</h2>", '<p>Expected:</p><pre>', html_encode($expected), '</pre><p>Result:</p><pre>', html_encode($result), '</pre>'; } }
function m9PrintBreadcrumb() { global $_zp_current_album, $_zp_last_album; $parents = getParentAlbums(); $n = count($parents); if ($n > 0) { foreach ($parents as $parent) { $url = rewrite_path("/" . pathurlencode($parent->name) . "/", "/index.php?album=" . urlencode($parent->name)); echo '<li><a href="' . htmlspecialchars($url) . '">' . html_encode($parent->getTitle()) . '</a></li>'; } } }
function upload_form($uploadlimit, $passedalbum) { ?> <input type="hidden" name="existingfolder" id="existingfolder" value="false" /> <input type="hidden" name="folder" id="folderslot" value="<?php echo html_encode($passedalbum); ?> " /> <input type="hidden" name="albumtitle" id="albumtitleslot" value="" /> <input type="hidden" name="publishalbum" id="publishalbumslot" value="" /> <?php }
function serializationAction(&$body) { //Take the raw response $rawResponse =& $body->getResults(); adapterMap($rawResponse); //Now serialize it $encodedResponse = html_encode($rawResponse); if (count(NetDebug::getTraceStack()) > 0) { $trace = "/*" . implode("\n", NetDebug::getTraceStack()) . "*/"; $encodedResponse = $trace . "\n" . $encodedResponse; } $body->setResults($encodedResponse); }
static function error_404($file, $message = null) { $error = "404 Not Found"; header("{$_SERVER["SERVER_PROTOCOL"]} {$error}"); $head = <<<HTML <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <title>Boost C++ Libraries - 404 Not Found</title> HTML; $content = '<h1>' . html_encode($error) . '</h1><p>File "' . html_encode($file) . '" not found.</p><p>'; $content .= html_encode($message); $content .= '</p>'; BoostFilter::display_template(array('head' => $head, 'content' => $content)); }
static function edit($output, $image, $prefix, $subpage, $tagsort) { if (isImagePhoto($image)) { if (is_array($image->filename)) { $albumname = dirname($image->filename['source']); $imagename = basename($image->filename['source']); } else { $albumname = $image->albumlink; $imagename = $image->filename; } $output .= '<div class="button buttons tooltip" title="' . gettext('Permanently crop the actual image.') . '">' . "\n" . '<a href="' . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/crop_image.php?a=' . pathurlencode($albumname) . "\n" . '&i=' . urlencode($imagename) . '&performcrop=backend&subpage=' . $subpage . '&tagsort=' . html_encode($tagsort) . '">' . "\n" . '<img src="images/shape_handles.png" alt="" />' . gettext("Crop image") . '</a>' . "\n" . '<br class="clearall" />' . '</div>' . "\n"; } return $output; }
function debug($obj, $title = '-', $html_encode = false) { // if config file says to ignore errors, suppress debugging info as well $display_errors = get_cfg_var('display_errors'); if (!$display_errors) { return; } $out = print_r($obj, true); if ($html_encode) { $out = html_encode($out); } echo "<fieldset><legend>{$title}</legend><pre>{$out}</pre></fieldset>"; return $out; }
/** * Custom opton handler--creates the clear ratings button * * @param string $option * @param string $currentValue */ function handleOption($option, $currentValue) { if ($option == "PHPMailer_password") { ?> <input type="password" size="40" name="<?php echo $option; ?> " style="width: 338px" value="<?php echo html_encode($currentValue); ?> "> <?php } }
/** * If in debug mode, prints the given error message and continues; otherwise redirects * to the given error message image and exits; designed for a production gallery. * @param $errormessage string the error message to print if $_GET['debug'] is set. * @param $errorimg string the filename of the error image to display for production. Defaults * to 'err-imagegeneral.png'. Images should be located in /zen/images . */ function imageError($status_text, $errormessage, $errorimg = 'err-imagegeneral.png') { global $newfilename, $album, $image; $debug = isset($_GET['debug']); if ($debug) { echo '<strong>' . sprintf(gettext('Zenphoto Image Processing Error: %s'), $errormessage) . '</strong>' . '<br /><br />' . sprintf(gettext('Request URI: [ <code>%s</code> ]'), html_encode(getRequestURI())) . '<br />PHP_SELF: [ <code>' . html_encode($_SERVER['PHP_SELF']) . '</code> ]' . (empty($newfilename) ? '' : '<br />' . sprintf(gettext('Cache: [<code>%s</code>]'), '/' . CACHEFOLDER . '/' . html_encode(sanitize($newfilename, 3))) . ' ') . (empty($image) || empty($album) ? '' : ' <br />' . sprintf(gettext('Image: [<code>%s</code>]'), html_encode(sanitize($album . '/' . $image, 3))) . ' <br />'); } else { if (DEBUG_IMAGE_ERR) { trigger_error($errormessage, E_USER_NOTICE); } header("HTTP/1.0 {$status_text}"); header("Status: {$status_text}"); header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/images/' . $errorimg); } exitZP(); }
function fetch_event_resources_text($event_id = 0) { global $db; $output = array(); if ($event_id = (int) $event_id) { $query = "SELECT * FROM `event_files` WHERE `event_id` = " . $db->qstr($event_id); $results = $db->GetAll($query); if ($results) { $output["html"] = ""; $output["text"] = ""; $output["html"] .= "<table style=\"margin-top: 20px; width: 100%\" cellspacing=\"0\" cellpadding=\"3\" border=\"0\">\n"; $output["html"] .= "<thead>\n"; $output["html"] .= "\t<tr>\n"; $output["html"] .= "\t\t<td style=\"background-color: #EEEEEE; border: 1px #666666 solid; font-weight: bold\">File Title</td>\n"; $output["html"] .= "\t\t<td style=\"background-color: #EEEEEE; border: 1px #666666 solid; border-left: none; font-weight: bold\">Last Updated</td>\n"; $output["html"] .= "\t</tr>\n"; $output["html"] .= "</thead>\n"; $output["html"] .= "<tbody>\n"; foreach ($results as $result) { $output["html"] .= "<tr>\n"; $output["html"] .= "\t<td>\n"; $output["html"] .= "\t\t<a href=\"" . ENTRADA_URL . "/admin/events?section=content&id=" . $event_id . "\" title=\"Click to update " . html_encode($result["file_title"]) . "\" style=\"font-weight: bold\">" . html_encode($result["file_title"]) . "</a>"; $output["html"] .= "\t\t<span class=\"content-small\">(" . readable_size($result["file_size"]) . ")</span>"; $output["html"] .= "\t</td>\n"; $output["html"] .= "\t<td>" . ((int) $result["updated_date"] ? date(DEFAULT_DATE_FORMAT, $result["updated_date"]) : "Over two years ago") . "</td>\n"; $output["html"] .= "</tr>\n"; } $output["html"] .= "</tbody>\n"; $output["html"] .= "</table>\n"; foreach ($results as $key => $result) { $output["text"] .= " - " . $result["file_title"] . " (" . readable_size($result["file_size"]) . ")\n"; $output["text"] .= " Last Updated: " . ((int) $result["updated_date"] ? date(DEFAULT_DATE_FORMAT, $result["updated_date"]) : "Over two years ago") . "\n\n"; } } else { $output["html"] .= "<div class=\"display-red\">\n"; $output["html"] .= "<strong>There are no resources available for download.</strong>\n"; $output["html"] .= "<br /><br />\n"; $output["html"] .= "Please take a moment to upload any relevant documents by <a href=\"" . ENTRADA_URL . "/admin/events?section=content&id=" . $event_id . "\" style=\"font-weight: bold\">clicking here</a>.\n"; $output["html"] .= "</div>\n"; $output["text"] .= " *There are no resources available for download.*\n\n"; $output["text"] .= " Please take a moment to upload any relevant documents at the following URL:\n"; $output["text"] .= " " . ENTRADA_URL . "/admin/events?section=content&id=" . $event_id . "\n\n"; } } return $output; }
function theme_content($map) { global $_zp_current_image, $points; ?> <!-- Colorbox section --> <div id="images"> <?php $points = array(); while (next_image()) { if ($map) { $coord = getGeoCoord($_zp_current_image); if ($coord) { $points[] = $coord; } } ?> <div class="image"> <div class="imagethumb"> <?php if (isImagePhoto()) { // colorbox is only for real images $link = html_encode(getDefaultSizedImage()) . '" class="thickbox"'; } else { $link = html_encode(getImageURL()) . '"'; } ?> <a href="<?php echo $link; ?> " title="<?php echo getBareImageTitle(); ?> "> <?php printImageThumb(getImageTitle()); ?> </a></div> </div> <?php } ?> </div> <br class="clearall" /> <?php @call_user_func('printSlideShowLink'); }
/** * The main query function. Runs the SQL on the connection and handles errors. * @param string $sql sql code * @param bool $noerrmsg set to false to supress the error message * @return results of the sql statements * @since 0.6 */ function query($sql, $errorstop = true) { global $_zp_DB_connection, $_zp_conf_vars; if (is_null($_zp_DB_connection)) { db_connect(); } // Changed this to mysql_query - *never* call query functions recursively... $result = mysql_query($sql, $_zp_DB_connection); if (!$result) { if ($errorstop) { $sql = html_encode($sql); zp_error(sprintf(gettext('MySQL Query ( <em>%1$s</em> ) failed. MySQL returned the error <em>%2$s</em>'), $sql, mysql_error())); } return false; } return $result; }
/** * Get current URL. * @param bool $withQuery * @return string */ public static final function getCurrentUrl(bool $withQuery = true) : string { // filter function static $filter; if ($filter == null) { $filter = function ($input) { $input = substr($input, 0, strcspn($input, "\n\r")); $input = str_ireplace(['%00', '%0a', '%1a'], '', $input); return html_encode($input); }; } $url = 'http' . ($_SERVER['SERVER_PORT'] == '443' ? 's' : '') . '://' . $_SERVER['SERVER_NAME']; // add path $url .= $filter(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); // add query if ($withQuery && $_SERVER['QUERY_STRING'] != '') { $url .= '?' . $filter($_SERVER['QUERY_STRING']); } return $url; }
public function attributes($attributes) { $name_prefix = keyVal('name_prefix', $attributes, $this->name_prefix); if ($name_prefix && is_array($attributes) && array_key_exists('name', $attributes)) { $attributes['name'] = $name_prefix . '[' . $attributes['name'] . ']'; } if (is_array($attributes)) { unset($attributes['name_prefix']); } /** Automate using BS4 tether Tooltips */ if (is_array($attributes) && array_key_exists('tooltip', $attributes)) { $attributes['data-toggle'] = 'tooltip'; $attributes['title'] = html_encode($attributes['tooltip']); unset($attributes['tooltip']); } unset($attributes['']); unset($attributes[null]); unset($attributes[0]); return parent::attributes($attributes); }
function externalLinkBox($prior, $image, $prefix, $subpage, $tagsort) { if ($prior) { $prior .= '<br /><hr>'; } if (isset($_SESSION['externalLinksize_' . $prefix])) { $size = sanitize_numeric($_SESSION['externalLinksize_' . $prefix]); unset($_SESSION['externalLinksize_' . $prefix]); } else { $size = false; } $output = $img = ''; if ($size) { $link = $image->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); $img = ' <img src="' . html_encode(pathurlencode($link)) . '" height="15" width="15" />'; $output .= '<input type="text" style="width:100%" value="' . html_encode($link) . '" />'; } $output .= gettext('link for image of size:') . ' <input type="text" name="externalLinksize_' . $prefix . '" size="3" value="' . $size . '" />' . $img; return $prior . $output; }
function display($dir) { $handle = opendir($dir); $title = html_encode("Index listing for {$this->data->path}"); $this->title = $title; $this->data->noindex = true; $content = "<h3>{$title}</h3>\n<ul>\n"; while (($file = readdir($handle)) !== false) { if (substr($file, 0, 1) == '.') { continue; } if (is_dir("{$dir}{$file}")) { $file .= '/'; } $file = html_encode($file); $content .= "<li><a rel='nofollow' href='{$file}'>{$file}</a></li>\n"; } $content .= "</ul>\n"; $this->data->content = $content; $this->display_template($this->template_params($content)); }
static function themeJS() { $theme = getCurrentTheme(); $css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/jquery.bxslider.css'; if (file_exists($css)) { $css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/jquery.bxslider.css'; } else { $css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/bxslider_thumb_nav/jquery.bxslider.css'; } ?> <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?> /bxslider_thumb_nav/jquery.bxslider.min.js"></script> <link rel="stylesheet" type="text/css" href="<?php echo html_encode($css); ?> " /> <?php }
/** * Returns a new "image" object based on the file extension * * @param object $album the owner album * @param string $filename the filename * @param bool $quiet set true to supress error messages (used by loadimage) * @return object */ function newImage($album, $filename, $quiet = false) { global $_zp_extra_filetypes; if (is_array($filename)) { $xalbum = new Album(new Gallery(), $filename['folder']); $filename = $filename['filename']; } else { $xalbum = $album; } if (!is_object($xalbum) || strtoLower(get_class($xalbum)) != 'album' || !$xalbum->exists) { $msg = sprintf(gettext('Bad album object parameter to newImage(%s)'), $filename); debugLogBacktrace($msg); trigger_error(html_encode($msg), E_USER_NOTICE); return NULL; } if ($ext = is_valid_other_type($filename)) { $object = $_zp_extra_filetypes[$ext]; $image = new $object($xalbum, $filename); } else { if (is_valid_image($filename)) { $image = new _Image($xalbum, $filename); } else { $image = NULL; } } if ($image) { zp_apply_filter('image_instantiate', $image); if ($image->exists) { return $image; } else { return NULL; } } if (!$quiet) { $msg = sprintf(gettext('Bad filename suffix in newImage(%s)'), $filename); debugLogBacktrace($msg); trigger_error(html_encode($msg), E_USER_NOTICE); } return NULL; }
static function themeJS() { $theme = getCurrentTheme(); $css = SERVERPATH . '/' . THEMEFOLDER . '/' . internalToFilesystem($theme) . '/jcarousel.css'; if (file_exists($css)) { $css = WEBPATH . '/' . THEMEFOLDER . '/' . $theme . '/jcarousel.css'; } else { $css = WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/jcarousel_thumb_nav/jcarousel.css'; } ?> <script> (function($) { var userAgent = navigator.userAgent.toLowerCase(); $.browser = { version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, '0'])[1], safari: /webkit/.test(userAgent), opera: /opera/.test(userAgent), msie: /msie/.test(userAgent) && !/opera/.test(userAgent), mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) }; })(jQuery); </script> <script type="text/javascript" src="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?> /jcarousel_thumb_nav/jquery.jcarousel.pack.js"></script> <link rel="stylesheet" type="text/css" href="<?php echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER; ?> /jcarousel_thumb_nav/jquery.jcarousel.css" /> <link rel="stylesheet" type="text/css" href="<?php echo html_encode($css); ?> " /> <?php }
function theme_content($map) { global $_zp_current_image, $points; ?> <!-- Image page section --> <div id="images"> <?php $points = array(); while (next_image()) { if ($map) { $coord = getGeoCoord($_zp_current_image); if ($coord) { $points[] = $coord; } } ?> <div class="image"> <div class="imagethumb"><a href="<?php echo html_encode(getImageURL()); ?> " title="<?php echo html_encode(getBareImageTitle()); ?> "><?php printImageThumb(getImageTitle()); ?> </a></div> </div> <?php } ?> </div> <br class="clearall" /> <?php @call_user_func('printSlideShowLink'); }
* along with Entrada. If not, see <http://www.gnu.org/licenses/>. * * @author Organisation: Queen's University * @author Unit: MEdTech Unit * @author Developer: Matt Simpson <*****@*****.**> * @copyright Copyright 2011 Queen's University. All Rights Reserved. * */ if (!defined("PARENT_INCLUDED") || !defined("IN_AAMC_CI")) { exit; } elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) { header("Location: " . ENTRADA_URL); exit; } elseif (!$ENTRADA_ACL->amIAllowed("report", "read", false)) { $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)"; add_error("Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance."); echo display_error(); application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]"); } else { if ($router && $router->initRoute()) { if (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], "int"))) { $REPORT_ID = $tmp_input; } if ($REPORT_ID) { $query = "SELECT * FROM `reports_aamc_ci` WHERE `raci_id` = " . $db->qstr($REPORT_ID) . " AND `organisation_id` = " . $db->qstr($ENTRADA_USER->getActiveOrganisation()); $REPORT = $db->GetRow($query); if ($REPORT) { $SHORT_REPORT_TITLE = date("Y", $REPORT["report_start"]) . "-" . date("Y", $REPORT["report_finish"]) . " Curriculum"; $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/reports/aamc/manage?id=" . $REPORT_ID, "title" => $SHORT_REPORT_TITLE); $sidebar_html = "<ul class=\"menu\">"; $sidebar_html .= "\t<li class=\"link\"><a href=\"" . ENTRADA_URL . "/admin/reports/aamc/manage/edit?id=" . $REPORT_ID . "\">Edit Report</a></li>\n";
var imglink = ''; var includetype = ''; var imagesize = ''; var linkpart1 = ''; var linkpart2 = ''; var linktype = ''; var textwrap = ''; var textwrap_float = ''; var infowrap1 = ''; var infowrap2 = ''; var titlewrap = ''; var descwrap = ''; var cssclass = ''; var albumname = '<?php if (isset($_GET["album"])) { echo html_encode(sanitize($_GET["album"])); } else { $_GET["album"] = ""; } ?> '; var webpath = '<?php echo WEBPATH; ?> ' //var modrewrite = '<?php echo MOD_REWRITE; ?> '; //var modrewritesuffix = '<?php echo getOption("mod_rewrite_image_suffix");
/** * album validity check * @param type $folder8 * @return boolean */ protected function _albumCheck($folder8, $folderFS, $quiet) { $this->localpath = rtrim($this->localpath, '/'); $msg = false; if (empty($folder8)) { $msg = gettext('Invalid album instantiation: No album name'); } else { if (filesystemToInternal($folderFS) != $folder8) { // an attempt to spoof the album name. $msg = sprintf(gettext('Invalid album instantiation: %1$s!=%2$s'), html_encode(filesystemToInternal($folderFS)), html_encode($folder8)); } else { if (!file_exists($this->localpath) || is_dir($this->localpath)) { $msg = sprintf(gettext('Invalid album instantiation: %s does not exist.'), html_encode($folder8)); } } } if ($msg) { $this->exists = false; if (!$quiet) { trigger_error($msg, E_USER_ERROR); } return false; } return true; }