当前位置: 首页>>代码示例>>PHP>>正文


PHP account::logThis方法代码示例

本文整理汇总了PHP中account::logThis方法的典型用法代码示例。如果您正苦于以下问题:PHP account::logThis方法的具体用法?PHP account::logThis怎么用?PHP account::logThis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在account的用法示例。


在下文中一共展示了account::logThis方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: changeForgottenPassword

 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='" . $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);
     }
 }
开发者ID:nero08,项目名称:CraftedWeb,代码行数:14,代码来源:account.php

示例2: 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;
    }
}
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:convert.php

示例3: instant80

 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>';
         }
     }
 }
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:30,代码来源:character.php

示例4: 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>
开发者ID:Kheros,项目名称:CraftedWeb,代码行数:31,代码来源:instancereset.php

示例5: mysql_query

            $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;
}
开发者ID:nero08,项目名称:CraftedWeb,代码行数:31,代码来源:character.php


注:本文中的account::logThis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。