* @todo this has nothing to do in the version checker system module, but it is there as a * reminiscence of XOOPS. It needs to be moved elsewhere in 1.1 */ if (isset($_GET['mid'])) { include_once ICMS_MODULES_PATH . '/system/admin/version/module_info.php'; exit; } /** * Now here is the version checker :-) */ global $icmsAdminTpl, $xoTheme; $icmsVersionChecker = icms_core_Versionchecker::getInstance(); icms_cp_header(); if ($icmsVersionChecker->check()) { $icmsAdminTpl->assign('update_available', TRUE); $icmsAdminTpl->assign('latest_changelog', icms_core_DataFilter::makeClickable($icmsVersionChecker->latest_changelog)); $icmsAdminTpl->assign('latest_version', $icmsVersionChecker->latest_version_name); $icmsAdminTpl->assign('latest_url', $icmsVersionChecker->latest_url); if (ICMS_VERSION_STATUS == 10 && $icmsVersionChecker->latest_status < 10) { // I'm running a final release so make sure to notify the user that the update is not a final $icmsAdminTpl->assign('not_a_final_comment', TRUE); } } else { $checkerErrors = $icmsVersionChecker->getErrors(TRUE); if ($checkerErrors) { $icmsAdminTpl->assign('errors', $checkerErrors); } } $icmsAdminTpl->assign('your_version', $icmsVersionChecker->installed_version_name); $icmsAdminTpl->assign('lang_php_vesion', PHP_VERSION); $icmsAdminTpl->assign('lang_mysql_version', mysql_get_server_info());
/** * Returns a value for output of this field * * @param icms_member_user_Object $user object to get the value of * @param mod_profile_Profile $profile object to get the value of * @global array $icmsConfigAuth * @return mixed **/ public function getOutputValue(&$user, $profile) { global $icmsConfigAuth; $value = in_array($this->getVar('field_name'), $this->getUserVars()) ? $user->getVar($this->getVar('field_name')) : $profile->getVar($this->getVar('field_name')); switch ($this->getVar('field_type')) { case "textarea": case "dhtml": return icms_core_DataFilter::undoHtmlSpecialChars(str_replace('&', '&', $value), 1); break; case "select": case "radio": $options = unserialize($this->getVar('field_options', 'n')); return isset($options[$value]) ? htmlspecialchars($options[$value]) : ""; break; case "select_multi": case "checkbox": $options = unserialize($this->getVar('field_options', 'n')); $ret = array(); if (count($options) > 0) { foreach (array_keys($options) as $key) { if (in_array($key, $value)) { $ret[$key] = htmlspecialchars($options[$key]); } } } return $ret; break; case "group": //change to retrieve groups and return name of group return $value; break; case "group_multi": //change to retrieve groups and return array of group names return ""; break; case "longdate": //return YYYY/MM/DD format - not optimal as it is not using local date format, but how do we do that //when we cannot convert it to a UNIX timestamp? return str_replace("-", "/", $value); case "date": if ($value > 0) { return formatTimestamp($value, 's'); } return ""; break; case "datetime": if ($value > 0) { return formatTimestamp($value, 'm'); } return ""; break; case "autotext": $value = $user->getVar($this->getVar('field_name'), 'n'); //autotext can have HTML in it $value = str_replace("{X_UID}", $user->getVar("uid"), $value); $value = str_replace("{X_URL}", ICMS_URL, $value); $value = str_replace("{X_UNAME}", $user->getVar("uname"), $value); return $value; break; case "rank": $userrank = $user->rank(); return '<img src="' . $userrank['image'] . '" alt="' . $userrank['title'] . '" /> ' . $userrank['title']; break; case "yesno": return $value ? _YES : _NO; break; case "timezone": $timezones = icms_form_elements_select_Timezone::getTimeZoneList(); return $timezones[str_replace('.0', '', $value)]; break; case "image": if ($value == "") { return ''; } return "<img src='" . ICMS_UPLOAD_URL . "/" . basename(dirname(dirname(__FILE__))) . "/" . $value . "' alt='image' />"; break; case "url": if ($value == "") { return ''; } return icms_core_DataFilter::makeClickable(formatURL($value)); case "location": if ($value == "") { return ''; } return $value . ' <a href="http://maps.google.com/?q=' . $value . '" target="_blank" ><img src="' . ICMS_URL . '/modules/' . basename(dirname(dirname(__FILE__))) . '/images/mapsgoogle.gif" alt="" /></a>'; case "email": if ($value == "") { return ''; } if ($user->getVar('user_viewemail') || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $user->getVar('uid'))) { return '<a href="mailto:' . $value . '">' . $value . '</a>'; } return ''; case "openid": if ($value == "") { return ''; } if ($icmsConfigAuth['auth_openid'] == 1 && ($user->getVar('user_viewoid') || is_object(icms::$user) && (icms::$user->isAdmin() || icms::$user->getVar('uid') == $user->getVar('uid')))) { return $value; } return ''; case "textbox": case "theme": case "language": default: return $value; break; } }
/** * @deprecated Use displayTarea, instead * @todo Remove in version 1.4 - there are no other occurrences in the core * Enter description here ... * @param $text * @param $allowhtml * @param $smiley * @param $bbcode */ function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) { icms_core_Debug::setDeprecated('icms_core_DataFilter->checkVar - type = text or html, options1 = input', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); $text = $this->oopsStripSlashesGPC($text); if ($allowhtml == 0) { $text = icms_core_DataFilter::htmlSpecialChars($text); } else { $text = icms_core_DataFilter::makeClickable($text); } if ($smiley == 1) { $text = icms_core_DataFilter::smiley($text); } if ($bbcode == 1) { $text = icms_core_DataFilter::codeDecode($text); } $text = icms_core_DataFilter::nl2Br($text); return $text; }