function getViewableValue($aItem, $sValue) { switch ($aItem['Type']) { case 'text': case 'num': case 'area': return htmlspecialchars_adv($sValue); case 'date': return $this->getViewableDate($sValue); case 'range': return htmlspecialchars_adv(strreplace(',', ' - ', $sValue)); case 'bool': return _t($sValue ? '_Yes' : '_No'); case 'select_one': return $this->getViewableSelectOne($aItem['Values'], $sValue); case 'select_set': return $this->getViewableSelectSet($aItem['Values'], $sValue); case 'system': switch ($aItem['Name']) { case 'DateReg': case 'DateLastEdit': case 'DateLastLogin': return $this->getViewableDate($sValue); case 'Status': return _t("_{$sValue}"); case 'ID': return $sValue; case 'Featured': return _t($sValue ? '_Yes' : '_No'); default: return ' '; } break; case 'pass': default: return ' '; } }
public function renderHref($href, $current, $replaces = array()) { if (!$href) { $href = $this->href_tmpl; } if (!$current) { $current = $this->getCurrent(); } if (is_array($replaces) and count($replaces) > 0) { $keys = array_keys($replaces); $values = array_values($replaces); } $keys[] = '%page'; var_dump($this->href_page_part); $values[] = $this->href_page_part ? strreplace('%page_number', $current, $this->href_page_part) : $current; return str_replace($keys, $values, $href); }