本文整理汇总了PHP中account::getAccountID方法的典型用法代码示例。如果您正苦于以下问题:PHP account::getAccountID方法的具体用法?PHP account::getAccountID怎么用?PHP account::getAccountID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::getAccountID方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: revive
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: forgotPW
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='" . $account_name . "' 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: account
}
}
}
$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: round
</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:
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: mysql_query
</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: checkIfVoted
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: Copyright
<?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!