39 $user->setVar(
'uid', 0);
45 $ownerid = isset($_GET[
'uid']) ? intval($_GET[
'uid']) : null;
54 $this->user =
$user->getValues();
55 $this->owner =
$owner->getValues();
56 $this->user_groups =
$xoops->getUserGroups();
57 $this->user_uid =
$xoops->isUser() ?
$xoops->user->getVar(
'uid') : 0;
58 $this->get_uid = isset($_GET[
'uid']) ? intval($_GET[
'uid']) : 0;
64 $access_filter[
'is_owner'][
'method'] =
'isOwner';
66 $access_filter[
'is_not_owner'][
'method'] =
'isNotOwner';
71 $decorations = array(
'link',
'title',
'alt_title');
72 foreach ($decorations as $decoration) {
73 if ($decoration ==
'alt_title' && empty(
$menu[
'alt_title'])) {
76 $menu[$decoration] = self::_doDecoration(
$menu[$decoration]);
77 if ($decoration ==
'link') {
78 if (!preg_match(
'/mailto:/i',
$menu[
'link']) && !preg_match(
'#://#i',
$menu[
'link'])) {
98 $hooks = array_intersect(
$menu[
'hooks'], get_class_methods(__CLASS__));
100 foreach ($hooks as $method) {
101 if (!self::$method()) {
110 if (!preg_match(
'/{(.*\|.*)}/i', $string, $reg)) {
114 $expression = $reg[0];
115 list($validator, $value) = array_map(
'strtolower', explode(
'|', $reg[1]));
118 if ($value ==
'pass') {
122 if ($validator ==
'user') {
123 $value = isset($this->user[$value]) ? $this->user[$value] : self::getExtraValue(
'user', $value);
124 $string = str_replace($expression, $value, $string);
127 if ($validator ==
'uri') {
128 $value = isset($_GET[$value]) ? $_GET[$value] : 0;
129 $string = str_replace($expression, $value, $string);
132 if ($validator ==
'owner') {
133 $value = isset($this->owner[$value]) ? $this->owner[$value] : self::getExtraValue(
'owner', $value);
134 $string = str_replace($expression, $value, $string);
142 return ($this->user_uid != 0 && ($this->user_uid == $this->get_uid)) ?
true :
false;
147 return !self::isOwner();
154 $values = array(
'pm_new',
'pm_readed',
'pm_total');
155 if (!in_array($value, $values)) {
159 $entry = $this->$type;
167 if ($value ==
'pm_new') {
172 if ($value ==
'pm_readed') {
177 if ($value ==
'pm_total') {
183 $this->
$type = $entry;
186 return $entry[$value];
if($uname== ''||$pass== '') $member_handler
const _PL_MENUS_MENUS_ISNOTOWNER
const _PL_MENUS_MENUS_ISOWNER