コード例 #1
0
ファイル: character.php プロジェクト: Kheros/CraftedWeb
 public static function revive($guid, $char_db)
 {
     $guid = (int) $guid;
     $rid = server::getRealmId($char_db);
     connect::connectToRealmDB($rid);
     if (character::isOnline($guid) == TRUE) {
         echo '<b class="red_text">Please log out your character before proceeding.';
     } else {
         if ($GLOBALS['service']['revive']['currency'] == 'vp') {
             if (account::hasVP($_SESSION['cw_user'], $GLOBALS['service']['unstuck']['price']) == FALSE) {
                 die('<b class="red_text">Not enough Vote Points!</b>');
             } else {
                 account::deductVP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service']['revive']['price']);
             }
         }
         if ($GLOBALS['service']['revive']['currency'] == 'dp') {
             if (account::hasDP($_SESSION['cw_user'], $GLOBALS['service']['unstuck']['price']) == FALSE) {
                 die('<b class="red_text">Not enough ' . $GLOBALS['donation']['coins_name'] . '</b>');
             } else {
                 account::deductDP(account::getAccountID($_SESSION['cw_user']), $GLOBALS['service']['revive']['price']);
             }
         }
         mysql_query("DELETE FROM character_aura WHERE guid = '" . $guid . "' AND spell = '20584' OR guid = '" . $guid . "' AND spell = '8326'");
         account::logThis("Performed a revive on " . character::getCharName($guid, $rid), 'Revive', $rid);
         return TRUE;
     }
 }
コード例 #2
0
ファイル: instancereset.php プロジェクト: Kheros/CraftedWeb
</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>
コード例 #3
0
ファイル: character.php プロジェクト: nero08/CraftedWeb
               <td align="left" width="90%"><b><?php 
        echo $v;
        ?>
</b><br/>
                </td>
               </tr>
        </table>
        </div>
<?php 
    }
}
if ($_POST['action'] == 'teleport') {
    $character = mysql_real_escape_string($_POST['character']);
    $char_db = mysql_real_escape_string($_POST['char_db']);
    $location = mysql_real_escape_string($_POST['location']);
    $realm_id = server::getRealmId($_POST['char_db']);
    connect::connectToRealmDB($realm_id);
    $result = mysql_query("SELECT race,account,level,online FROM characters WHERE guid='" . $character . "'");
    if (mysql_num_rows($result) == 0) {
        die("<span class='alert'>The character does not exist on that account!</span>");
    } else {
        $row = mysql_fetch_assoc($result);
        if ($row['online'] == 1) {
            die("Please log out before teleporting.");
        }
        $acct = $row['account'];
        $race = $row['race'];
        $level = $row['level'];
        if ($GLOBALS['service']['teleport']['currency'] == "vp" && $GLOBALS['service']['teleport']['price'] > 0) {
            if (account::hasVP($_SESSION['cw_user'], $GLOBALS['service']['teleport']['price']) == FALSE) {
                die("Insufficent Vote Points!");