示例#1
0
 public static function changeForgottenPassword($account_name, $password)
 {
     connect::selectDB('logondb');
     $username = mysql_real_escape_string(strtoupper($account_name));
     $result = mysql_query("SELECT * FROM account WHERE username='******'");
     $row = mysql_fetch_array($result);
     if ($row) {
         $password = strtoupper($password);
         $password_hash = mysql_real_escape_string(sha1($username . ':' . $password));
         connect::selectDB('logondb');
         mysql_query("UPDATE `account` SET `sha_pass_hash`='" . $password_hash . "', `v`='0', `s`='0' WHERE `id`='" . $row['id'] . "'");
         account::logThis($account_name . " Successfully recovered password", "passwordrecoverd", NULL);
     }
 }
示例#2
0
   </tr>
    <tr>
   		<td>
        </td>
        <td>
        	<hr/>
        </td>
   </tr>
   <tr>
   		<td>
        </td>
        <td>
        	<input type="submit" value="Convert" name="convert" />
        </td>
   </tr>
</table>   	     
</form>
<?php 
if (isset($_POST['convert'])) {
    $vp = round((int) $_POST['conv_vp']);
    if (account::hasVP($_SESSION['cw_user'], $vp) == FALSE) {
        echo "<span class='alert'>You do not have enough Vote Points!</span>";
    } else {
        $dp = floor($vp / $divide);
        account::deductVP(account::getAccountID($_SESSION['cw_user']), $vp);
        account::addDP(account::getAccountID($_SESSION['cw_user']), $dp);
        account::logThis("Converted " . $vp . " Vote Points into " . $dp . " " . $GLOBALS['donation']['coins_name'], "currencyconvert", NULL);
        header("Location: ?p=convert");
        exit;
    }
}
示例#3
0
 public static function instant80($values)
 {
     die("This feature is disabled. <br/><i>Also, you shouldn't be here...</i>");
     $values = mysql_real_escape_string($values);
     $values = explode("*", $values);
     connect::connectToRealmDB($values[1]);
     if (character::isOnline($values[0]) == TRUE) {
         echo '<b class="red_text">Please log out your character before proceeding.';
     } else {
         $service_values = explode("*", $GLOBALS['service']['instant80']);
         if ($service_values[1] == "dp") {
             if (account::hasDP($_SESSION['cw_user'], $GLOBALS['service']['instant80']['price']) == FALSE) {
                 echo '<b class="red_text">Not enough ' . $GLOBALS['donation']['coins_name'] . '</b>';
                 $error = true;
             }
         } elseif ($service_values[1] == "vp") {
             if (account::hasVP($_SESSION['cw_user'], $GLOBALS['service']['instant80']['price']) == FALSE) {
                 echo '<b class="red_text">Not enough Vote Points.</b>';
                 $error = true;
             }
         }
         if ($error != true) {
             //User got coins. Boost them up to 80 :D
             connect::connectToRealmDB($values[1]);
             mysql_query("UPDATE characters SET level='80' WHERE guid = '" . $values[0] . "'");
             account::logThis("Performed an instant max level on " . character::getCharName($values[0], NULL), 'Instant', NULL);
             echo '<h3 class="green_text">The character level was set to 80!</h3>';
         }
     }
 }
示例#4
0
</table>
</form>
<?php 
}
if (isset($_POST['ir_step3'])) {
    $guid = (int) $_POST['ir_char'];
    $instance = (int) $_POST['ir_instance'];
    if ($GLOBALS['service'][$service]['currency'] == "vp") {
        if (account::hasVP($_SESSION['cw_user'], $GLOBALS['service'][$service]['price']) == FALSE) {
            echo '<span class="alert">You do not have enough Vote Points!';
        } else {
            connect::selectDB($_POST['ir_realm']);
            mysql_query("DELETE FROM instance WHERE id='" . $instance . "'");
            account::deductVP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service'][$service]['price']);
            echo '<span class="approved">The instance lock was removed!</span>';
        }
    } elseif ($GLOBALS['service'][$service]['currency'] == "dp") {
        if (account::hasDP($_SESSION['cw_user'], $GLOBALS['service'][$service]['price']) == FALSE) {
            echo '<span class="alert">You do not have enough ' . $GLOBALS['donation']['coins_name'];
        } else {
            connect::selectDB($_POST['ir_realm']);
            mysql_query("DELETE FROM instance WHERE id='" . $instance . "'");
            account::deductDP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service'][$service]['price']);
            echo '<span class="approved">The instance lock was removed!</span>';
            account::logThis("Performed an Instance reset on " . character::getCharName($guid, server::getRealmId($_POST['ir_realm'])), "instancereset", server::getRealmId($_POST['ir_realm']));
        }
    }
}
?>
<br/>
<a href="?p=instancereset">Start over</a>
示例#5
0
            $command = "rename";
            $info = "Character rename";
            break;
        case 'faction':
            $command = "changefaction";
            $info = "Faction change";
            break;
        case 'race':
            $command = "changerace";
            $info = "Race change";
            break;
    }
    connect::selectDB('webdb');
    $getRA = mysql_query("SELECT sendType,host,ra_port,soap_port,rank_user,rank_pass FROM realms WHERE id='" . $realm_id . "'");
    $row = mysql_fetch_assoc($getRA);
    if ($row['sendType'] == 'ra') {
        require '../misc/ra.php';
        sendRa("character " . $command . " " . character::getCharname($guid, $realm_id), $row['rank_user'], $row['rank_pass'], $row['host'], $row['ra_port']);
    } elseif ($row['sendType'] == "soap") {
        require '../misc/soap.php';
        sendSoap("character " . $command . " " . character::getCharname($guid, $realm_id), $row['rank_user'], $row['rank_pass'], $row['host'], $row['soap_port']);
    }
    if ($GLOBALS['service'][$serviceX]['currency'] == 'vp') {
        account::deductVP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service'][$serviceX]['price']);
    }
    if ($GLOBALS['service'][$serviceX]['currency'] == 'dp') {
        account::deductDP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service'][$serviceX]['price']);
    }
    account::logThis("Performed a " . $info . " on " . character::getCharName($guid, $realm_id), $serviceX, $realm_id);
    echo true;
}