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


PHP Character::deleteCharacter方法代码示例

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


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

示例1: removeOrphanedCharacter

 private function removeOrphanedCharacter($keyID, $uid, $character_array)
 {
     $stmt = $this->_db->prepare('SELECT character_id FROM user_characters WHERE userid = ? AND key_keyid = ?');
     $stmt->execute(array($uid, $keyID));
     $characters = $stmt->fetchAll(\PDO::FETCH_ASSOC);
     foreach ($characters as $character) {
         unset($character_array[$character['character_id']]);
     }
     if (!empty($character_array)) {
         foreach ($character_array as $delete_character) {
             Character::deleteCharacter($delete_character, $uid, $this->_db);
         }
     }
 }
开发者ID:jgrancell,项目名称:blackbriar,代码行数:14,代码来源:apikey.inc.php

示例2: array

             $stmt->execute(array($user->getUID(), $keyID));
             $characters = $stmt->fetchAll(PDO::FETCH_ASSOC);
             $character_array = array();
             foreach ($characters as $character) {
                 $character_array[$character['charid']] = $character['charid'];
             }
             foreach ($key->getCharacters() as $character) {
                 $char = new Character($character['characterID'], $key->getKeyID(), $key->getVCode(), $key->getAccessMask(), $db, $user);
                 if ($char->getExistance() or $char->getExistance() == FALSE) {
                     $char->updateCharacterInfo();
                 }
                 unset($character_array[$char->getCharacterID()]);
             }
             if (!empty($character_array)) {
                 foreach ($character_array as $delete_character) {
                     Character::deleteCharacter($delete_character, $user->getUID());
                 }
             }
             $refresh = $key->refreshAPIKey('refresh');
             setAlert('success', 'API Key Refreshed', 'The API key has been successfully refreshed.');
         }
     } elseif (!($key->getAccessMask() & MINIMUM_API) and $key->getKeyStatus() == 1) {
         setAlert('danger', 'The API Key Does Not Meet Minimum Requirements', 'The required minimum Access Mask for API keys is ' . MINIMUM_API . '. Please create a new key using the Create Key link.');
     }
 } elseif ($request['value'] == 'delete') {
 }
 if ($user->getAdminAccess()) {
     $stmt = $db->prepare('SELECT * FROM user_apikeys JOIN user_accounts ON user_apikeys.uid = user_accounts.uid ORDER BY user_accounts.username ASC');
     $stmt->execute(array());
     $keys = $stmt->fetchAll(PDO::FETCH_ASSOC);
 } else {
开发者ID:jgrancell,项目名称:eveadmin-import,代码行数:31,代码来源:info.php


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