22 include_once
$GLOBALS[
'xoops']->path(
'modules/system/constants.php');
26 if (is_object(
$GLOBALS[
'xoopsUser']) ) {
29 header(
'location: ' . XOOPS_URL);
39 $GLOBALS[
'xoopsConfig'][
'module_cache'][
$GLOBALS[
'xoopsModule']->getVar(
'mid')] = 0;
41 include $GLOBALS[
'xoops']->path(
'header.php');
46 $GLOBALS[
'xoopsTpl']->assign(
'user_ownpage',
true);
49 $GLOBALS[
'xoopsTpl']->assign(
'lang_avatar',
_US_AVATAR);
50 $GLOBALS[
'xoopsTpl']->assign(
'lang_inbox',
_US_INBOX);
51 $GLOBALS[
'xoopsTpl']->assign(
'lang_logout',
_US_LOGOUT);
52 if ($GLOBALS[
'xoopsConfigUser'][
'self_delete'] == 1) {
53 $GLOBALS[
'xoopsTpl']->assign(
'user_candelete',
true);
54 $GLOBALS[
'xoopsTpl']->assign(
'lang_deleteaccount',
_US_DELACCOUNT);
56 $GLOBALS[
'xoopsTpl']->assign(
'user_candelete',
false);
58 $GLOBALS[
'xoopsTpl']->assign(
'user_changeemail', $GLOBALS[
'xoopsConfigUser'][
'allow_chgmail']);
65 if (!is_object(
$thisUser) || (!
$thisUser->isActive() && (!$GLOBALS[
'xoopsUser'] || !$GLOBALS[
'xoopsUser']->isAdmin() ))) {
84 $groups_basic = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS);
105 if (is_object($GLOBALS[
'xoopsUser']) && $GLOBALS[
'xoopsUser']->isAdmin()) {
107 $GLOBALS[
'xoopsConfig'][
'module_cache'][$GLOBALS[
'xoopsModule']->getVar(
'mid')] = 0;
110 include $GLOBALS[
'xoops']->path(
'header.php');
111 $GLOBALS[
'xoopsTpl']->assign(
'user_ownpage',
false);
114 $GLOBALS[
'xoopsTpl']->assign(
'user_uid',
$thisUser->getVar(
'uid'));
115 if (is_object($GLOBALS[
'xoopsUser']) && $GLOBALS[
'xoopsUser']->isAdmin()) {
117 $GLOBALS[
'xoopsTpl']->assign(
'lang_deleteaccount',
_US_DELACCOUNT);
118 $GLOBALS[
'xoopsTpl']->assign(
'userlevel',
$thisUser->isActive());
138 if (
$thisUser->getVar(
'user_avatar') &&
"blank.gif" !=
$thisUser->getVar(
'user_avatar')) {
143 if (
$thisUser->getVar(
'user_viewemail') == 1) {
145 }
else if (is_object($GLOBALS[
'xoopsUser'])) {
147 if ($GLOBALS[
'xoopsUser']->isAdmin() || ($GLOBALS[
'xoopsUser']->getVar(
"uid") ==
$thisUser->getVar(
"uid"))) {
151 foreach (array_keys(
$cats) as
$i) {
166 if (is_array($value)) {
167 $value = implode(
'<br />', array_values($value) );
170 $categories[$cat_id][
'fields'][] = array(
'title' =>
$fields[$i]->getVar(
'field_title'),
'value' => $value);
171 $weights[$cat_id][] =
$fields[
$i]->getVar(
'cat_id');
175 $GLOBALS[
'xoopsTpl']->assign(
'categories', $categories);
178 if ($GLOBALS[
'xoopsModuleConfig'][
'profile_search']) {
183 $mids = array_keys($modules);
187 if (count(
$mids) > 0 && count($allowed_mids) > 0) {
189 if ( in_array($mid, $allowed_mids) ) {
190 $results = $modules[
$mid]->search(
'',
'', 5, 0,
$thisUser->getVar(
'uid') );
191 $count = count($results);
192 if (is_array($results) && $count > 0) {
193 for ($i = 0; $i < $count; $i++ ) {
194 if (isset($results[$i][
'image']) && $results[$i][
'image'] !=
'') {
195 $results[
$i][
'image'] = XOOPS_URL .
'/modules/' . $modules[
$mid]->getVar(
'dirname',
'n') .
'/' . $results[
$i][
'image'];
197 $results[
$i][
'image'] = XOOPS_URL .
'/images/icons/posticon2.gif';
199 if (!preg_match(
"/^http[s]*:\/\//i", $results[$i][
'link'])) {
200 $results[
$i][
'link'] = XOOPS_URL .
"/modules/" . $modules[
$mid]->getVar(
'dirname',
'n') .
"/" . $results[
$i][
'link'];
202 $results[
$i][
'title'] =
$myts->htmlspecialchars($results[$i][
'title']);
206 $showall_link =
'<a href="' . XOOPS_URL .
'/search.php?action=showallbyuser&mid=' . $mid .
'&uid=' .
$thisUser->getVar(
'uid') .
'">' .
_US_SHOWALL .
'</a>';
210 $GLOBALS[
'xoopsTpl']->append(
'modules', array(
'name' => $modules[$mid]->getVar(
'name'),
'results' => $results,
'showall_link' => $showall_link));
212 unset($modules[$mid]);
219 $GLOBALS[
'xoopsTpl']->assign(
'uname',
$thisUser->getVar(
'uname'));
220 $GLOBALS[
'xoopsTpl']->assign(
'email',
$email);
221 $GLOBALS[
'xoopsTpl']->assign(
'avatar',
$avatar);