Usergruppen Variablen umbenannt

main
radiskull 13 years ago
parent abd335c68d
commit 9e7b18f3bd

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

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

@ -69,7 +69,7 @@ function loginUser($user,$pass){
$result = mysql_fetch_assoc($qry); $result = mysql_fetch_assoc($qry);
$usergroups = getUserGroups($user); $usergroups = getUserGroups($user);
if(isUserInGroup($usergroups, admin)) { if(isUserInGroup($usergroups, ADMIN)) {
$_SESSION['user'] = $result['id']; $_SESSION['user'] = $result['id'];
$_SESSION['username'] = $result['nickname']; $_SESSION['username'] = $result['nickname'];
$_SESSION['password'] = $result['passwort']; $_SESSION['password'] = $result['passwort'];
@ -244,8 +244,8 @@ if(checkLoginData($_SESSION['user'],$_SESSION['password'])){
showActionLog(); showActionLog();
} else if($_REQUEST['choose'] == 'cheat'){ } else if($_REQUEST['choose'] == 'cheat'){
displayCheater($_REQUEST['action'], $_REQUEST['from'], $_REQUEST['until'], $_REQUEST['user1'], $_REQUEST['user2'], $_REQUEST['tradeid'], $_REQUEST['verify']); displayCheater($_REQUEST['action'], $_REQUEST['from'], $_REQUEST['until'], $_REQUEST['user1'], $_REQUEST['user2'], $_REQUEST['tradeid'], $_REQUEST['verify']);
} else if($_REQUEST['choose'] == 'npc'){ } else if($_REQUEST['choose'] == 'npc'){
displayNPC($_REQUEST['action'], $_REQUEST['task'], $_REQUEST['charid'], $_REQUEST['table'], $_REQUEST['page'], $REQUEST['data']); displayNPC($_REQUEST['action'], $_REQUEST['task'], $_REQUEST['charid'], $_REQUEST['table'], $_REQUEST['page'], $_REQUEST['data']);
} else if($_REQUEST['choose'] == 'shop'){ } 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']); 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'){ } 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; $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)); $user_info = mysql_fetch_assoc(mysql_query($sql));
if(isUserInGroup($groups, Werbung_an)){ if(isUserInGroup($groups, WERBUNG_AN)){
if(isUserInGroup($groups, admin)){ if(isUserInGroup($groups, ADMIN)){
$color = 'style="color:'.$GLOBALS['COLOR_GM'].'"'; $color = 'style="color:'.$GLOBALS['COLOR_GM'].'"';
} else if(isUserInGroup($groups, entwickler)){ } else if(isUserInGroup($groups, ENTWICKLER)){
$color = 'style="color:'.$GLOBALS['COLOR_DEVELOPER'].'"'; $color = 'style="color:'.$GLOBALS['COLOR_DEVELOPER'].'"';
} else if(isUserInGroup($groups, designer)){ } else if(isUserInGroup($groups, DESIGNER)){
$color = 'style="color:'.$GLOBALS['COLOR_CREATIVE'].'"'; $color = 'style="color:'.$GLOBALS['COLOR_CREATIVE'].'"';
} else { } else {
$color = 'style="color:'.$GLOBALS['COLOR_SUPPORTER'].'"'; $color = 'style="color:'.$GLOBALS['COLOR_SUPPORTER'].'"';

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

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

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

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

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

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

Loading…
Cancel
Save