Parašė ozzWANTED· 2007 Bir. 28 18:06:33
#2
yra modas, bet xz kaip jis ten vadinasi. Bet va kodo dalį radau savo PC joiningui, dar papildžiau ir gavosi:
$groups = explode(".", $userdata['user_groups']);
$found = false;
foreach ($groups as $group) {
if ($group == $grpid) {
$found = true;
}
}
if (!$found) {
array_push($groups, $usergroup);
$groupstring = "";
foreach($groups as $group) {
if (isNum($group)) {
$groupstring .= ".".$group;
}
}
$result = dbquery("UPDATE ".$db_prefix."users SET user_groups='".$groupstring."' WHERE user_id=".$userid);
} else {
// allready member, do nothing
}