Usergruppen Variablen umbenannt

main
radiskull 14 years ago
parent abd335c68d
commit 9e7b18f3bd

@ -332,7 +332,7 @@ if ($anzahl_charactere < $chars_max) {
if($charm === NULL){
handleFirstPhase($user_daten,$anzahl_charactere);
} else if($charm == 1){
if(isUserInGroup($usergroups, tester)) {
if(isUserInGroup($usergroups, TESTER)) {
handleSecondPhaseForTester($char_type, $char_name);
} else {
handleSecondPhase($char_type, $char_name);

@ -467,7 +467,7 @@ function eintragen($char_id,$name,$user_ida) {
$attacke2[$y] = $row[l_id];
}
if($user_ida[admin] != "ja") {
if($user_ida['admin'] != "ja") {
if($row[type] == "tausch") { $kampf_tausch_n++;
}elseif($row[type] == "SSJ") { $kampf_ssj_n++;
}elseif($row[type] == "hpmp") { $kampf_hpmp_n++;

@ -69,7 +69,7 @@ function loginUser($user,$pass){
$result = mysql_fetch_assoc($qry);
$usergroups = getUserGroups($user);
if(isUserInGroup($usergroups, admin)) {
if(isUserInGroup($usergroups, ADMIN)) {
$_SESSION['user'] = $result['id'];
$_SESSION['username'] = $result['nickname'];
$_SESSION['password'] = $result['passwort'];
@ -244,8 +244,8 @@ if(checkLoginData($_SESSION['user'],$_SESSION['password'])){
showActionLog();
} else if($_REQUEST['choose'] == 'cheat'){
displayCheater($_REQUEST['action'], $_REQUEST['from'], $_REQUEST['until'], $_REQUEST['user1'], $_REQUEST['user2'], $_REQUEST['tradeid'], $_REQUEST['verify']);
} else if($_REQUEST['choose'] == 'npc'){
displayNPC($_REQUEST['action'], $_REQUEST['task'], $_REQUEST['charid'], $_REQUEST['table'], $_REQUEST['page'], $REQUEST['data']);
} else if($_REQUEST['choose'] == 'npc'){
displayNPC($_REQUEST['action'], $_REQUEST['task'], $_REQUEST['charid'], $_REQUEST['table'], $_REQUEST['page'], $_REQUEST['data']);
} else if($_REQUEST['choose'] == 'shop'){
displayShop($_REQUEST['action'], $_REQUEST['s_id'],$_REQUEST['info'], $_REQUEST['s_name'] , $_REQUEST['s2_name'], $_REQUEST['s3_name'], $_REQUEST['s_typ'], $_REQUEST['preis'], $_REQUEST['frei'], $_REQUEST['anzahl']);
} else if($_REQUEST['choose'] == 'usergroups'){

@ -36,12 +36,12 @@ function generateUserNameByID($userid, $showClanTags = TRUE){
$sql = 'select nickname, user.id as userid, clan.clanz_pre, clan.clanz_suff from user left join clan on user.clan = clan.id where user.id = '.$userid;
$user_info = mysql_fetch_assoc(mysql_query($sql));
if(isUserInGroup($groups, Werbung_an)){
if(isUserInGroup($groups, admin)){
if(isUserInGroup($groups, WERBUNG_AN)){
if(isUserInGroup($groups, ADMIN)){
$color = 'style="color:'.$GLOBALS['COLOR_GM'].'"';
} else if(isUserInGroup($groups, entwickler)){
} else if(isUserInGroup($groups, ENTWICKLER)){
$color = 'style="color:'.$GLOBALS['COLOR_DEVELOPER'].'"';
} else if(isUserInGroup($groups, designer)){
} else if(isUserInGroup($groups, DESIGNER)){
$color = 'style="color:'.$GLOBALS['COLOR_CREATIVE'].'"';
} else {
$color = 'style="color:'.$GLOBALS['COLOR_SUPPORTER'].'"';

@ -7,14 +7,14 @@
*/
//Konstanten
define("admin", 1);
define("tester", 2);
define("entwickler", 3);
define("designer", 4);
define("Werbung_an", 5);
define("inaktiv_loeschschutz", 6);
define("aktiv_loeschschutz", 7);
define("aktiv_chat", 8);
define("ADMIN", 1);
define("TESTER", 2);
define("ENTWICKLER", 3);
define("DESIGNER", 4);
define("WERBUNG_AN", 5);
define("INAKTIV_LOESCHSCHUTZ", 6);
define("AKTIV_LOESCHSCHUTZ", 7);
define("AKTIV_CHAT", 8);
include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php');

@ -428,7 +428,7 @@ if($user_ida){
</tr>
</table>
<?php
if(isUserInGroup($usergroups, Werbung_an)) {
if(isUserInGroup($usergroups, WERBUNG_AN)) {
echo getLayerAdvertisement();
}
/*if($user_ida['ads'] == 1){

@ -8,7 +8,7 @@
?>
<br><br>
<?php
if (isUserInGroup($usergroups, aktiv_chat)) {
if (isUserInGroup($usergroups, AKTIV_CHAT)) {
include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/messagefunctions.inc.php');
if($user_ida['id'] === NULL){
$user_ida['id'] = -1;

@ -29,7 +29,7 @@ if ($char_id == null) {
}
$attacks_learned = getAttacksforChar($char_id, 0);
$attacks_unlearned = getAttacksforChar($char_id, 1);
$testuser = isUserInGroup($usergroups, tester);
$testuser = isUserInGroup($usergroups, TESTER);
?>
<form

@ -86,34 +86,34 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
}
if($chat == 1) {
if(!isUserInGroup($usergroups, aktiv_chat)) {
addUserToGroup($user['nickname'], aktiv_chat);
if(!isUserInGroup($usergroups, AKTIV_CHAT)) {
addUserToGroup($user['nickname'], AKTIV_CHAT);
}
} else {
if(isUserInGroup($usergroups, aktiv_chat)) {
removeUserFromGroup($user['nickname'], aktiv_chat);
if(isUserInGroup($usergroups, AKTIV_CHAT)) {
removeUserFromGroup($user['nickname'], AKTIV_CHAT);
}
}
if($ads == 1) {
if(!isUserInGroup($usergroups, Werbung_an)) {
addUserToGroup($user['nickname'], Werbung_an);
if(!isUserInGroup($usergroups, WERBUNG_AN)) {
addUserToGroup($user['nickname'], WERBUNG_AN);
}
} else {
if(isUserInGroup($usergroups, Werbung_an)) {
removeUserFromGroup($user['nickname'], Werbung_an);
if(isUserInGroup($usergroups, WERBUNG_AN)) {
removeUserFromGroup($user['nickname'], WERBUNG_AN);
}
}
if($acc_delete == 1) {
if(!isUserInGroup($usergroups, aktiv_loeschschutz)) {
addUserToGroup($user['nickname'], aktiv_loeschschutz);
removeUserFromGroup($user['nickname'], inaktiv_loeschschutz);
if(!isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) {
addUserToGroup($user['nickname'], AKTIV_LOESCHSCHUTZ);
removeUserFromGroup($user['nickname'], INAKTIV_LOESCHSCHUTZ);
}
} else if($acc_delete == 0) {
if(isUserInGroup($usergroups, aktiv_loeschschutz)) {
removeUserFromGroup($user['nickname'], aktiv_loeschschutz);
addUserToGroup($user['nickname'], inaktiv_loeschschutz);
if(isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) {
removeUserFromGroup($user['nickname'], AKTIV_LOESCHSCHUTZ);
addUserToGroup($user['nickname'], INAKTIV_LOESCHSCHUTZ);
}
}
@ -200,7 +200,7 @@ function display($user, $usergroups){
<tr>
<th align="center">Chat:</th>
<td><?php
if(isUserInGroup($usergroups, aktiv_chat)) {
if(isUserInGroup($usergroups, AKTIV_CHAT)) {
$che1 = 'checked="checked"';
$che2 = '';
} else{
@ -218,10 +218,10 @@ function display($user, $usergroups){
$che1 = '';
$che2 = '';
if(isUserInGroup($usergroups, inaktiv_loeschschutz)){
if(isUserInGroup($usergroups, INAKTIV_LOESCHSCHUTZ)){
$che1 = '';
$che2 = 'checked="checked"';
} else if (isUserInGroup($usergroups, aktiv_loeschschutz)){
} else if (isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)){
$che1 = 'checked="checked"';
$che2 = '';
} else {

@ -47,8 +47,8 @@ function anmelden($user, $charid, $art){
if($art == 'klein'){
// Char darf max lvl 25 haben und keine Fusion sein
$special_clue = 'AND level<=25 AND fusion =\'nein\' AND char_type = \'\' AND id not in (SELECT c.id FROM chars c RIGHT JOIN wochen_markt wm on c.frucht=wm.item where c.id = \''.$charid.'\')';
// Char darf max lvl 25 haben und keine Fusion sein und auch keine Teufelsfrucht gegessen haben
$special_clue = 'AND level<=25 AND fusion =\'nein\' AND char_type = \'\' AND frucht is null';
$anzahl = 32;
} else{
$anzahl = 64;

Loading…
Cancel
Save