function get_user_data($usr_id) { global $MDL, $DIRS, $GV; if ($MDL->IsModuleExists("users")) { $MDL->Load("users"); $USR = new CUsers($DIRS["users_data"], $DIRS["users_list"], $DIRS["users_private"], $DIRS["users_groups"], $DIRS["users_online"]); $USR->SetSeparators($GV["sep1"], $GV["sep2"]); if (!$USR->IsUserExistsById($usr_id)) { return array("nick" => $usr_id); } $data = $USR->GetUserData($usr_id); $data["level"] = $USR->GetUserLevel($usr_id); return $data; } return $usr_id; }
if ($USR->GetUserLevel($author) < $CURRENT_USER["level"] || $author == $CURRENT_USER["id"]) { $authorselect = "<select name=art style=\"width:100%\">"; $udata = $USR->GetUsers(); for ($j = 0; $j < count($udata); ++$j) { if ($udata[$j]["id"] == $author) { $sel = " selected"; } else { $sel = ""; } if ($USR->GetUserLevel($udata[$j]["id"]) < $CURRENT_USER["level"] || $udata[$j]["id"] == $CURRENT_USER["id"]) { $authorselect .= "<option value=\"" . $udata[$j]["id"] . "\"{$sel}>" . $udata[$j]["nick"] . "</option>"; } } $authorselect .= "</select>"; } else { $udata = $USR->GetUserData($author); $authorselect = $udata["nick"]; } } else { $authorselect = "root"; } ?> <form action="<?php echo "?p={$p}&page={$page}&action=save&editor={$editor}&id={$id}&act={$act}"; ?> " method=post id="EditForm" enctype="multipart/form-data"> <table width=100%> <tr><td class=tbl1 width=50%>Название:</td><td class=tbl1 width=50%><input style="width:100%" type=text name='head' value="<?php echo $news_info["head"]; ?>
$data['count'] = $users_info['count'][$user_index]; save_forum_user_data($users_info['id'][$user_index], $data); $spec_rang = true; for ($i = 0; $i < $vars['rangs_count']; $i++) { if ($users_info['rang'][$user_index] == $rangs[$i]['rang']) { $spec_rang = false; } } if ($spec_rang == false) { for ($i = 0; $i < $vars['rangs_count']; $i++) { if ($users_info['count'][$user_index] >= $rangs[$i]['count']) { $users_info['rang'][$user_index] = $rangs[$i]['rang']; } } } $ud = $USR->GetUserData($users_info['id'][$g]); $ud["rang"] = $users_info['rang'][$user_index]; $USR->SaveUser($ud); } if (check_auth()) { $zapis = "{$nick}" . "{$smb}" . "{$email}" . "{$smb}" . "{$url}" . "{$smb}" . "{$date}" . "{$smb}" . time() . "{$smb}" . "{$message}" . "{$smb}" . $all_users[$user_index] . "{$smb1}"; } else { $zapis = "{$nick}" . "{$smb}" . "{$email}" . "{$smb}" . "{$url}" . "{$smb}" . "{$date}" . "{$smb}" . time() . "{$smb}" . "{$message}" . "{$smb}" . "" . "{$smb1}"; } $error = false; if (!($fp = fopen($vars['dir_themes'] . "/" . "{$topic}" . "." . $vars['mess_ext'], "a"))) { echo "<center>ќшибка MA01! Ќевозможно добавить сообщение</center>"; $error = true; } else { if (!fwrite($fp, $zapis)) { echo "<center>ќшибка MA02! Ќевозможно добавить сообщение!</center>";
} else { include SK_DIR . "/users_admin.php"; } } else { if ($_MODULE) { if ($_NOTBAR) { if (!file_exists(SK_DIR . "/users.php")) { // skin doesn't support this module admin, let's draw all by ourself // { include "config.php"; $USR = new CUsers($DIRS["users_data"], $DIRS["users_list"], $DIRS["users_private"], $DIRS["users_groups"], $DIRS["users_online"]); $USR->SetSeparators($GV["sep1"], $GV["sep2"]); global $FLTR; $list = $USR->GetUsersList(); if (isset($CURRENT_USER["id"]) && is_user_exists($CURRENT_USER["id"])) { $data = $USR->GetUserData($CURRENT_USER["id"]); } switch ($act) { case "userinfo": if (isset($id) && is_user_exists($id)) { $udata = $USR->GetUserData($id); if ($USR->IsUserOnline($id)) { $tonline = "Он-лайн"; } else { $tonline = "Офлайн"; } ?> <div align=center><b>Информация о пользователе '<?php OUT($udata['nick']); ?> '</b></div>