function getServicesCount($industry = "1", $username, $ismanager = "false") { global $db; $username = empty($username) ? $_SESSION['username'] : $username; if ($ismanager == "false") { $sqlstr = "SELECT count(*) as c FROM {pre}Services WHERE userid in ('" . $username . "') and isdel=0 and remindTime!='0000-00-00' and type='" . $industry . "'"; } else { $userid = getUseridByName($username); $sqlstr = "SELECT count(*) as c FROM {pre}Services WHERE userid in ( '" . $username . "'" . getsubmanager($userid) . ") and isdel=0 and remindTime!='0000-00-00' and type='" . $industry . "'"; } $category_arr = $db->getOneRow(get_sql($sqlstr)); return $category_arr['c']; }
function getUserAvatar($username = "", $useid = 0, $showName = false, $minimized = false, $size = 100, $targetURL = "") { global $_getUserAvatarCache; if ($username != "") { $useid = getUseridByName($username); } if (isset($_getUserAvatarCache[$useid][$showName][$minimized][$size][$targetURL])) { return $_getUserAvatarCache[$useid][$showName][$minimized][$size][$targetURL]; } $useData = getUserData($useid); if ($useData["useid"] == 0) { $str = '[' . _BBCODE_ICON . '=???]'; $_getUserAvatarCache[$useid][$showName][$minimized][$size][$targetURL] = $str; return $str; } // found the user if ($useData["useAvatarDate"] == 0) { $filename = "images/noavatar_v4.png"; $width = 48; $height = 48; } else { $filename = applyIdToPath("files/avatars/", $useData["useid"]) . "-" . $useData["useAvatarDate"] . "." . $useData["useAvatarExt"]; $width = $useData["useAvatarWidth"]; $height = $useData["useAvatarHeight"]; } $origWidth = $width; $origHeight = $height; $width = round($width * $size / 100); $height = round($height * $size / 100); if ($minimized) { $width = 48; // in pixels $height = 48; } if ($width != $origWidth || $height != $origHeight) { makeFloatingThumb($useData["useUsername"], url() . $filename, $origWidth, $origHeight, 0, false, $onmouseover, $onmouseout); } else { $onmouseover = ""; $onmouseout = ""; } if ($targetURL == "") { $targetURL = url("user/" . strtolower($useData["useUsername"])); } $str = '<a href="' . $targetURL . '" class="avatar">' . getIMG(urlf() . $filename, 'style="width: ' . $width . 'px; height: ' . $height . 'px" ' . 'alt="[' . _BBCODE_ICON . '=' . $useData["useUsername"] . ']" ' . 'onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '" ' . 'title="' . $useData["useUsername"] . '"', true); if ($showName) { $str .= '<br />' . getOnlineLamp($useData) . $useData["useUsername"]; } $str .= '</a>'; $_getUserAvatarCache[$useid][$showName][$minimized][$size][$targetURL] = $str; return $str; }
$result = sql_query("SELECT `useCid` FROM `useClubs` WHERE `useCmember` = '" . $cluRemModId . "' AND `useCclub` = '{$cluid}' LIMIT 1"); if ($remModData = mysql_fetch_assoc($result)) { // Are they actually a member? If so, then bye-bye banhammer! sql_query("UPDATE `useClubs` SET `useCModerator`='0' WHERE `useCid` = '" . $remModData["useCid"] . "' LIMIT 1"); } else { notice(sprintf(_CLUB_NOT_A_MEMBER, $clubRemMod)); } } else { notice(sprintf(_UNKNOWN_USER, $clubRemMod)); } } } if ($_POST["cluRemoveUser"] != "") { //First we resolve that user's ID $cluRemoveUser = $_POST["cluRemoveUser"]; if ($cluRemoveId = addslashes(getUseridByName($cluRemoveUser))) { //Checks if the user exists in the system //Now we can see if they're a member of this club, and if so, remove them $result = sql_query("SELECT `useCid` FROM `useClubs` WHERE `useCmember` = '" . $cluRemoveId . "' AND `useCclub` = '{$cluid}' LIMIT 1"); if ($remData = mysql_fetch_assoc($result)) { // Are they actually a member? If so, then bye-bye! sql_query("DELETE FROM `useClubs` WHERE `useCid` = '" . $remData["useCid"] . "' LIMIT 1"); } else { notice(sprintf(_CLUB_NOT_A_MEMBER, $cluRemoveUser)); } } else { notice(sprintf(_UNKNOWN_USER, $cluRemoveUser)); } } if ($_POST["cluRemoveSubmission"] != "") { $clubRemoveSub = intval($_POST["cluRemoveSubmission"]);