db_Select("user", "user_sess", "user_id='". USERID."'"); @unlink(e_FILE."public/avatars/".$row['user_sess']); $sql->db_Update("user", "user_sess='' WHERE user_id=".intval($tmp[1])); header("location:".e_SELF."?id.".$tmp[1]); exit; } } if (file_exists(THEME."user_template.php")) { require_once(THEME."user_template.php"); } else { require_once(e_BASE.$THEMES_DIRECTORY."templates/user_template.php"); } require_once(HEADERF); if (!USER) { $ns->tablerender(LAN_20, "
".LAN_416."
"); require_once(FOOTERF); exit; } if (isset($_POST['records'])) { $records = intval($_POST['records']); $order = ($_POST['order'] == 'ASC' ? 'ASC' : 'DESC'); $from = 0; } else if(!e_QUERY) { $records = 20; $from = 0; $order = "DESC"; } else { $qs = explode(".", e_QUERY); if ($qs[0] == "id") { $id = $qs[1]; } else { $qs = explode(".", e_QUERY); $from = intval($qs[0]); $records = intval($qs[1]); $order = ($qs[2] == 'ASC' ? 'ASC' : 'DESC'); } } if ($records > 30) { $records = 30; } if (isset($id)) { if ($id == 0) { $text = "
".LAN_137." ".SITENAME."
"; $ns->tablerender(LAN_20, $text); require_once(FOOTERF); exit; } $ret = $e_event->trigger("showuser", $id); if ($ret!='') { $text = "
".$ret."
"; $ns->tablerender(LAN_20, $text); require_once(FOOTERF); exit; } if (isset($_POST['commentsubmit']) && $pref['profile_comments']) { require_once(e_HANDLER."comment_class.php"); $cobj = new comment; $cobj->enter_comment($_POST['author_name'], $_POST['comment'], 'profile', $id, $pid, $_POST['subject']); } if($pref['profile_comments']) { include_once(e_HANDLER."comment_class.php"); } if($text = renderuser($id)) { $ns->tablerender(LAN_402, $text); } else { $text = "
".LAN_400."
"; $ns->tablerender(LAN_20, $text); } unset($text); require_once(FOOTERF); exit; } $users_total = $sql->db_Count("user","(*)", "WHERE user_ban = 0"); $text = "
".LAN_138." ".$users_total."

".LAN_419.": "; if ($records == 10) { $text .= " "; } else if($records == 20) { $text .= " "; } else { $text .= " "; } $text .= LAN_139; if ($order == "ASC") { $text .= ""; } else { $text .= ""; } $text .= "

\n\n

"; if (!$sql->db_Select("user", "*", "user_ban = 0 ORDER BY user_id $order LIMIT $from,$records")) { echo "
".LAN_141."
"; } else { $userList = $sql->db_getList(); $text .= " "; foreach ($userList as $row) { $text .= renderuser($row, "short"); } $text .= "
  ".LAN_142." ".LAN_112." ".LAN_145."
\n
"; } $ns->tablerender(LAN_140, $text); $parms = $users_total.",".$records.",".$from.",".e_SELF.'?[FROM].'.$records.".".$order; echo "
 ".$tp->parseTemplate("{NEXTPREV={$parms}}")."
"; function renderuser($uid, $mode = "verbose") { global $sql, $pref, $tp, $sc_style, $user_shortcodes; global $EXTENDED_START, $EXTENDED_TABLE, $EXTENDED_END, $USER_SHORT_TEMPLATE, $USER_FULL_TEMPLATE; global $user; if(is_array($uid)) { $user = $uid; } else { if(!$user = get_user_data($uid)) { return FALSE; } } if($mode == 'verbose') { return $tp->parseTemplate($USER_FULL_TEMPLATE, FALSE, $user_shortcodes); } else { return $tp->parseTemplate($USER_SHORT_TEMPLATE, FALSE, $user_shortcodes); } } require_once(FOOTERF); ?>