示例#1
0
 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
 public static function forgotPW($account_name, $account_email)
 {
     $account_name = mysql_real_escape_string($account_name);
     $account_email = mysql_real_escape_string($account_email);
     if (empty($account_name) || empty($account_email)) {
         echo '<b class="red_text">Please enter both fields.</b>';
     } else {
         connect::selectDB('logondb');
         $result = mysql_query("SELECT COUNT('id') FROM account\r\n\t\t\t\t\t\t\t\t   WHERE username='******' AND email='" . $account_email . "'");
         if (mysql_result($result, 0) == 0) {
             echo '<b class="red_text">The username or email is incorrect.</b>';
         } else {
             //Success, lets send an email & add the forgotpw thingy.
             $code = RandomString();
             $emailSent = website::sendEmail($account_email, $GLOBALS['default_email'], 'Forgot Password', "\r\n\t\t\t\tHello there. <br/><br/>\r\n\t\t\t\tA password reset has been requested for the account " . $account_name . " <br/>\r\n\t\t\t\tIf you wish to reset your password, click the following link: <br/>\r\n\t\t\t\t<a href='" . $GLOBALS['website_domain'] . "?p=forgotpw&code=" . $code . "&account=" . account::getAccountID($account_name) . "'>\r\n\t\t\t\t" . $GLOBALS['website_domain'] . "?p=forgotpw&code=" . $code . "&account=" . account::getAccountID($account_name) . "</a>\r\n\r\n\t\t\t\t<br/><br/>\r\n\r\n\t\t\t\tIf you did not request this, just ignore this message.<br/><br/>\r\n\t\t\t\tSincerely, The Management.");
             if ($emailSent) {
                 $account_id = self::getAccountID($account_name);
                 connect::selectDB('webdb');
                 mysql_query("DELETE FROM password_reset WHERE account_id='" . $account_id . "'");
                 mysql_query("INSERT INTO password_reset (code,account_id)\r\n\t\t\t\t    VALUES ('" . $code . "','" . $account_id . "')");
                 echo "An email containing a link to reset your password has been sent to the Email address you specified.\r\n\t\t\t\t\t      If you've tried to send other forgot password requests before this, they won't work. <br/>";
             } else {
                 echo '<h4 class="red_text">Failed to send email! (Check error logs for details)</h4>';
             }
         }
     }
 }
示例#3
0
        }
    }
}
$account = new account();
$account->getRemember();
//Remember thingy.
//This is to prevent the error "Undefined index: p"
if (!isset($_GET['p'])) {
    $_GET['p'] = 'home';
}
###VOTING SYSTEM####
if (isset($_SESSION['votingUrlID']) && $_SESSION['votingUrlID'] != 0 && $GLOBALS['vote']['type'] == 'confirm') {
    if (website::checkIfVoted((int) $_SESSION['votingUrlID'], $GLOBALS['connection']['webdb']) == TRUE) {
        die("?p=vote");
    }
    $acct_id = account::getAccountID($_SESSION['cw_user']);
    $next_vote = time() + $GLOBALS['vote']['timer'];
    connect::selectDB('webdb');
    mysql_query("INSERT INTO votelog VALUES('','" . (int) $_SESSION['votingUrlID'] . "',\n\t'" . $acct_id . "','" . time() . "','" . $next_vote . "','" . $_SERVER['REMOTE_ADDR'] . "')");
    $getSiteData = mysql_query("SELECT points,url FROM votingsites WHERE id='" . (int) $_SESSION['votingUrlID'] . "'");
    $row = mysql_fetch_assoc($getSiteData);
    if (mysql_num_rows($getSiteData) == 0) {
        header('Location: index.php');
        unset($_SESSION['votingUrlID']);
        exit;
    }
    //Update the points table.
    $add = $row['points'] * $GLOBALS['vote']['multiplier'];
    mysql_query("UPDATE account_data SET vp=vp + " . $add . " WHERE id=" . $acct_id);
    unset($_SESSION['votingUrlID']);
    header("Location: ?p=vote");
示例#4
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;
    }
}
示例#5
0
        echo $GLOBALS['donationList'][0][2];
    } else {
        echo 1;
    }
    ?>
" />
          <input type="hidden" name="no_shipping" value="1" />
          <input type="hidden" name="no_note" value="1" />
          <input type="hidden" name="currency_code" value="<?php 
    echo $GLOBALS['donation']['currency'];
    ?>
" />
          <input type="hidden" name="lc" value="US" />
          <input type="hidden" name="bn" value="PP-ShopCartBF" />
          <input type="hidden" name="custom" value="<?php 
    echo account::getAccountID($_SESSION['cw_user']);
    ?>
">
         </form>
         </td>
     </tr>
     <?php 
    include "documents/refundpolicy.php";
    if ($rp_enable == true) {
        ?>
     <tr>
         <td align="center">
         	<br/>Please read our <a href="#refundpolicy" onclick="viewRefundPolicy()">Refund Policy</a> before donating.
         <td>
     </tr>
     <?php 
示例#6
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>
示例#7
0
 public static function checkIfVoted($siteid)
 {
     $siteid = (int) $siteid;
     $acct_id = account::getAccountID($_SESSION['cw_user']);
     connect::selectDB('webdb');
     $result = mysql_query("SELECT COUNT(id) FROM votelog\n\t\tWHERE userid='" . $acct_id . "' AND siteid='" . $siteid . "' AND next_vote > " . time());
     if (mysql_result($result, 0) == 0) {
         return FALSE;
     } else {
         return TRUE;
     }
 }
示例#8
0
文件: raf.php 项目: Kheros/CraftedWeb
<?php

/*
            _____           ____
           |   __|_____ _ _|    \ ___ _ _ ___
           |   __|     | | |  |  | -_| | |_ -|
           |_____|_|_|_|___|____/|___|\_/|___|
    Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
account::isNotLoggedIn();
?>
<div class='box_two_title'>Refer-A-Friend</div>
<b class='yellow_text'>Your referral link: </b> <div id="raf_box">
                  <?php 
echo $GLOBALS['website_domain'] . "?p=register&id=" . account::getAccountID($_SESSION['cw_user']);
?>
</div><br/>
<h4 class='blue_text'>How does it work?</h4>

It's simple! Just copy the link above and send it to your friends. If they create an account using your referral link, you two can venture into Azeroth with faster leveling speeds, reputation gain, and more!