本文整理汇总了PHP中account::getAccID方法的典型用法代码示例。如果您正苦于以下问题:PHP account::getAccID方法的具体用法?PHP account::getAccID怎么用?PHP account::getAccID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::getAccID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
<table>
<tr>
<th>Guid</th>
<th>Name</th>
<th>Level</th>
<th>Class</th>
<th>Race</th>
<th>Realm</th>
<th>Status</th>
<th>Actions</th>
</tr>
<?php
$server->selectDB('webdb');
$result = mysql_query("SELECT name,id FROM realms");
while ($row = mysql_fetch_assoc($result)) {
$acct_id = $account->getAccID($_GET['user']);
$server->connectToRealmDB($row['id']);
$result = mysql_query("SELECT name,guid,level,class,race,gender,online FROM characters WHERE account='" . (int) $_GET['user'] . "'\r\n\t\t\t\tOR account='" . $acct_id . "'");
while ($rows = mysql_fetch_assoc($result)) {
?>
<tr class="center">
<td><?php
echo $rows['guid'];
?>
</td>
<td><?php
echo $rows['name'];
?>
</td>
<td><?php
echo $rows['level'];
示例2: ucfirst
$realm = mysql_real_escape_string($_POST['realm']);
mysql_query("UPDATE account_access SET gmlevel='" . $rank . "',RealmID='" . $realm . "' WHERE id='" . $id . "'");
$server->logThis("Modified account access for " . ucfirst(strtolower($account->getAccName($id))));
}
###############################
if ($_POST['action'] == 'removeAccA') {
$id = (int) $_POST['id'];
mysql_query("DELETE FROM account_access WHERE id='" . $id . "'");
$server->logThis("Modified GM account access for " . ucfirst(strtolower($account->getAccName($id))));
}
###############################
if ($_POST['action'] == 'addAccA') {
$user = mysql_real_escape_string($_POST['user']);
$realm = mysql_real_escape_string($_POST['realm']);
$rank = (int) $_POST['rank'];
$guid = $account->getAccID($user);
mysql_query("INSERT INTO account_access VALUES('" . $guid . "','" . $rank . "','" . $realm . "')");
$server->logThis("Added GM account access for " . ucfirst(strtolower($account->getAccName($guid))));
}
###############################
if ($_POST['action'] == 'editChar') {
$guid = (int) $_POST['guid'];
$rid = (int) $_POST['rid'];
$name = mysql_real_escape_string(trim(ucfirst(strtolower($_POST['name']))));
$class = (int) $_POST['class'];
$race = (int) $_POST['race'];
$gender = (int) $_POST['gender'];
$money = (int) $_POST['money'];
$accountname = mysql_real_escape_string($_POST['account']);
$accountid = $account->getAccID($accountname);
if (empty($guid) || empty($rid) || empty($name) || empty($class) || empty($race)) {