Ir para conteúdo

GicoO

Campones
  • Total de itens

    30
  • Registro em

  • Última visita

Tudo que GicoO postou

  1. giovani_sobral_1996@hotmail.com
  2. Claro que quem quiser fazer team, vai fazer oê, isso é logica. Mapa war não fica dificil por apenas trocar de mapa, fica as mesmas coisas para todos os players. claro que fica quando chega no map desert se vai corre pra onde?vai subi escada da onde? cada mapa eh diferente ;] é verdade .... E fora que tem mapa que alguns players nao conhecem tanto e consequentemente nao sao boms nos mesmos Hehe' Muito bom o mapa valew ai ;D
  3. Bom amigo em 1ºlugar eu n disse q ia baixar e em 2º lugar eu so dei um aviso pra geral ae blz e tambem n estou interessado em seus projetos até no entanto eu tenho os meus e estou muito feliz com eles flw ..... nao obrigo ninguem a baixar,só nao fale merda si vc nem baixo,baixar ou nao ai é por sua conta,si esta feliz cum seus projetos,bom pra vc,não falo mal das coisas sem saber :] creditos colados kkk entao tente tratar as pessoas bem melhor e n desse jeito de arrogancia vlw ae Kra pq em vez de fica reclamando da coisa dos outros tu nao cala essa sua boca maldita e vai chupa uma ROLA GROSSA que tu ganha mais... Enquanto ao Tópico .... Parabens kra muito bom E só um aviso ai pra galera PODE baixar num tem virus nao ;D
  4. Queria saber como muda a vocação que o kra nasce quando faz a conta no site e talz... Tipow era pra ele nasce só druid ou paladin ou knight Mas ele ta nascendo com promotion ... Como muda isso?
  5. GicoO

    [Vip] Rep+ Facil

    Eu queria que alguem fizesse um sistema de vip (que quando clica no item voce recebe X dias vips) ... Porem .... Eu queria que adaptasse com o sistema vip do kydrai... Esse aqui ó --> http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/ Alguem ajuda ai pls ;X To precisando muito ;XX
  6. GicoO

    Erro Help Por Favor

    Gente eu instalei o vip system do kydrai dai colocaquei as paradas pra aparecer no site se o kra é vip ou nao ... Mas dai da esse erro aqui quando vou acessar a conta ... Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\pot\OTS_Account.php:428 Stack trace: #0 C:\xampp\htdocs\accountmanagement.php(11): OTS_Account->getRecoveryKey() #1 C:\xampp\htdocs\index.php(162): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 428 Segue abaixo meu OTS_accounts <?php /**#@+ * @version 0.0.1 */ /** * @package POT * @version 0.1.5 * @author Wrzasq <wrzasq@gmail.com> * @copyright 2007 - 2008 (C) by Wrzasq * @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public License, Version 3 */ /** * OTServ account abstraction. * * @package POT * @version 0.1.5 * @property string $name Account name. * @property string $password Password. * @property string $eMail Email address. * @property int $premiumEnd Timestamp of PACC end. * @property bool $blocked Blocked flag state. * @property bool $deleted Deleted flag state. * @property bool $warned Warned flag state. * @property bool $banned Ban state. * @property-read int $id Account number. * @property-read bool $loaded Loaded state. * @property-read OTS_Players_List $playersList Characters of this account. * @property-read int $access Access level. * @tutorial POT/Accounts.pkg */ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable { /** * Account data. * * @var array * @version 0.1.5 */ private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','page_access' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0, 'viptime' => 0); /** * Creates new account. * * <p> * This method creates new account with given name. Account number is generated automaticly and saved into {@link OTS_Account::getId() ID field}. * </p> * * <p> * If you won't specify account name then random one will be generated. * </p> * * <p> * If you use own account name then it will be returned after success, and exception will be generated if it will be alredy used as name will be simply used in query with account create attempt. * </p> * * @version 0.1.5 * @since 0.1.5 * @param string $name Account name. * @return string Account name. * @throws PDOException On PDO operation error. * @example examples/create.php create.php * @tutorial POT/Accounts.pkg#create */ public function createNamed($name = null) { // if name is not passed then it will be generated randomly if( !isset($name) ) { $exist = array(); // reads already existing names foreach( $this->db->query('SELECT ' . $this->db->fieldName('name') . ' FROM ' . $this->db->tableName('accounts') )->fetchAll() as $account) { $exist[] = $account['name']; } // initial name $name = uniqid(); // repeats until name is unique while( in_array($name, $exist) ) { $name .= '_'; } } // saves blank account info $this->db->query('INSERT INTO ' . $this->db->tableName('accounts') . ' (' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ) VALUES (' . $this->db->quote($name) . ', \'\', \'\')'); // reads created account's ID $this->data['id'] = $this->db->lastInsertId(); // return name of newly created account return $name; } /** * Creates new account. * * <p> * Create new account in given range (1 - 9999999 by default). * </p> * * <p> * Note: If account name won't be speciffied random will be created. * </p> * * <p> * Note: Since 0.0.3 version this method doesn't require buffered queries. * </p> * * <p> * Note: Since 0.1.5 version you should use {@link OTS_Account::createNamed() createNamed() method} since OTServ now uses account names. * </p> * * <p> * Note: Since 0.1.1 version this method throws {@link E_OTS_Generic E_OTS_Generic} exceptions instead of general Exception class objects. Since all exception classes are child classes of Exception class so your old code will still handle all exceptions. * </p> * * <p> * Note: Since 0.1.5 version this method no longer creates account as blocked. * </p> * * @version 0.1.5 * @param int $min Minimum number. * @param int $max Maximum number. * @param string $name Account name. * @return int Created account number. * @throws E_OTS_Generic When there are no free account numbers. * @throws PDOException On PDO operation error. * @deprecated 0.1.5 Use createNamed(). */ public function create($min = 1, $max = 9999999, $name = null) { // generates random account number $random = rand($min, $max); $number = $random; $exist = array(); // if name is not passed then it will be generated randomly if( !isset($name) ) { // reads already existing names foreach( $this->db->query('SELECT ' . $this->db->fieldName('name') . ' FROM ' . $this->db->tableName('accounts') )->fetchAll() as $account) { $exist[] = $account['name']; } // initial name $name = uniqid(); // repeats until name is unique while( in_array($name, $exist) ) { $name .= '_'; } // resets array for account numbers loop $exist = array(); } // reads already existing accounts foreach( $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('accounts') )->fetchAll() as $account) { $exist[] = $account['id']; } // finds unused number while(true) { // unused - found if( !in_array($number, $exist) ) { break; } // used - next one $number++; // we need to re-set if($number > $max) { $number = $min; } // we checked all possibilities if($number == $random) { throw new E_OTS_Generic(E_OTS_Generic::CREATE_ACCOUNT_IMPOSSIBLE); } } // saves blank account info $this->data['id'] = $number; $this->db->query('INSERT INTO ' . $this->db->tableName('accounts') . ' (' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ') VALUES (' . $number . ', ' . $this->db->quote($name) . ', \'\', \'\')'); return $number; } /** * @version 0.0.6 * @since 0.0.4 * @param OTS_Group $group Group to be assigned to account. * @param int $min Minimum number. * @param int $max Maximum number. * @return int Created account number. * @deprecated 0.0.6 There is no more group_id field in database, use create(). */ public function createEx(OTS_Group $group, $min = 1, $max = 9999999) { return $this->create($min, $max); } /** * Loads account with given number. * * @version 0.0.6 * @param int $id Account number. * @throws PDOException On PDO operation error. */ public function load($id) { // SELECT query on database $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('page_access') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('viptime') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); } /** * Loads account by it's name. * * <p> * Note: Since 0.1.5 version this method loads account by it's name not by e-mail address. To find account by it's e-mail address use {@link OTS_Account::findByEMail() findByEMail() method}. * </p> * * @version 0.1.5 * @since 0.0.2 * @param string $name Account's name. * @throws PDOException On PDO operation error. */ public function find($name) { // finds player's ID $id = $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('name') . ' = ' . $this->db->quote($name) )->fetch(); // if anything was found if( isset($id['id']) ) { $this->load($id['id']); } } /** * Loads account by it's e-mail address. * * @version 0.1.5 * @since 0.1.5 * @param string $email Account's e-mail address. * @throws PDOException On PDO operation error. */ public function findByEMail($email) { // finds player's ID $id = $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($email) )->fetch(); // if anything was found if( isset($id['id']) ) { $this->load($id['id']); } } /** * Checks if object is loaded. * * @return bool Load state. */ public function isLoaded() { return isset($this->data['id']); } /** * Updates account in database. * * <p> * Unlike other DAO objects account can't be saved without ID being set. It means that you can't just save unexisting account to automaticly create it. First you have to create record by using {@link OTS_Account::createName() createNamed() method} * </p> * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded exception} instead of triggering E_USER_WARNING. * </p> * * @version 0.1.5 * @throws E_OTS_NotLoaded If account doesn't have ID assigned. * @throws PDOException On PDO operation error. */ public function save() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } // UPDATE query on database $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('page_access') . ' = ' . (int) $this->data['page_access'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('viptime') . ' = ' . (int) $this->data['viptime'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); } /** * Account number. * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded} exception instead of triggering E_USER_WARNING. * </p> * * @version 0.0.3 * @return int Account number. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getId() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } return $this->data['id']; } /** * Other Account Information. * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded} exception instead of triggering E_USER_WARNING. * </p> * * @version 0.0.3 * @return int Account Information. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getRLName() { if( !isset($this->data['rlname']) ) { throw new E_OTS_NotLoaded(); } return $this->data['rlname']; } public function getLocation() { if( !isset($this->data['location']) ) { throw new E_OTS_NotLoaded(); } return $this->data['location']; } public function getPageAccess() { if( !isset($this->data['page_access']) ) { throw new E_OTS_NotLoaded(); } return $this->data['page_access']; } public function getPremDays() { if( !isset($this->data['premdays']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])); } public function getVipDays() { if( !isset($this->data['viptime']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return ceil(($this->data['viptime'] - time()) / (24*60*60)); } public function getLastLogin() { if( !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return $this->data['lastday']; } public function isPremium() { return ($this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])) > 0); } public function isVip() { return ceil(($this->data['viptime'] - time()) / (24*60*60)) > 0; } public function getCreated() { if( !isset($this->data['created']) ) { throw new E_OTS_NotLoaded(); } return $this->data['created']; } public function getRecoveryKey() { if( !isset($this->data['key']) ) { throw new E_OTS_NotLoaded(); } return $this->data['key']; } public function getPremiumPoints() { if( !isset($this->data['premium_points']) ) { throw new E_OTS_NotLoaded(); } return $this->data['premium_points']; } public function setRLName($rlname) { $this->data['rlname'] = (string) $rlname; } public function setLocation($loc) { $this->data['location'] = (string) $loc; } public function setRecoveryKey($rec_key) { $this->data['key'] = (string) $rec_key; } public function setPremiumPoints($premium_points) { $this->data['premium_points'] = (string) $premium_points; } /** * @version 0.1.0 * @since 0.0.4 * @return OTS_Group Group of which current account is member (currently random group). * @throws E_OTS_NotLoaded If account is not loaded. * @deprecated 0.0.6 There is no more group_id field in database. */ public function getGroup() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } // loads default group $groups = new OTS_Groups_List(); $groups->rewind(); return $groups->current(); } /** * Name. * * @version 0.1.5 * @since 0.1.5 * @return string Name. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getName() { if( !isset($this->data['name']) ) { throw new E_OTS_NotLoaded(); } return $this->data['name']; } /** * Sets account's name. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @version 0.1.5 * @since 0.1.5 * @param string $name Account name. */ public function setName($name) { $this->data['name'] = (string) $name; } /** * Account's password. * * <p> * Doesn't matter what password hashing mechanism is used by OTServ - this method will just return RAW database content. It is not possible to "decrypt" hashed strings, so it even wouldn't be possible to return real password string. * </p> * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded} exception instead of triggering E_USER_WARNING. * </p> * * @version 0.0.3 * @return string Password. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getPassword() { if( !isset($this->data['password']) ) { throw new E_OTS_NotLoaded(); } return $this->data['password']; } /** * Sets account's password. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * <p> * Remember that this method just sets database field's content. It doesn't apply any hashing/encryption so if OTServ uses hashing for passwords you have to apply it by yourself before passing string to this method. * </p> * * @param string $password Password. */ public function setPassword($password) { $this->data['password'] = (string) $password; } /** * E-mail address. * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded} exception instead of triggering E_USER_WARNING. * </p> * * @version 0.0.3 * @return string E-mail. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getEMail() { if( !isset($this->data['email']) ) { throw new E_OTS_NotLoaded(); } return $this->data['email']; } /** * Sets account's email. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @param string $email E-mail address. */ public function setEMail($email) { $this->data['email'] = (string) $email; } /** * Checks if account is blocked. * * <p> * Note: Since 0.0.3 version this method throws {@link E_OTS_NotLoaded E_OTS_NotLoaded} exception instead of triggering E_USER_WARNING. * </p> * * @version 0.0.3 * @return bool Blocked state. * @throws E_OTS_NotLoaded If account is not loaded. */ public function isBlocked() { if( !isset($this->data['blocked']) ) { throw new E_OTS_NotLoaded(); } return $this->data['blocked']; } /** * Unblocks account. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> */ public function unblock() { $this->data['blocked'] = false; } /** * Blocks account. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> */ public function block() { $this->data['blocked'] = true; } /** * Checks if account is deleted (by flag setting). * * @version 0.1.5 * @since 0.1.5 * @return bool Flag state. * @throws E_OTS_NotLoaded If account is not loaded. */ public function isDeleted() { if( !isset($this->data['deleted']) ) { throw new E_OTS_NotLoaded(); } return $this->data['blocked']; } /** * Unsets account's deleted flag. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @version 0.1.5 * @since 0.1.5 */ public function unsetDeleted() { $this->data['deleted'] = false; } /** * Deletes account (only by setting flag state, not physicly). * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @version 0.1.5 * @since 0.1.5 */ public function setDeleted() { $this->data['deleted'] = true; } /** * Checks if account is warned. * * @version 0.1.5 * @since 0.1.5 * @return bool Flag state. * @throws E_OTS_NotLoaded If account is not loaded. */ public function isWarned() { if( !isset($this->data['warned']) ) { throw new E_OTS_NotLoaded(); } return $this->data['warned']; } /** * Unwarns account. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @version 0.1.5 * @since 0.1.5 */ public function unwarn() { $this->data['warned'] = false; } /** * Warns account. * * <p> * This method only updates object state. To save changes in database you need to use {@link OTS_Account::save() save() method} to flush changed to database. * </p> * * @version 0.1.5 * @since 0.1.5 */ public function warn() { $this->data['warned'] = true; } /** * @version 0.0.4 * @return int PACC days. * @throws E_OTS_NotLoaded If account is not loaded. * @deprecated 0.0.3 There is no more premdays field in accounts table. */ public function getPACCDays() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } return 0; } /** * @version 0.0.4 * @param int $pacc PACC days. * @deprecated 0.0.3 There is no more premdays field in accounts table. */ public function setPACCDays($premdays) { } /** * Reads custom field. * * <p> * Reads field by it's name. Can read any field of given record that exists in database. * </p> * * <p> * Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources. * </p> * * @version 0.0.5 * @since 0.0.3 * @param string $field Field name. * @return string Field value. * @throws E_OTS_NotLoaded If account is not loaded. * @throws PDOException On PDO operation error. */ public function getCustomField($field) { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } $value = $this->db->query('SELECT ' . $this->db->fieldName($field) . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id'])->fetch(); return $value[$field]; } /** * Writes custom field. * * <p> * Write field by it's name. Can write any field of given record that exists in database. * </p> * * <p> * Note: You should use this method only for fields that are not provided in standard setters/getters (SVN fields). This method runs SQL query each time you call it so it highly overloads used resources. * </p> * * <p> * Note: Make sure that you pass $value argument of correct type. This method determinates whether to quote field name. It is safe - it makes you sure that no unproper queries that could lead to SQL injection will be executed, but it can make your code working wrong way. For example: $object->setCustomField('foo', '1'); will quote 1 as as string ('1') instead of passing it as a integer. * </p> * * @version 0.0.5 * @since 0.0.3 * @param string $field Field name. * @param mixed $value Field value. * @throws E_OTS_NotLoaded If account is not loaded. * @throws PDOException On PDO operation error. */ public function setCustomField($field, $value) { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } // quotes value for SQL query if(!( is_int($value) || is_float($value) )) { $value = $this->db->quote($value); } $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName($field) . ' = ' . $value . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); } /** * @version 0.1.0 * @return array Array of OTS_Player objects from given account. * @throws E_OTS_NotLoaded If account is not loaded. * @deprecated 0.0.5 Use getPlayersList(). */ public function getPlayers() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } $players = array(); foreach( $this->db->query('SELECT ' . $this->db->fieldName('id') . ' FROM ' . $this->db->tableName('players') . ' WHERE ' . $this->db->fieldName('account_id') . ' = ' . $this->data['id'])->fetchAll() as $player) { // creates new object $object = new OTS_Player(); $object->load($player['id']); $players[] = $object; } return $players; } /** * List of characters on account. * * <p> * In difference to {@link OTS_Account::getPlayers() getPlayers() method} this method returns filtered {@link OTS_Players_List OTS_Players_List} object instead of array of {@link OTS_Player OTS_Player} objects. It is more effective since OTS_Player_List doesn't perform all rows loading at once. * </p> * * <p> * Note: Returned object is only prepared, but not initialised. When using as parameter in foreach loop it doesn't matter since it will return it's iterator, but if you will wan't to execute direct operation on that object you will need to call {@link OTS_Base_List::rewind() rewind() method} first. * </p> * * @version 0.1.4 * @since 0.0.5 * @return OTS_Players_List List of players from current account. * @throws E_OTS_NotLoaded If account is not loaded. */ public function getPlayersList() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } // creates filter $filter = new OTS_SQLFilter(); $filter->compareField('account_id', (int) $this->data['id']); // creates list object $list = new OTS_Players_List(); $list->setFilter($filter); return $list; } /** * @version 0.1.5 * @since 0.0.5 * @param int $time Time for time until expires (0 - forever). * @throws PDOException On PDO operation error. * @deprecated 0.1.5 Use OTS_AccountBan class. */ public function ban($time = 0) { // can't ban nothing if( !$this->isLoaded() ) { throw new E_OTS_NotLoaded(); } // creates ban entry $ban = new OTS_AccountBan(); $ban->setValue($this->data['id']); $ban->setExpires($time); $ban->setAdded( time() ); $ban->activate(); $ban->save(); } /** * @version 0.1.5 * @since 0.0.5 * @throws PDOException On PDO operation error. * @deprecated 0.1.5 Use OTS_AccountBan class. */ public function unban() { // can't unban nothing if( !$this->isLoaded() ) { throw new E_OTS_NotLoaded(); } // deletes ban entry $ban = new OTS_AccountBan(); $ban->find($this->data['id']); $ban->delete(); } /** * @version 0.1.5 * @since 0.0.5 * @return bool True if account is banned, false otherwise. * @throws PDOException On PDO operation error. * @deprecated 0.1.5 Use OTS_AccountBan class. */ public function isBanned() { // nothing can't be banned if( !$this->isLoaded() ) { throw new E_OTS_NotLoaded(); } // finds ban entry $ban = new OTS_AccountBan(); $ban->find($this->data['id']); return $ban->isLoaded() && $ban->isActive() && ( $ban->getExpires() == 0 || $ban->getExpires() > time() ); } /** * Deletes account. * * <p> * This method physicly deletes account from database! To set <i>deleted</i> flag use {@link OTS_Account::setDeleted() setDeleted() method}. * </p> * * @version 0.0.5 * @since 0.0.5 * @throws E_OTS_NotLoaded If account is not loaded. * @throws PDOException On PDO operation error. */ public function delete() { if( !isset($this->data['id']) ) { throw new E_OTS_NotLoaded(); } // deletes row from database $this->db->query('DELETE FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); // resets object handle unset($this->data['id']); } /** * Checks highest access level of account. * * @return int Access level (highest access level of all characters). * @throws PDOException On PDO operation error. */ public function getAccess() { // by default $access = 0; // finds groups of all characters foreach( $this->getPlayersList() as $player) { $group = $player->getGroup(); // checks if group's access level is higher then previouls found highest if( $group->getAccess() > $access) { $access = $group->getAccess(); } } return $access; } /** * Checks highest access level of account in given guild. * * @param OTS_Guild $guild Guild in which access should be checked. * @return int Access level (highest access level of all characters). * @throws PDOException On PDO operation error. */ public function getGuildAccess(OTS_Guild $guild) { // by default $access = 0; // finds ranks of all characters foreach( $this->getPlayersList() as $player) { $rank = $player->getRank(); // checks if rank's access level is higher then previouls found highest if( isset($rank) && $rank->getGuild()->getId() == $guild->getId() && $rank->getLevel() > $access) { $access = $rank->getLevel(); } } return $access; } /** * Returns players iterator. * * <p> * There is no need to implement entire Iterator interface since we have {@link OTS_Players_List players list class} for it. * </p> * * @version 0.0.5 * @since 0.0.5 * @throws E_OTS_NotLoaded If account is not loaded. * @throws PDOException On PDO operation error. * @return Iterator List of players. */ public function getIterator() { return $this->getPlayersList(); } /** * Returns number of player within. * * @version 0.0.5 * @since 0.0.5 * @throws E_OTS_NotLoaded If account is not loaded. * @throws PDOException On PDO operation error. * @return int Count of players. */ public function count() { return $this->getPlayersList()->count(); } /** * Magic PHP5 method. * * @version 0.1.5 * @since 0.1.0 * @param string $name Property name. * @return mixed Property value. * @throws E_OTS_NotLoaded If account is not loaded. * @throws OutOfBoundsException For non-supported properties. * @throws PDOException On PDO operation error. */ public function __get($name) { switch($name) { case 'id': return $this->getId(); case 'name': return $this->getName(); case 'password': return $this->getPassword(); case 'eMail': return $this->getEMail(); case 'premiumEnd': return $this->getPremiumEnd(); case 'loaded': return $this->isLoaded(); case 'playersList': return $this->getPlayersList(); case 'blocked': return $this->isBlocked(); case 'deleted': return $this->isDeleted(); case 'warned': return $this->isWarned(); case 'banned': return $this->isBanned(); case 'access': return $this->getAccess(); default: throw new OutOfBoundsException(); } } /** * Magic PHP5 method. * * @version 0.1.5 * @since 0.1.0 * @param string $name Property name. * @param mixed $value Property value. * @throws E_OTS_NotLoaded If account is not loaded. * @throws OutOfBoundsException For non-supported properties. * @throws PDOException On PDO operation error. */ public function __set($name, $value) { switch($name) { case 'name': $this->setName($name); break; case 'password': $this->setPassword($value); break; case 'eMail': $this->setEMail($value); break; case 'premiumEnd': $this->setPremiumEnd($value); break; case 'blocked': if($value) { $this->block(); } else { $this->unblock(); } break; case 'deleted': if($value) { $this->setDeleted(); } else { $this->unsetDeleted(); } break; case 'warned': if($value) { $this->warn(); } else { $this->unwarn(); } break; case 'banned': if($value) { $this->ban(); } else { $this->unban(); } break; default: throw new OutOfBoundsException(); } } /** * Returns string representation of object. * * <p> * If any display driver is currently loaded then it uses it's method. Otherwise just returns account number. * </p> * * @version 0.1.3 * @since 0.1.0 * @return string String representation of object. */ public function __toString() { $ots = POT::getInstance(); // checks if display driver is loaded if( $ots->isDisplayDriverLoaded() ) { return $ots->getDisplayDriver()->displayAccount($this); } return $this->getId(); } } /**#@-*/ ?> agora o accountmanagement.php <?PHP if(!$logged) if($action == "logout") $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>'; else $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>'; else { if($action == "") { $account_reckey = $account_logged->getRecoveryKey(); if(!$account_logged->isPremium()) $account_status = '<b><font color="red">Free Account</font></b>'; else $account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>'; if(!$account_logged->isVip()) $account_vip_status = '<b><font color="red">Not Vip Account</font></b>'; else $account_vip_status = '<b><font color="green">Vip Account, '.$account_logged->getVipDays().' days left</font></b>'; if(empty($account_reckey)) $account_registred = '<b><font color="red">No</font></b>'; else if($config['site']['generate_new_reckey'] && $config['site']['send_emails']) $account_registred = '<b><font color="green">Yes ( <a href="?subtopic=accountmanagement&action=newreckey"> Buy new Rec key </a> )</font></b>'; else $account_registred = '<b><font color="green">Yes</font></b>'; $account_created = $account_logged->getCreated(); $account_email = $account_logged->getEMail(); $account_email_new_time = $account_logged->getCustomField("email_new_time"); if($account_email_new_time > 1) $account_email_new = $account_logged->getCustomField("email_new"); $account_rlname = $account_logged->getRLName(); $account_location = $account_logged->getLocation(); if($account_logged->isBanned()) if($account_logged->getBanTime() > 0) $welcome_msg = '<font color="red">Your account is banished until '.date("j F Y, G:i:s", $account_logged->getBanTime()).'!</font>'; else $welcome_msg = '<font color="red">Your account is banished FOREVER!</font>'; else $welcome_msg = 'Welcome to your account!'; $main_content .= '<div class="SmallBox" > <div class="MessageContainer" ><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="Message" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><td width="100%" align=center>'; if($config['site']['worldtransfer'] == 1) $main_content .= '<a href="?subtopic=accountmanagement&action=charactertransfer">Character World Transfer</a>'; $main_content .= '</td><td width=50%><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=logout" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Logout" alt="Logout" src="'.$layout_name.'/images/buttons/_sbutton_logout.gif" ></div></div></td></tr></form></table></td></tr></table> </div><div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/><center><table><tr><td><img src="'.$layout_name.'/images/content/headline-bracer-left.gif" /></td><td style="text-align:center;vertical-align:middle;horizontal-align:center;font-size:17px;font-weight:bold;" >'.$welcome_msg.'<br/></td><td><img src="'.$layout_name.'/images/content/headline-bracer-right.gif" /></td></tr></table><br/></center>'; //if account dont have recovery key show hint if(empty($account_reckey)) $main_content .= '<div class="SmallBox" ><div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="Message" ><div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><tr><td class="LabelV" >Hint:</td><td style="width:100%;" >You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!</td></tr></table><div align="center" ><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></div></div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div><div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div><div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; if($account_email_new_time > 1) if($account_email_new_time < time()) $account_email_change = '<br>(You can accept <b>'.$account_email_new.'</b> as a new email.)'; else { $account_email_change = ' <br>You can accept <b>new e-mail after '.date("j F Y", $account_email_new_time).".</b>"; $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="Message" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div><table><tr><td class="LabelV" >Note:</td><td style="width:100%;" >A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>. After <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!</td></tr></table><div align="center" ><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></div> </div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/><br/>'; } $main_content .= '<a name="General+Information" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" > <image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" ><table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >General Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Email Address:</td><td style="width:90%;" >'.$account_email.''.$account_email_change.'</td></tr><tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV" >Created:</td><td>'.date("j F Y, G:i:s", $account_created).'</td></td><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Last Login:</td><td>'.date("j F Y, G:i:s", time()).'</td></tr><tr style="background-color:'.$config['site']['lightborder'].';" ><td class="LabelV" >Account Status:</td><td>'.$account_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';"<td class="LabelV" >Account Vip Status:</td><td>'.$account_vip_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" ><td class="LabelV" >Registered:</td><td>'.$account_registred.'</td></tr></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" ><tr><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Password" alt="Change Password" src="'.$layout_name.'/images/buttons/_sbutton_changepassword.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name=newemail value="" ><input type="hidden" name=newemaildate value=0 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Change Email" alt="Change Email" src="'.$layout_name.'/images/buttons/_sbutton_changeemail.gif" ></div></div></td></tr></form> </table></td><td width="100%"></td>'; //show button "register account" if(empty($account_reckey)) $main_content .= '<td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Register Account" alt="Register Account" src="'.$layout_name.'/images/buttons/_sbutton_registeraccount.gif" ></div></div></td></tr></form></table></td>'; $main_content .= '</tr></table></td></tr></table></div></table></div></td></tr><br/><a name="Public+Information" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" ><image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Public Information</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td><table style="width:100%;"><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" >'.$account_rlname.'</td></tr><tr><td class="LabelV" >Location:</td><td style="width:90%;" >'.$account_location.'</td></tr></table></td><td align=right><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeinfo" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Edit" alt="Edit" src="'.$layout_name.'/images/buttons/_sbutton_edit.gif" ></div></div></td></tr></form></table></td></tr> </table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr> </table> </div> </table></div></td></tr><br/><br/>'; $main_content .= '<a name="Characters" ></a><div class="TopButtonContainer" ><div class="TopButton" ><a href="#top" ><image style="border:0px;" src="'.$layout_name.'/images/content/back-to-top.gif" /></a></div></div><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Characters</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:65%" >Name</td><td style="width:15%" >Level</td><td style="width:7%">Status</td><td style="width:5%"> </td></tr>'; $account_players = $account_logged->getPlayersList(); $account_players->orderBy('name'); //show list of players on account foreach($account_players as $account_player) { $player_number_counter++; $main_content .= '<tr style="background-color:'; if(is_int($player_number_counter / 2)) $main_content .= $config['site']['darkborder']; else $main_content .= $config['site']['lightborder']; $main_content .= ';" ><td><NOBR>'.$player_number_counter.'. '.$account_player->getName(); if($account_player->isDeleted()) $main_content .= '<font color="red"><b> [ DELETED ] </b> <a href="?subtopic=accountmanagement&action=undelete&name='.urlencode($account_player->getName()).'">>> UNDELETE <<</a></font>'; if($account_player->isNameLocked()) if($account_player->getOldName()) $main_content .= '<font color="red"><b> [ NAMELOCK:</b> Wait for GM, new name: <b>'.$account_player->getOldName().' ]</b></font>'; else $main_content .= '<font color="red"><b> [ NAMELOCK: <form action="" method="GET"><input name="subtopic" type="hidden" value="accountmanagement" /><input name="action" type="hidden" value="newnick" /><input name="name" type="hidden" value="'.$account_player->getName().'" /><input name="name_new" type="text" value="Enter here new nick" size="16" /><input type="submit" value="Set new nick" /></form> ]</b></font>'; $main_content .= '</NOBR></td><td><NOBR>'.$account_player->getLevel().' '.$vocation_name[$account_player->getWorld()][$account_player->getPromotion()][$account_player->getVocation()].'</NOBR></td>'; if(!$account_player->isOnline()) $main_content .= '<td><font color="red"><b>Offline</b></font></td>'; else $main_content .= '<td><font color="green"><b>Online</b></font></td>'; $main_content .= '<td>[<a href="?subtopic=accountmanagement&action=changecomment&name='.urlencode($account_player->getName()).'" >Edit</a>]</td></tr>'; } $main_content .= '</table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><table class="InnerTableButtonRow" cellpadding="0" cellspacing="0" ><tr><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Create Character" alt="Create Character" src="'.$layout_name.'/images/buttons/_sbutton_createcharacter.gif" ></div></div></td></tr></form></table></td><td style="width:100%;" ></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=deletecharacter" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Delete Character" alt="Delete Character" src="'.$layout_name.'/images/buttons/_sbutton_deletecharacter.gif" ></div></div></td></tr></form></table></td></tr></table></td></tr> </table> </div> </table></div></td></tr><br/><br/>'; } //########### CHANGE PASSWORD ########## if($action == "changepassword") { $new_password = trim($_POST['newpassword']); $new_password2 = trim($_POST['newpassword2']); $old_password = trim($_POST['oldpassword']); if(empty($new_password) && empty($new_password2) && empty($old_password)) { $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { if(empty($new_password) || empty($new_password2) || empty($old_password)){ $show_msgs[] = "Please fill in form."; } if($new_password != $new_password2) { $show_msgs[] = "The new passwords do not match!"; } if(empty($show_msgs)) { if(!check_password($new_password)) { $show_msgs[] = "New password contains illegal chars (a-z, A-Z and 0-9 only!) or lenght."; } $old_password = password_ency($old_password); if($old_password != $account_logged->getPassword()) { $show_msgs[] = "Current password is incorrect!"; } } if(!empty($show_msgs)){ //show errors $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($show_msgs as $show_msg) { $main_content .= '<li>'.$show_msg; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; //show form $main_content .= 'Please enter your current password and a new password. For your security, please enter the new password twice.<br/><br/><form action="?subtopic=accountmanagement&action=changepassword" method="post" ><div class="TableContainer" ><table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Change Password</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >New Password:</span></td><td style="width:90%;" ><input type="password" name="newpassword" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >New Password Again:</span></td><td><input type="password" name="newpassword2" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Current Password:</span></td><td><input type="password" name="oldpassword" size="30" maxlength="29" ></td></tr></table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { $org_pass = $new_password; $new_password = password_ency($new_password); $account_logged->setPassword($new_password); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Password Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your password has been changed.'; if($config['site']['send_emails'] && $config['site']['send_mail_when_change_password']) { $mailBody = '<html> <body> <h3>Password to account changed!</h3> <p>You or someone else changed password to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>New password: <b>'.$org_pass.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - Changed password"; $mail->Body = $mailBody; if($mail->Send()) $main_content .= '<br /><small>Your new password were send on email address <b>'.$account_logged->getEMail().'</b>.</small>'; else $main_content .= '<br /><small>An error occorred while sending email with password!</small>'; } $main_content .= '</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; $_SESSION['password'] = $new_password; } } } //############# CHANGE E-MAIL ################### if($action == "changeemail") { $account_email_new_time = $account_logged->getCustomField("email_new_time"); if($account_email_new_time > 10) {$account_email_new = $account_logged->getCustomField("email_new"); } if($account_email_new_time < 10){ if($_POST['changeemailsave'] == 1) { $account_email_new = trim($_POST['new_email']); $post_password = trim($_POST['password']); if(empty($account_email_new)) { $change_email_errors[] = "Please enter your new email address."; } else { if(!check_mail($account_email_new)) { $change_email_errors[] = "E-mail address is not correct."; } } if(empty($post_password)) { $change_email_errors[] = "Please enter password to your account."; } else { $post_password = password_ency($post_password); if($post_password != $account_logged->getPassword()) { $change_email_errors[] = "Wrong password to account."; } } if(empty($change_email_errors)) { $account_email_new_time = time() + $config['site']['email_days_to_change'] * 24 * 3600; $account_logged->setCustomField("email_new", $account_email_new); $account_logged->setCustomField("email_new_time", $account_email_new_time); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >New Email Address Requested</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have requested to change your email address to <b>'.$account_email_new.'</b>. The actual change will take place after <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>, during which you can cancel the request at any time.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { //show errors $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($change_email_errors as $change_email_error) { $main_content .= '<li>'.$change_email_error; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; //show form $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email'].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { $main_content .= 'Please enter your password and the new email address. Make sure that you enter a valid email address which you have access to. <b>For security reasons, the actual change will be finalised after a waiting period of '.$config['site']['email_days_to_change'].' days.</b><br/><br/><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ></tr><td class="LabelV" ><span >New Email Address:</span></td> <td style="width:90%;" ><input name="new_email" value="'.$_POST['new_email'].'" size="30" maxlength="50" ></td><tr></tr><td class="LabelV" ><span >Password:</span></td> <td><input type="password" name="password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name=changeemailsave value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { if($account_email_new_time < time()) { if($_POST['changeemailsave'] == 1) { $account_logged->setCustomField("email_new", ""); $account_logged->setCustomField("email_new_time", 0); $account_logged->setEmail($account_email_new); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have accepted <b>'.$account_logged->getEmail().'</b> as your new email adress.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Accepted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Do you accept <b>'.$account_email_new.'</b> as your new email adress?</td></tr> </table> </div> </table></div></td></tr><br /><table width="100%"><tr><td width="30"> </td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="changeemailsave" value=1 ><INPUT TYPE=image NAME="I Agree" SRC="'.$layout_name.'/images/buttons/sbutton_iagree.gif" BORDER=0 WIDTH=120 HEIGHT=17></FORM></td><td align=left><form action="?subtopic=accountmanagement&action=changeemail" method="post"><input type="hidden" name="emailchangecancel" value=1 ><input type=image name="Cancel" src="'.$layout_name.'/images/buttons/sbutton_cancel.gif" BORDER=0 WIDTH=120 HEIGHT=17></form></td><td align=right><form action="?subtopic=accountmanagement" method="post" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></td><td width="30"> </td></tr></table>'; } } else { $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change of Email Address</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>A request has been submitted to change the email address of this account to <b>'.$account_email_new.'</b>.<br/>The actual change will take place on <b>'.date("j F Y, G:i:s", $account_email_new_time).'</b>.<br>If you do not want to change your email address, please click on "Cancel".</td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%;" ><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=changeemail" method="post" ><tr><td style="border:0px;" ><input type="hidden" name="emailchangecancel" value=1 ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Cancel" alt="Cancel" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" ></div></div></td></tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } if($_POST['emailchangecancel'] == 1) { $account_logged->setCustomField("email_new", ""); $account_logged->setCustomField("email_new_time", 0); $main_content = '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Email Address Change Cancelled</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your request to change the email address of your account has been cancelled. The email address will not be changed.</td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } } //########### CHANGE PUBLIC INFORMATION (about account owner) ###################### if($action == "changeinfo") { $new_rlname = htmlspecialchars(stripslashes(trim($_POST['info_rlname']))); $new_location = htmlspecialchars(stripslashes(trim($_POST['info_location']))); if($_POST['changeinfosave'] == 1) { //save data from form $account_logged->setRLName($new_rlname); $account_logged->setLocation($new_location); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Public Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>Your public information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { //show form $account_rlname = $account_logged->getRLName(); $account_location = $account_logged->getLocation(); $main_content .= 'Here you can tell other players about yourself. This information will be displayed alongside the data of your characters. If you do not want to fill in a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changeinfo" method=post><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Change Public Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" >Real Name:</td><td style="width:90%;" ><input name="info_rlname" value="'.$account_rlname.'" size="30" maxlength="50" ></td></tr><tr><td class="LabelV" >Location:</td><td><input name="info_location" value="'.$account_location.'" size="30" maxlength="50" ></td></tr></table> </div> </table></div></td></tr><br/><table width="100%"><tr align="center"><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="changeinfosave" value="1" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //############## GENERATE RECOVERY KEY ########### if($action == "registeraccount") { $reg_password = password_ency(trim($_POST['reg_password'])); $old_key = $account_logged->getRecoveryKey("key"); if($_POST['registeraccountsave'] == "1") { if($reg_password == $account_logged->getPassword()) { if(empty($old_key)) { $dontshowtableagain = 1; $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; $max = strlen($acceptedChars)-1; $new_rec_key = NULL; // 10 = number of chars in generated key for($i=0; $i < 10; $i++) { $cnum[$i] = $acceptedChars{mt_rand(0, $max)}; $new_rec_key .= $cnum[$i]; } $account_logged->setRecoveryKey($new_rec_key); $account_logged->save(); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" >Thank you for registering your account! You can now recover your account if you have lost access to the assigned email address by using the following<br/><br/><font size="5"> <b>Recovery Key: '.$new_rec_key.'</b></font><br/><br/><br/><b>Important:</b><ul><li>Write down this recovery key carefully.</li><li>Store it at a safe place!</li>'; if($config['site']['send_emails'] && $config['site']['send_mail_when_generate_reckey']) { $mailBody = '<html> <body> <h3>New recovery key!</h3> <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>Recovery key: <b>'.$new_rec_key.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - recovery key"; $mail->Body = $mailBody; if($mail->Send()) $main_content .= '<br /><small>Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b>.</small>'; else $main_content .= '<br /><small>An error occorred while sending email with recovery key! You will not receive e-mail with this key.</small>'; } $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $reg_errors[] = 'Your account is already registred.'; } else $reg_errors[] = 'Wrong password to account.'; } if($dontshowtableagain != 1) { //show errors if not empty if(!empty($reg_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($reg_errors as $reg_error) $main_content .= '<li>'.$reg_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } //show form $main_content .= 'To generate recovery key for your account please enter your password.<br/><br/><form action="?subtopic=accountmanagement&action=registeraccount" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //############## GENERATE NEW RECOVERY KEY ########### if($action == "newreckey") { $reg_password = password_ency(trim($_POST['reg_password'])); $reckey = $account_logged->getRecoveryKey(); if((!$config['site']['generate_new_reckey'] || !$config['site']['send_emails']) || empty($reckey)) $main_content .= 'You cant get new rec key'; else { $points = $account_logged->getPremiumPoints(); if($_POST['registeraccountsave'] == "1") { if($reg_password == $account_logged->getPassword()) { if($points >= $config['site']['generate_new_reckey_price']) { $dontshowtableagain = 1; $acceptedChars = 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789'; $max = strlen($acceptedChars)-1; $new_rec_key = NULL; // 10 = number of chars in generated key for($i=0; $i < 10; $i++) { $cnum[$i] = $acceptedChars{mt_rand(0, $max)}; $new_rec_key .= $cnum[$i]; } $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Registered</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><ul>'; $mailBody = '<html> <body> <h3>New recovery key!</h3> <p>You or someone else generated recovery key to your account on server <a href="'.$config['server']['url'].'"><b>'.$config['server']['serverName'].'</b></a>.</p> <p>Recovery key: <b>'.$new_rec_key.'</b></p> </body> </html>'; require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); if ($config['site']['smtp_enabled'] == "yes") { $mail->IsSMTP(); $mail->Host = $config['site']['smtp_host']; $mail->Port = (int)$config['site']['smtp_port']; $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); $mail->Username = $config['site']['smtp_user']; $mail->Password = $config['site']['smtp_pass']; } else $mail->IsMail(); $mail->IsHTML(true); $mail->From = $config['site']['mail_address']; $mail->AddAddress($account_logged->getEMail()); $mail->Subject = $config['server']['serverName']." - new recovery key"; $mail->Body = $mailBody; if($mail->Send()) { $account_logged->setRecoveryKey(new_rec_key); $account_logged->setPremiumPoints($account_logged->getPremiumPoints()-$config['site']['generate_new_reckey_price']); $account_logged->save(); $main_content .= '<br />Your recovery key were send on email address <b>'.$account_logged->getEMail().'</b> for '.$config['site']['generate_new_reckey_price'].' premium points.'; } else $main_content .= '<br />An error occorred while sending email ( <b>'.$account_logged->getEMail().'</b> ) with recovery key! Recovery key not changed. Try again.'; $main_content .= '</ul> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $reg_errors[] = 'You need '.$config['site']['generate_new_reckey_price'].' premium points to generate new recovery key. You have <b>'.$points.'<b> premium points.'; } else $reg_errors[] = 'Wrong password to account.'; } if($dontshowtableagain != 1) { //show errors if not empty if(!empty($reg_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($reg_errors as $reg_error) $main_content .= '<li>'.$reg_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } //show form $main_content .= 'To generate NEW recovery key for your account please enter your password.<br/><font color="red"><b>New recovery key cost '.$config['site']['generate_new_reckey_price'].' Premium Points.</font> You have '.$points.' premium points. You will receive e-mail with this recovery key.</b><br/><form action="?subtopic=accountmanagement&action=newreckey" method="post" ><input type="hidden" name="registeraccountsave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Generate recovery key</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="reg_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } } //###### CHANGE CHARACTER COMMENT ###### if($action == "changecomment") { $player_name = stripslashes($_REQUEST['name']); $new_comment = htmlspecialchars(stripslashes(substr(trim($_POST['comment']),0,2000))); $new_hideacc = (int) $_POST['accountvisible']; if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if($_POST['changecommentsave'] == 1) { $player->setCustomField("hide_char", $new_hideacc); $player->setCustomField("comment", $new_comment); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Information Changed</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character information has been changed.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { $main_content .= 'Here you can see and edit the information about your character.<br/>If you do not want to specify a certain field, just leave it blank.<br/><br/><form action="?subtopic=accountmanagement&action=changecomment" method="post" ><div class="TableContainer" > <table class="Table5" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Edit Character Information</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" >Name:</td><td style="width:80%;" >'.$player_name.'</td></tr><tr><td class="LabelV" >Hide Account:</td><td>'; if($player->getHideChar() == 1) { $main_content .= '<input type="checkbox" name="accountvisible" value="1" checked="checked">'; } else { $main_content .= '<input type="checkbox" name="accountvisible" value="1" >'; } $main_content .= ' check to hide your account information</td></tr> </table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" > <table class="TableContent" width="100%" ><tr><td class="LabelV" ><span >Comment:</span></td><td style="width:80%;" ><textarea name="comment" rows="10" cols="50" wrap="virtual" >'.$player->getComment().'</textarea><br>[max. length: 2000 chars, 50 lines]</td></tr> </table> </div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><input type="hidden" name="name" value="'.$player->getName().'"><input type="hidden" name="changecommentsave" value="1"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } else { $main_content .= "Error. Character <b>".$player_name."</b> is not on your account."; } } else { $main_content .= "Error. Character with this name doesn't exist."; } } else { $main_content .= "Error. Name contain illegal characters."; } } //### NEW NICK - set new nick proposition ### if($action == "newnick") { $name = $_GET['name']; $name_new = stripslashes(ucwords(strtolower(trim($_GET['name_new'])))); if(!empty($name) && !empty($name_new)) { if(check_name_new_char($name_new)) { $player = $ots->createObject('Player'); $player->find($name); if($player->isLoaded() && $player->isNameLocked()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if(!$player->getOldName()) if(!$player->isOnline()) { $player->setCustomField('old_name', $name_new); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >New nick proposition</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$name.'</b> new nick proposition <b>'.$name_new.'</b> has been set. Now you must wait for acceptation from GM.</td></tr> </table> </div> </table></div></td></tr>'; } else $main_content .= 'This character is online.'; else $main_content .= 'You already set new name for this character ( <b>'.$player->getOldName().'</b> ). You must wait until GM accept/reject your proposition.'; } else $main_content .= 'Character <b>'.$player_name.'</b> is not on your account.'; } else $main_content .= 'Character with this name doesn\'t exist or isn\'t name locked.'; } else $main_content .= 'Name contain illegal characters. Invalid format or lenght.'; } else $main_content .= 'Please enter new char name.'; $main_content .= '<br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } //### DELETE character from account ### if($action == "deletecharacter") { $player_name = stripslashes(trim($_POST['delete_name'])); $password_verify = trim($_POST['delete_password']); $password_verify = password_ency($password_verify); if($_POST['deletecharactersave'] == 1) { if(!empty($player_name) && !empty($password_verify)) { if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if($password_verify == $account_logged->getPassword()) { if(!$player->isOnline()) { //dont show table "delete character" again $dontshowtableagain = 1; //delete player $player->setCustomField('deleted', 1); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Deleted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$player_name.'</b> has been deleted.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $delete_errors[] = 'This character is online.'; } else { $delete_errors[] = 'Wrong password to account.'; } } else { $delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.'; } } else { $delete_errors[] = 'Character with this name doesn\'t exist.'; } } else { $delete_errors[] = 'Name contain illegal characters.'; } } else { $delete_errors[] = 'Character name or/and password is empty. Please fill in form.'; } } if($dontshowtableagain != 1) { if(!empty($delete_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($delete_errors as $delete_error) { $main_content .= '<li>'.$delete_error; } $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; } $main_content .= 'To delete a character enter the name of the character and your password.<br/><br/><form action="?subtopic=accountmanagement&action=deletecharacter" method="post" ><input type="hidden" name="deletecharactersave" value="1"><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Delete Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Character Name:</td><td style="width:90%;" ><input name="delete_name" value="" size="30" maxlength="29" ></td></tr><tr><td class="LabelV" ><span >Password:</td><td><input type="password" name="delete_password" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table style="width:100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } //### UNDELETE character from account ### if($action == "undelete") { $player_name = stripslashes(trim($_GET['name'])); if(!empty($player_name)) { if(check_name($player_name)) { $player = $ots->createObject('Player'); $player->find($player_name); if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { if(!$player->isOnline()) { $player->setCustomField('deleted', 0); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Undeleted</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$player_name.'</b> has been undeleted.</td></tr> </table> </div> </table></div></td></tr><br><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else $delete_errors[] = 'This character is online.'; } else $delete_errors[] = 'Character <b>'.$player_name.'</b> is not on your account.'; } else $delete_errors[] = 'Character with this name doesn\'t exist.'; } else $delete_errors[] = 'Name contain illegal characters.'; } } //## Character World Transfer by Norix### if($config['site']['worldtransfer'] == 1) { if($action == "charactertransfer") { if(empty($_REQUEST['page'])) { $color1 = 'blue'; $color2 = 'green-blue'; $color3 = 'blue'; $color4 = 'blue'; $color5 = 'blue'; } if($_REQUEST['page'] == 'confirm') { $color1 = 'blue'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green-blue'; $color5 = 'blue'; } if($_REQUEST['page'] == 'transfer') { $color1 = 'green'; $color2 = 'green'; $color3 = 'green'; $color4 = 'green'; $color5 = 'green'; } $main_content .= '<div id="ProgressBar" > <center><h2>Character World Transfer</h2></center><div id="MainContainer" ><div id="BackgroundContainer" ><img id="BackgroundContainerLeftEnd" src="images/worldtrade/stonebar-left-end.gif" /><div id="BackgroundContainerCenter"> <div id="BackgroundContainerCenterImage" style="background-image:url(images/worldtrade/stonebar-center.gif);" /></div></div><img id="BackgroundContainerRightEnd" src="images/worldtrade/stonebar-right-end.gif" /></div> <img id="TubeLeftEnd" src="images/worldtrade/progress-bar-tube-left-green.gif" /><img id="TubeRightEnd" src="images/worldtrade/progress-bar-tube-right-'.$color1.'.gif" /><div id="FirstStep" class="Steps" ><div class="SingleStepContainer" > <img class="StepIcon" src="images/worldtrade/progress-bar-icon-0-green.gif" /><div class="StepText" style="font-weight:bold;" >Select World</div></div></div><div id="StepsContainer1" ><div id="StepsContainer2" ><div class="Steps" style="width:50%" > <div class="TubeContainer" ><img class="Tube" src="images/worldtrade/progress-bar-tube-'.$color2.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="images/worldtrade/progress-bar-icon-3-'.$color3.'.gif" /><div class="StepText" style="font-weight:normal;" >Confirm Data</div> </div></div><div class="Steps" style="width:50%" ><div class="TubeContainer" ><img class="Tube" src="images/worldtrade/progress-bar-tube-'.$color4.'.gif" /></div><div class="SingleStepContainer" ><img class="StepIcon" src="images/worldtrade/progress-bar-icon-4-'.$color5.'.gif" /> <div class="StepText" style="font-weight:normal;" >Transfer Result</div></div></div></div></div></div></div>'; $user_premium_points = $account_logged->getCustomField('premium_points'); $playerid = stripslashes(trim($_REQUEST['player_id'])); $world_id = stripslashes(trim($_REQUEST['new_world'])); if(empty($_REQUEST['page'])) { $player = $ots->createObject('Player'); $player->load($playerid); $time = time(); $maxtranstime = ($config['site']['transfermonths']*30*24*60*60); if(!empty($playerid)) { $worldid = (int) $_REQUEST['newworld_'.$player->getId().'']; $house = $SQL->query('SELECT * FROM houses WHERE owner = '.$player->GetId().';')->fetch(); $transfertime = ($time-$player->getCustomField('worldtransfer')); if($maxtranstime > $transfertime AND $player->getCustomField('worldtransfer') > 0) $time_img = no; else $time_img = yes; if($house) $house_img = no; else $house_img = yes; if($player->getVocation() < 1) $voc_img = no; else $voc_img = yes; if($player->getMarriage() > 1) $mar_img = no; else $mar_img = yes; if($user_premium_points < $config['site']['worldtransferprice']) $points_img = no; else $points_img = yes; $main_content .= 'In order to transfer your character to another game world, you have to fulfil the following requirements:<br/><ul> <li style="list-style-image:url(images/worldtrade/'.$mar_img.'.gif)" >You must divorce your spouse first.</li> <li style="list-style-image:url(images/worldtrade/'.$house_img.'.gif)" >Character owns no house.</li> <li style="list-style-image:url(images/worldtrade/'.$voc_img.'.gif)" >Character has a vocation.</li> <li style="list-style-image:url(images/worldtrade/'.$time_img.'.gif)" >Have not done Character World Transfer the last '.$config['site']['transfermonths'].' months.</li> <li style="list-style-image:url(images/worldtrade/'.$points_img.'.gif)" >Have atleast '.$config['site']['worldtransferprice'].' premium points on your account.</li></ul>'; } $main_content .= '<form action="" method="post"><input type="hidden" name="player_id" value="'.$playerid.'"/><div class="TableContainer" ><table class="Table3" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Character Data</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" style="background-color:#D4C0A1;" ><td></td><td>Name</td><td>Current World</td><td>Possible Target World</td><td>Requirement Status</td></tr>'; $account_players = $account_logged->getPlayersList(); $account_players->orderBy('name'); foreach($account_players as $account_player) { if($account_player->getId() == $playerid) { $border = 'border-style: solid; border-color: #D4C0A1; border-width: 2px;'; $checked = ' checked=checked'; } else { $border = ''; $checked = ''; } $main_content .= '<tr style="background-color:#F1E0C6;'.$border.'" ><td><input type="radio" name="player_id" value="'.$account_player->getId().'" '.$checked.' onClick="this.form.submit()"/></td><td>'.$account_player->getName().'</td><td>'.$config['site']['worlds'][$account_player->getWorld()].'</td><td><select name="newworld_'.$account_player->getId().'"><option value="" >(select your target game world)</option>'; foreach($config['site']['worlds'] as $id => $world_n) { if($account_player->getWorld() != $id) { $main_content .= '<option value="'.$id.'" onClick="this.form.submit()"'; if($id == $worldid AND $playerid == $account_player->getId()) $main_content .= ' selected="selected"'; $main_content .= '>'.$world_n.'</option>'; } } $main_content .= '</select>'; $house = $SQL->query('SELECT * FROM houses WHERE owner = '.$account_player->GetId().';')->fetch(); $transfertime = ($time-$account_player->getCustomField('worldtransfer')); if(!$house AND $account_player->getVocation() >= 1 AND $account_player->getMarriage() <= 0 AND $user_premium_points >= $config['site']['worldtransferprice'] AND $transfertime >= $maxtranstime) $status = '<span class="green" >allowed</span>'; else $status = '<span class="red" >not allowed</span>'; $main_content .= '</td><td><b>'.$status.'</b></td></tr>'; } $main_content .= '</form><form action="?subtopic=accountmanagement&action=charactertransfer&page=confirm" method="post" ><input type="hidden" name="new_world" value="'.$worldid.'"/><input type="hidden" name="player_id" value="'.$playerid.'"/></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td width=50%>'; if(!empty($playerid)) $transfertime = ($time-$player->getCustomField('worldtransfer')); if(!empty($playerid)) if(!$house AND $player->getVocation() >= 1 AND $player->getMarriage() <= 0 AND $user_premium_points >= $config['site']['worldtransferprice'] AND $transfertime >= $maxtranstime) $main_content .= '<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div>'; $main_content .= '</form></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } if ($_REQUEST['page'] == 'confirm') { $player = $ots->createObject('Player'); $player->load($playerid); $main_content .= '<form action="?subtopic=accountmanagement&action=charactertransfer&page=transfer" method="post" ><div class="TableContainer" ><table class="Table4" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Data</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td colspan="2" >Do you really want to transfer your character <b>'.$player->getName().'</b>:<br/></td></tr><tr><td class="LabelV" width="150" >Current World:</td> <td>'.$config['site']['worlds'][$player->getWorld()].'</td></tr><tr><td class="LabelV" >Target World:</td><td>'.$config['site']['worlds'][$world_id].'</td></tr></table></div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td><b><span class="red" >Attention:</span></b><br/>If your character is successfully transferred to another game world, you cannot transfer it again within the next '.$config['site']['transfermonths'].' months !</td></tr></table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" > <div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" > <input type="hidden" name="player_id" value="'.$playerid.'" ><input type="hidden" name="new_world" value="'.$world_id.'" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div> <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td></tr></form></table><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement&action=charactertransfer" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" > <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></td></tr></table><div></div>'; } if ($_REQUEST['page'] == 'transfer') { $SQL->query('UPDATE `players` SET `world_id` = '.$world_id.', `worldtransfer` = '.$SQL->quote(time()).' WHERE `id` = '.$playerid.';'); $account_logged->setPremiumPoints($user_premium_points-$config['site']['worldtransferprice']); $account_logged->save(); $main_content .= '<form action="?subtopic=accountmanagement&action=charactertransfer" method="post" ><div class="TableContainer" ><table class="Table4" cellpadding="0" cellspacing="0" ><div class="CaptionContainer" ><div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Data</div><span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div></div><tr><td><div class="InnerTableContainer" ><table style="width:100%;" ><tr><td><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td colspan="2" > <center><b>Character World Transfer successfully done.</b></td></tr></table></div></div><div class="TableShadowContainer" > <div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div> <div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div></div></div></td></tr><tr><td><div class="TableShadowContainerRightTop" ><div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div> <div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" ><div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr><td><b><span class="red" >Attention:</span></b><br/>If your character is successfully transferred to another game world, you cannot transfer it again within the next '.$config['site']['transfermonths'].' months!</td></tr> </table></div></div><div class="TableShadowContainer" ><div class="TableBottomShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bm.gif);" ><div class="TableBottomLeftShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-bl.gif);" ></div><div class="TableBottomRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-br.gif);" ></div> </div></div></td></tr></td></tr></table></div></table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" > <div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table><div></div>'; } } } else { $main_content .= '<br><center><b>Sorry, the World Transfer System is currently disabled by the admin. Please ask him for more information.</b></center>'; } //## CREATE CHARACTER on account ### if($action == "createcharacter") { if(count($config['site']['worlds']) > 1) { if(isset($_REQUEST['world'])) $world_id = (int) $_REQUEST['world']; } else $world_id = 0; if(!isset($world_id)) { $main_content .= 'Before you can create character you must select world: '; foreach($config['site']['worlds'] as $id => $world_n) $main_content .= '<br /><a href="?subtopic=accountmanagement&action=createcharacter&world='.$id.'">- '.$world_n.'</a>'; $main_content .= '<br /><h3><a href="?subtopic=accountmanagement">BACK</a></h3>'; } else { $main_content .= '<script type="text/javascript"> var nameHttp; function checkName() { if(document.getElementById("newcharname").value=="") { document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\'; return; } nameHttp=GetXmlHttpObject(); if (nameHttp==null) { return; } var newcharname = document.getElementById("newcharname").value; var url="ajax/check_name.php?name=" + newcharname + "&uid="+Math.random(); nameHttp.onreadystatechange=NameStateChanged; nameHttp.open("GET",url,true); nameHttp.send(null); } function NameStateChanged() { if (nameHttp.readyState==4) { document.getElementById("name_check").innerHTML=nameHttp.responseText; } } </script>'; $newchar_name = stripslashes(ucwords(strtolower(trim($_POST['newcharname'])))); $newchar_sex = $_POST['newcharsex']; $newchar_vocation = $_POST['newcharvocation']; $newchar_town = $_POST['newchartown']; if($_POST['savecharacter'] != 1) { $main_content .= 'Please choose a name'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= ', vocation'; $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.'; if($account_logged->getPlayersList()->count() >= $config['site']['max_players_per_account']) $main_content .= '<b><font color="red"> You have maximum number of characters per account on your account. Delete one before you make new.</font></b>'; $main_content .= '<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>'; $main_content .= '<input type="radio" name="newcharsex" value="1" '; if($newchar_sex == 1) $main_content .= 'checked="checked" '; $main_content .= '>male<br/>'; $main_content .= '<input type="radio" name="newcharsex" value="0" '; if($newchar_sex == "0") $main_content .= 'checked="checked" '; $main_content .= '>female<br/></td></tr></table></div></div></table></div>'; if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) { $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" '; if($newchar_vocation == $char_vocation_key) $main_content .= 'checked="checked" '; $main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_towns'][$world_id] as $town_id) { $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" '; if($newchar_town == $town_id) $main_content .= 'checked="checked" '; $main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '</tr></table></div>'; $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } else { if(empty($newchar_name)) $newchar_errors[] = 'Please enter a name for your character!'; if(empty($newchar_sex) && $newchar_sex != "0") $newchar_errors[] = 'Please select the sex for your character!'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { if(empty($newchar_vocation)) $newchar_errors[] = 'Please select a vocation for your character.'; } else $newchar_vocation = $config['site']['newchar_vocations'][$world_id][0]; if(count($config['site']['newchar_towns'][$world_id]) > 1) { if(empty($newchar_town)) $newchar_errors[] = 'Please select a town for your character.'; } else $newchar_town = $config['site']['newchar_towns'][$world_id][0]; if(empty($newchar_errors)) { if(!check_name_new_char($newchar_name)) $newchar_errors[] = 'This name contains invalid letters, words or format. Please use only a-Z, - , \' and space.'; if($newchar_sex != 1 && $newchar_sex != "0") $newchar_errors[] = 'Sex must be equal <b>0 (female)</b> or <b>1 (male)</b>.'; if(!in_array($newchar_town, $config['site']['newchar_towns'][$world_id])) $newchar_errors[] = 'Please select valid town.'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $newchar_vocation_check = FALSE; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) if($newchar_vocation == $char_vocation_key) $newchar_vocation_check = TRUE; if(!$newchar_vocation_check) $newchar_errors[] = 'Unknown vocation. Please fill in form again.'; } else $newchar_vocation = 0; } if(empty($newchar_errors)) { $check_name_in_database = $ots->createObject('Player'); $check_name_in_database->find($newchar_name); if($check_name_in_database->isLoaded()) $newchar_errors[] .= 'This name is already used. Please choose another name!'; $number_of_players_on_account = $account_logged->getPlayersList()->count(); if($number_of_players_on_account >= $config['site']['max_players_per_account']) $newchar_errors[] .= 'You have too many characters on your account <b>('.$number_of_players_on_account.'/'.$config['site']['max_players_per_account'].')</b>!'; } if(empty($newchar_errors)) { $char_to_copy_name = $config['site']['newchar_vocations'][$world_id][$newchar_vocation]; $char_to_copy = new OTS_Player(); $char_to_copy->find($char_to_copy_name); if(!$char_to_copy->isLoaded()) $newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.'; } if(empty($newchar_errors)) { if($newchar_sex == "0") $char_to_copy->setLookType(136); $player = $ots->createObject('Player'); $player->setName($newchar_name); $player->setAccount($account_logged); $player->setGroup($char_to_copy->getGroup()); $player->setSex($newchar_sex); $player->setVocation($char_to_copy->getVocation()); $player->setConditions($char_to_copy->getConditions()); $player->setRank($char_to_copy->getRank()); $player->setLookAddons($char_to_copy->getLookAddons()); $player->setTownId($newchar_town); $player->setExperience($char_to_copy->getExperience()); $player->setLevel($char_to_copy->getLevel()); $player->setMagLevel($char_to_copy->getMagLevel()); $player->setHealth($char_to_copy->getHealth()); $player->setHealthMax($char_to_copy->getHealthMax()); $player->setMana($char_to_copy->getMana()); $player->setManaMax($char_to_copy->getManaMax()); $player->setManaSpent($char_to_copy->getManaSpent()); $player->setSoul($char_to_copy->getSoul()); $player->setDirection($char_to_copy->getDirection()); $player->setLookBody($char_to_copy->getLookBody()); $player->setLookFeet($char_to_copy->getLookFeet()); $player->setLookHead($char_to_copy->getLookHead()); $player->setLookLegs($char_to_copy->getLookLegs()); $player->setLookType($char_to_copy->getLookType()); $player->setCap($char_to_copy->getCap()); $player->setPosX(0); $player->setPosY(0); $player->setPosZ(0); $player->setLossExperience($char_to_copy->getLossExperience()); $player->setLossMana($char_to_copy->getLossMana()); $player->setLossSkills($char_to_copy->getLossSkills()); $player->setLossItems($char_to_copy->getLossItems()); $player->save(); unset($player); $player = $ots->createObject('Player'); $player->find($newchar_name); if($player->isLoaded()) { $player->setCustomField('world_id', (int) $world_id); $player->setSkill(0,$char_to_copy->getSkill(0)); $player->setSkill(1,$char_to_copy->getSkill(1)); $player->setSkill(2,$char_to_copy->getSkill(2)); $player->setSkill(3,$char_to_copy->getSkill(3)); $player->setSkill(4,$char_to_copy->getSkill(4)); $player->setSkill(5,$char_to_copy->getSkill(5)); $player->setSkill(6,$char_to_copy->getSkill(6)); $player->save(); $loaded_items_to_copy = $SQL->query("SELECT * FROM player_items WHERE player_id = ".$char_to_copy->getId().""); foreach($loaded_items_to_copy as $save_item) $SQL->query("INSERT INTO `player_items` (`player_id` ,`pid` ,`sid` ,`itemtype`, `count`, `attributes`) VALUES ('".$player->getId()."', '".$save_item['pid']."', '".$save_item['sid']."', '".$save_item['itemtype']."', '".$save_item['count']."', '".$save_item['attributes']."');"); $main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Character Created</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>The character <b>'.$newchar_name.'</b> has been created.<br/>Please select the outfit when you log in for the first time.<br/><br/><b>See you on '.$config['server']['serverName'].'!</b></td></tr> </table> </div> </table></div></td></tr><br/><center><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></center>'; } else { echo "Error. Can\'t create character. Probably problem with database. Try again or contact with admin."; exit; } } else { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($newchar_errors as $newchar_error) $main_content .= '<li>'.$newchar_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; $main_content .= 'Please choose a name'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= ', vocation'; $main_content .= ' and sex for your character. <br/>In any case the name must not violate the naming conventions stated in the <a href="?subtopic=tibiarules" target="_blank" >'.$config['server']['serverName'].' Rules</a>, or your character might get deleted or name locked.<br/><br/><form action="?subtopic=accountmanagement&action=createcharacter" method="post" ><input type="hidden" name="world" value="'.$world_id.'" ><input type="hidden" name=savecharacter value="1" ><div class="TableContainer" > <table class="Table3" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" ><span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><div class="Text" >Create Character</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span><span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span><span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span><span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span></div> </div><tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td><div class="TableShadowContainerRightTop" > <div class="TableShadowRightTop" style="background-image:url('.$layout_name.'/images/content/table-shadow-rt.gif);" ></div></div><div class="TableContentAndRightShadow" style="background-image:url('.$layout_name.'/images/content/table-shadow-rm.gif);" > <div class="TableContentContainer" ><table class="TableContent" width="100%" ><tr class="LabelH" ><td style="width:50%;" ><span >Name</td><td><span >Sex</td></tr><tr class="Odd" ><td><input id="newcharname" name="newcharname" onkeyup="checkName();" value="'.$newchar_name.'" size="30" maxlength="29" ><BR><font size="1" face="verdana,arial,helvetica"><div id="name_check">Please enter your character name.</div></font></td><td>'; $main_content .= '<input type="radio" name="newcharsex" value="1" '; if($newchar_sex == 1) $main_content .= 'checked="checked" '; $main_content .= '>male<br/>'; $main_content .= '<input type="radio" name="newcharsex" value="0" '; if($newchar_sex == "0") $main_content .= 'checked="checked" '; $main_content .= '>female<br/></td></tr></table></div></div></table></div>'; if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '<div class="InnerTableContainer" > <table style="width:100%;" ><tr>'; if(count($config['site']['newchar_vocations'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your vocation:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_vocations'][$world_id] as $char_vocation_key => $sample_char) { $main_content .= '<tr><td><input type="radio" name="newcharvocation" value="'.$char_vocation_key.'" '; if($newchar_vocation == $char_vocation_key) $main_content .= 'checked="checked" '; $main_content .= '>'.$vocation_name[$world_id][0][$char_vocation_key].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1) { $main_content .= '<td><table class="TableContent" width="100%" ><tr class="Odd" valign="top"><td width="160"><br /><b>Select your city:</b></td><td><table class="TableContent" width="100%" >'; foreach($config['site']['newchar_towns'][$world_id] as $town_id) { $main_content .= '<tr><td><input type="radio" name="newchartown" value="'.$town_id.'" '; if($newchar_town == $town_id) $main_content .= 'checked="checked" '; $main_content .= '>'.$towns_list[$world_id][$town_id].'</td></tr>'; } $main_content .= '</table></table></td>'; } if(count($config['site']['newchar_towns'][$world_id]) > 1 || count($config['site']['newchar_vocations'][$world_id]) > 1) $main_content .= '</tr></table></div>'; $main_content .= '</table></div></td></tr><br/><table style="width:100%;" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table>'; } } } } } ?> Alguem pode me ajudar POR FAVOR ? :X
  7. GicoO

    Pet System

    Opa ! Good Job Man *-* Vlw ai cara Rep + pra ti s2 Duvida sanada podem fechar ai
  8. cara só clicar em "Show" e vai aparecer o link de boa pra tu clicar e baixar Se nao conseguir me add no msn que eu te mando o arquivo giovani_sobral_1996@hotmail.com
  9. Boa garoto Muito bom kra Rep + pra vc +_+ :button_ok:
  10. GicoO

    Pet System

    esse ai nem funfa :S
  11. GicoO

    Pet System

    Queria um pet system pra otserv 8.6 TFS 0.4 dev Alguem teria um ai pra me arrumar? Obrigado desde já =) Dou Rep+ Alguem ai :X
  12. GicoO

    Npc

    Gente estou querendo fazer um rookgaard 100% e estava precisando dos npcs da ilha de tutorial :X Alguem poderia me ajudar? Npc's: Santiago Zirella Carlos Rep +++ pra quem me ajuda Alguem ajuda ai pls :S
  13. GicoO

    [Mod] Erro Aqui

    Gente eu tenho um MOD aqui de war e talz que eu peguei aqui no Xtibia... Mas ele ta dando um erro estranho que nao sei resolver (Poruqe nao sei nada de script) :X Erro: [28/07/2011 11:55:39] > Loading Event.xml...[Error - ScriptingManager::loadFromXml] Cannot load mod mods/Event.xml [28/07/2011 11:55:39] Line: 1, Info: Start tag expected, '<' not found Mod: <? xml version = "1.0" encoding = "ISO-8859-1" > <mod name="Team Event" version="1.0" author="Damadgerz" contact="support@lualand.net" enabled="yes"> <description> This is a full auto Team BattleEvent(missing part for site) : 1- Player will get the ability to talk to the npc event starter to start the event every x times(time between each event) 2- players will go to npc and say battle and then join their desired team(you adjust team names) , they also have ability to leave team 3- You have ability to set max players per each team, npc will not tp the players to arena except when both teams are full 4- Script automatically set the place of event to a pvp arena (players no lose items,levels,geet msg who killed them).Place cant be a non-pvp area. 5- if player logged out they will automatically be lifted out from event. 6- players in same team cant attack each others even with spells 7- each team will have a uniform 8-you choose where the first team be tped and where the second team be tped 9-when event start, you set a max time for event.So if ppl couldnt kill each other( if players in first team = players in second team when event times finish) They will automatically be sent to temple and no one will take reward and broadcast 10 -during event if max time didnt finish and player of team 1 killed all of those of team2 then players of team1 will be tped to temple broadcasting they won by killing all other members and will recieve a random reward taht you set 11 -Then the event will be on hold untill time between each event pass(you set that) , and when it pass a auto broadcast is made every minute to tell player that event is open. </description> <config name="tutorial_m"><![CDATA[ running1 = 12000 --just add a non ussed storage running2 = 12001 --just add a non ussed storage joined = 10000 --just add a non ussed storage sto = 12223 --just add a non ussed storage check = 5454 -- empty storage redpotision = {x=32055, y=31932, z=7} --place where the red team player be teleported to blueposition = {x=32029, y=31932, z=7} --place where the blue team player be teleported to stoptime = 2 --in minutes team1name = "Black" --just put the name without <team> team2name = "White" timebetween = 5 -- time between each event arena = { frompos = {x=32358,y=31768,z=7}, topos = {x=32043,y=31933,z=7} } ----Put you event area here conf = { rewards_id = {7410}, -- Rewards ID maxplayers = 5 ---maxplayers per team } ]]></config> <lib name="football-lib"><![CDATA[ function getBlue() return getGlobalStorageValue(9888) end function removeBlue() return setGlobalStorageValue(9888, getGlobalStorageValue(9888) - 1) end function addBlue() return setGlobalStorageValue(9888, getGlobalStorageValue(9888) + 1) end function resetBlue() return setGlobalStorageValue(9888,0) end function getRed() return getGlobalStorageValue(9887) end function removeRed() return setGlobalStorageValue(9887, getGlobalStorageValue(9887) - 1) end function addRed() return setGlobalStorageValue(9887, getGlobalStorageValue(9887) + 1) end function resetRed() return setGlobalStorageValue(9887,0) end function onStop() if getGlobalStorageValue(running1) == 1 then setGlobalStorageValue(running1, -1) setGlobalStorageValue(sto,1) end return true end function onStopp() if getGlobalStorageValue(running2) > 0 then setGlobalStorageValue(running2,-1) doBroadcastMessage("Event : event is started again , go talk to the Evnet's Npc.") end end ]]></lib> <event type="login" name="Tutorial Login" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onLogin(cid) if getPlayerStorageValue(cid,check) > 0 then if isInRange(getCreaturePosition(cid), arena.frompos, arena.topos) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) setPlayerStorageValue(cid,check,-1) else setPlayerStorageValue(cid,check,-1) end end registerCreatureEvent(cid, "Log") registerCreatureEvent(cid, "Arena") registerCreatureEvent(cid, "Attk") return true end ]]></event> <event type="combat" name="Attk" event="script"><![CDATA[ domodlib('tutorial_m') domodlib('football-lib') function onCombat(cid, target) if getPlayerStorageValue(cid, joined) == 1 and getPlayerStorageValue(target, joined) == 1 then return false end if getPlayerStorageValue(cid, joined) == 2 and getPlayerStorageValue(target, joined) == 2 then return false end return true end ]]></event> <event type="logout" name="Log" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onLogout(cid) if getPlayerStorageValue(cid,joined) == 1 then doBroadcastMessage(""..getPlayerName(cid).." have left the War-Event") setPlayerStorageValue(cid,joined,-1) setPlayerStorageValue(cid,check,1) removeBlue() return true end if getPlayerStorageValue(cid,joined) == 2 then doBroadcastMessage(""..getPlayerName(cid).." have left the War-Event") setPlayerStorageValue(cid,check,1) removeRed() return true end return true end ]]></event> <event type="statschange" name="Arena" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') local corpse_ids = { [0] = 3065, -- female [1] = 3058 -- male } function onStatsChange(cid, attacker, type, combat, value) if combat == COMBAT_HEALING then return true end if getCreatureHealth(cid) > value then return true end if isInRange(getCreaturePosition(cid), arena.frompos, arena.topos) then doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize "..getCreatureName(cid)..". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".\n[War-Event kill]") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doRemoveConditions(cid, FALSE) doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You got killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item").." in the war event.") if isPlayer(attacker) then doPlayerSendTextMessage(attacker, MESSAGE_STATUS_CONSOLE_BLUE, "You killed "..getCreatureName(cid).." in the war event.") end if getPlayerStorageValue(cid,joined) == 1 then removeBlue() setPlayerStorageValue(cid,10000,-1) elseif getPlayerStorageValue(cid,joined) == 2 then removeRed() setPlayerStorageValue(cid,10000,-1) end end return true end ]]></event> <globalevent name="reset" type="start" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onStartup() resetBlue() resetRed() setGlobalStorageValue(running1,-1) setGlobalStorageValue(running2,-1) setGlobalStorageValue(sto,-1) return true end ]]></globalevent> <globalevent name="TeamBattle" interval="7" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') local bmale = createConditionObject(CONDITION_OUTFIT) setConditionParam(bmale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(bmale, {lookType = math.random(128,134), lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}) local bfemale = createConditionObject(CONDITION_OUTFIT) setConditionParam(bfemale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(bfemale, {lookType = math.random(136,142), lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}) local rmale = createConditionObject(CONDITION_OUTFIT) setConditionParam(rmale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(rmale, {lookType = math.random(128,134), lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local rfemale = createConditionObject(CONDITION_OUTFIT) setConditionParam(rfemale, CONDITION_PARAM_TICKS, -1) addOutfitCondition(rfemale, {lookType = math.random(136,142),lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) function onThink(interval, lastExecution) local random_item = conf.rewards_id[math.random(1, #conf.rewards_id)] if (getBlue() == conf.maxplayers and getRed() == conf.maxplayers) then if (getGlobalStorageValue(running1) == -1 and getGlobalStorageValue(sto) == -1) then setGlobalStorageValue(running1,1) doBroadcastMessage("The Team Battle Event have started.And will end in "..stoptime.." minutes, unless one of the teams has killed all the oponents") addEvent(onStop, stoptime * 60 * 1000) for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid, joined) == 1 then if getPlayerSex(cid) == 1 then doAddCondition(cid, bmale) elseif getPlayerSex(cid) ~= 1 then doAddCondition(cid, bfemale) end doTeleportThing(cid, blueposition, FALSE) doSendMagicEffect(blueposition, 10) elseif getPlayerStorageValue(cid, joined) == 2 then if getPlayerSex(cid) == 1 then doAddCondition(cid, rmale) elseif getPlayerSex(cid) ~= 1 then doAddCondition(cid, rfemale) end doTeleportThing(cid, redpotision, FALSE) doSendMagicEffect(redpotision, 10) end end end end if getGlobalStorageValue(running1) == 1 then setGlobalStorageValue(running2,1) if (getBlue() >= 1 and getRed() < 1) then addEvent(onStopp, timebetween * 60 * 1000) doBroadcastMessage("The War-Event has finished as the " ..team1name.. " team has killed all players in oponnent team ,they will recieve their rewards.Event will be reopened in ".. timebetween .." minutes") elseif (getBlue() < 1 and getRed() >= 1) then doBroadcastMessage("The War-Event has finished as the " ..team2name.. " team has killed all players in oponnent team,they will recieve their rewards.Event will be reopened in ".. timebetween .." minutes") addEvent(onStopp, timebetween * 60 * 1000) end for _, cid in ipairs(getPlayersOnline()) do if (getBlue() >= 1 and getRed() < 1) then if getPlayerStorageValue(cid,joined) == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doRemoveConditions(cid, FALSE) doPlayerAddItem(cid, random_item, 1) doRemoveConditions(cid, FALSE) doCreatureSay(cid, "You have won a "..getItemNameById(random_item).." as a reward from war event", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, joined,-1) setGlobalStorageValue(running1,-1) resetBlue() end end if (getBlue() < 1 and getRed() >= 1) then if getPlayerStorageValue(cid,joined) == 2 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doRemoveConditions(cid, FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doRemoveConditions(cid, FALSE) doPlayerAddItem(cid, random_item, 1) doCreatureSay(cid, "You have won a "..getItemNameById(random_item).." as a reward from war event", TALKTYPE_ORANGE_1) setGlobalStorageValue(running1,-1) setPlayerStorageValue(cid, joined,-1) resetRed() end end end end return true end ]]></globalevent> <globalevent name="Team" interval="3" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onThink(interval, lastExecution) local random_item = conf.rewards_id[math.random(1, #conf.rewards_id)] if getGlobalStorageValue(sto) == 1 then if (getRed() > getBlue()) then doBroadcastMessage("The War-Event has finished as the " ..team2name.. " team has killed all players in oponnent team,they will recieve their rewards.Event will be reopened in ".. timebetween .." minutes") for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid,joined) == 2 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doRemoveConditions(cid, FALSE) doPlayerAddItem(cid, random_item, 1) doRemoveConditions(cid, FALSE) doCreatureSay(cid, "You have won a "..getItemNameById(random_item).." as a reward from war event", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, joined,-1) end if getPlayerStorageValue(cid,joined) == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doPlayerSendTextMessage(cid,24, "Your team has lost in the war event war event") setPlayerStorageValue(cid, joined,-1) doRemoveConditions(cid, FALSE) end end addEvent(onStopp, timebetween * 60 * 1000) end if (getRed() < getBlue()) then doBroadcastMessage("The War-Event has finished as the " ..team1name.. " team has killed all players in oponnent team,they will recieve their rewards.Event will be reopened in ".. timebetween .." minutes") for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid,joined) == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doPlayerAddItem(cid, random_item, 1) doRemoveConditions(cid, FALSE) doRemoveConditions(cid, FALSE) doCreatureSay(cid, "You have won a "..getItemNameById(random_item).." as a reward from war event", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, joined,-1) end if getPlayerStorageValue(cid,joined) == 2 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doRemoveConditions(cid, FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doPlayerSendTextMessage(cid,24, "Your team has lost in the war event war event") setPlayerStorageValue(cid, joined,-1) end end addEvent(onStopp, timebetween * 60 * 1000) end if (getRed() == getBlue()) then for _, cid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(cid,joined) == 2 or getPlayerStorageValue(cid,joined) == 1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doRemoveConditions(cid, FALSE) doSendMagicEffect(getCreaturePosition(cid), 10) doRemoveConditions(cid, FALSE) setPlayerStorageValue(cid, joined,-1) doBroadcastMessage("Event max time ended.And niether of the teams won the event.Event will be reopened in ".. timebetween .." minutes") end end addEvent(onStopp, timebetween * 60 * 1000) end resetBlue() resetRed() setGlobalStorageValue(sto, -1) end return true end ]]></globalevent> <globalevent name="Broad" interval="90" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onThink(interval, lastExecution) if getGlobalStorageValue(running2) == -1 then doBroadcastMessage("O evento de batalha está aberto.O npc Eventer precisa de 2 times de 20 pessoas para iniciar a batalhe,ele esta na Arena Pvp que vai por teleport de Carlin. Ja tem "..getBlue().." players no blue team vs "..getRed().." players no Red team,o time vencedor sera premiado.") return true end return true end ]]></globalevent> <globalevent name="Karim" interval="40000" event="script"><![CDATA[ domodlib('football-lib') domodlib('tutorial_m') function onThink(interval, lastExecution) if getGlobalStorageValue(running1) > 0 then local blue = {} local green = {} for _, pid in ipairs(getPlayersOnline()) do if isInRange(getCreaturePosition(pid),arena.frompos, arena.topos) then if getPlayerStorageValue(pid, joined) == 1 then table.insert(blue,getCreatureName(pid)) elseif getPlayerStorageValue(pid, joined) == 2 then table.insert(green,getCreatureName(pid)) end end end local greenn = table.concat(green,', ') local bluee = table.concat(blue,', ') for _, tid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(tid, joined) > 0 then doPlayerSendTextMessage(tid,19,'<<!-- Players left --!>>\n '..team1name..' team ('..#blue..') : '..bluee..'.\n '..team2name..' team ('..#green..') : '..greenn..'.') end end end return true end ]]></globalevent> </mod>
  14. GicoO

    Estranho

    Oi gente Tipow no meu otserv quando vc tenta mata otro player a vida dele fica 0 mas ele nao morre. Ou seja to no x1 com o player dai quando eu mato ele , em vez dele cair e talz a vida dele some ele fica com 0 de vida e continua andando de boa tipo um "zumbi". Olha o erro que fica dando dai :S [24/07/2011 12:37:25] [Error - CreatureScript Interface] [24/07/2011 12:37:25] buffer:onKill [24/07/2011 12:37:25] Description: [24/07/2011 12:37:25] data/lib/011-string.lua:27: attempt to index local 'str' (a number value) [24/07/2011 12:37:25] stack traceback: [24/07/2011 12:37:25] data/lib/011-string.lua:27: in function 'explode' [24/07/2011 12:37:25] [string "ranks = {..."]:30: in function 'getPlayerLevelInRank' [24/07/2011 12:37:25] [string "loadBuffer"]:11: in function <[string "loadBuffer"]:1> Alguem ajuda ai? :S Rep+ pra quem ajudar Alguem ajuda ai PLS :X
  15. GicoO

    Script De [Npc]

    Vlw kra vc salvo minha vida \o/ REP+ Pra vc :button_ok: Duvida sanada.
  16. GicoO

    Script De [Npc]

    Gente eu tenho um NPC aqui no meu otserv que vende items VIPS... Porem esse NPC da erro,e queria saber como arrumar. Ot versão 8.6 ERRO: [16/07/2011 03:20:17] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/vipseller.lua [16/07/2011 03:20:17] data/npc/scripts/vipseller.lua:80: 'end' expected (to close 'function' at line 11) near 'elseif' Script Do Npc: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid -- Conversa Jogador/NPC if(msgcontains(msg, 'list')) then selfSay('Eu vendo {Master Vip Medal}, {Master Crown},{Master Cloak},{Master Kilt}, {Master Shoes}, {Master God Shield}, {Master Helmet}, {Master Mail}, {Master Legs}, {Master Boots}, {Master Shield}, {Master Addon Doll}, {Master Blade}, {Master Imaginary Staff}, {Master Wand}, {Master Xp Ring}, {Master Arrow}, {Master Bow}, {Master Axe}.Por Moedas Master', cid) elseif(msgcontains(msg, 'Master Blade')) then selfSay('Voc\ê quer comprar Master Blade por 2 Master Coin?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'Master Imaginary Staff')) then selfSay('Voc\ê quer comprar Master Staff por 1 Master Coin?', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Master Axe') )then selfSay('Voc\ê quer comprar Master Axe por 5 Master Coin?', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Master Wand') )then selfSay('Voc\ê quer comprar Master Wand por 5 Master Coin?', cid) talkState[talkUser] = 4 elseif(msgcontains(msg, 'Master Bow') )then selfSay('Voc\ê quer comprar Master Bow por 5 Master Coin?', cid) talkState[talkUser] = 5 elseif(msgcontains(msg, 'Master Arrow') )then selfSay('Voc\ê quer comprar Master Arrow por 2 Master Coin?', cid) talkState[talkUser] = 6 elseif(msgcontains(msg, 'Master Xp Ring') )then selfSay('Voc\ê quer comprar Master Xp Ring por 3 Master Coin?', cid) talkState[talkUser] = 7 elseif(msgcontains(msg, 'Master Vip Medal') )then selfSay('Voc\ê quer comprar Master Vip Medal por 5 Master Coin?', cid) talkState[talkUser] = 8 elseif(msgcontains(msg, 'Master Addon Doll') )then selfSay('Voc\ê quer comprar Master Vip Medal por 1 Master Coin?', cid) talkState[talkUser] = 9 elseif(msgcontains(msg, 'Master Crown') )then selfSay('Voc\ê quer comprar Master Crown por 2 Master Coin?', cid) talkState[talkUser] = 10 elseif(msgcontains(msg, 'Master Cloak') )then selfSay('Voc\ê quer comprar Master Cloak por 2 Master Coin?', cid) talkState[talkUser] = 11 elseif(msgcontains(msg, 'Master Kilt') )then selfSay('Voc\ê quer comprar Master Kilt por 2 Master Coin?', cid) talkState[talkUser] = 12 elseif(msgcontains(msg, 'Master Shoes') )then selfSay('Voc\ê quer comprar Master Shoes por 2 Master Coin?', cid) talkState[talkUser] = 13 elseif(msgcontains(msg, 'Master God Shield') )then selfSay('Voc\ê quer comprar Master God Shield por 2 Master Coin?', cid) talkState[talkUser] = 14 elseif(msgcontains(msg, 'Master Helmet') )then selfSay('Voc\ê quer comprar Master Helmet por 2 Master Coin?', cid) talkState[talkUser] = 15 elseif(msgcontains(msg, 'Master Mail') )then selfSay('Voc\ê quer comprar Master Mail por 2 Master Coin?', cid) talkState[talkUser] = 16 elseif(msgcontains(msg, 'Master Legs') )then selfSay('Voc\ê quer comprar Master Legs por 2 Master Coin?', cid) talkState[talkUser] = 17 elseif(msgcontains(msg, 'Master Boots') )then selfSay('Voc\ê quer comprar Master Boots por 2 Master Coin?', cid) talkState[talkUser] = 18 elseif(msgcontains(msg, 'Master Shield') )then selfSay('Voc\ê quer comprar Master Shield por 2 Master Coin?', cid) talkState[talkUser] = 19 end -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12610, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if(doPlayerRemoveItem(cid, 2157, 1) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7409, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 1 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8925, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7424, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 5) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8855, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 6) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7840, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 7) then if(doPlayerRemoveItem(cid, 2157, 3) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7697, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 3 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 8) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 5785, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 9) then if(doPlayerRemoveItem(cid, 2157, 1) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 11390, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 1 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 10) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12591, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 11) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8870, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 12) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7896, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 13) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 6132, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 14) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12608, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 15) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12606, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 16) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12603, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 17) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12604, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 18) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2646, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 19) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2523, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Voces Poderiam Me Ajudar? :confused:
  17. Oks vo la tentar ^^ Ja edito aqui Ai em outro ot da certo os sistemas e pá só no meu que nao ÇÇ qq sera que e? Me falaram pra add umas linhas no Sql e talz eu adicionei mas nao adiantou ;x :angry_smile:
  18. 1º: Mais educação em seus tópicos. Ninguem precisa aguentar membrozinhos mimados. 2º: Chingar é contra as regras do forum (reportado) 3º: Você tem que reportar o Tópico pra alguem da Staff fechar. 4º: Não pode fazer double topic (reportado) -- @Topic Tenta procura o Perfect vip system 2.0 do Vodkart na sessão de Mods. Mimado nao neh pq quem começo com a putaria nem fui eu -.- eu só to aqui pedindo uma ajuda pra voces mas mesmo assim desculpas E eu usei esse ai do Vodkart e tambem nao deu certo ;xx Nao sei oq ta acontecendo... Alguem mais pode me ajuda ai?
  19. alguem ajuda? se possivel com Vip tile tambem =D Dou rep+ :button_ok: ALGUEM ME AJUDA AI POR FAVOR -.- A vai toma no cu alguem fexa essa porra desse topico do satanas ai fazendo um favor Pera aí!! Dexa eu ver se entedi!! Você criou um Tópico HOJE as 12:58 (esse que ta aí em cima), daí provavelmente você chegou do trabalho/estudos agora, e viu que seu tópico estava sem resposta. Daí editou o tópico desse maneira há 30 minutos, daí 7 minutos depois cria outro tópico pedindo a mesma coisa, e quer que seja atendido IMEDIATAMENTE? É isso? Ou será que é: Os Colaboradores/Coordenadores/Moderadores/Scripters/Membros, emfim, eles tem suas vidas sociais, e não podem ficar atendendo Membrozinho apressado/ancioso/mal educado 24h por dia..? Como um Coordenador disse, eles tem suas obrigações em suas vidas, como por exemplo estudar, trabalhar, namorar, cuidar de algum parente, emfim.. Sim kra eu pedi pra deleta aquele la sim pq eu ia criar esse pq eu estava com outra duvida --' E eu Editei dessa maneira pq eu sei que se eu Chinga alguem vai le o topico e fexa ele pra mim -.- pq eu pedi pra fexarem um outro la educadamente a uns 4 dias atras e ninguem fexo ainda sako? E nao eu nao quero que me atendam "imediatamente" (pois ninguem tem a obrigação de me ajudar) e nao precisa ser um "Moderador" pra me responder... Emfim eu pedi da vida de alguem aqui?Eu pedi se eles tem que estudar,trabalhar....? Hmmmm axo que nao neh...
  20. Se vc nao leu ali embaixo eu Sou MAPPER e nao Mexo com script pdk (y) Oq eu sei é só o BASICO DO BASICO sobre script ^^ Entao tu nao fala oq tu nao sabe oks E se vc é tão "FODAO" assim porque em vez de vim fala merda no topico dos outros vc nao ajuda no erro? E de 4 posts que vc tem 3 é pedindo a mesma coisa e 1 é que vc veio fala merda aqui -.- E qq vc ta falando de mim?Se liga mano
  21. Gente eu to precisando de ajuda e ja fiz um topico sobre isso e ninguem me ajudo :S Eu queria um script de VIP que funcione em otserv 8.6 ... Eu ja usei o do Kydrai e da esse erro ... [13/07/2011 00:07:54] [Error - TalkAction Interface] [13/07/2011 00:07:54] data/talkactions/scripts/vipaccgod.lua:onSay [13/07/2011 00:07:54] Description: [13/07/2011 00:07:54] data/lib/vipAccount.lua:34: attempt to call field 'executeQuery' (a nil value) [13/07/2011 00:07:54] stack traceback: [13/07/2011 00:07:54] data/lib/vipAccount.lua:34: in function 'installVip' [13/07/2011 00:07:54] data/talkactions/scripts/vipaccgod.lua:5: in function <data/talkactions/scripts/vipaccgod.lua:1> [13/07/2011 00:09:01] Error during getDataInt(viptime). Usei um outro que eu vi aqui (aquele que vc fala /vip e ve os comandos do GOD e talz) e deu esse erro... [13/07/2011 22:40:28] [Error - TalkAction Interface] [13/07/2011 22:40:28] data/talkactions/scripts/addvipp.lua:onSay [13/07/2011 22:40:28] Description: [13/07/2011 22:40:28] data/lib/049-vipsys.lua:102: attempt to call field 'executeQuery' (a nil value) [13/07/2011 22:40:28] stack traceback: [13/07/2011 22:40:28] data/lib/049-vipsys.lua:102: in function <data/lib/049-vipsys.lua:98> [13/07/2011 22:40:28] (tail call): ? [13/07/2011 22:40:28] data/talkactions/scripts/addvipp.lua:13: in function <data/talkactions/scripts/addvipp.lua:1> Tentei usa um outro la e deu esse erro... [13/07/2011 22:42:11] [Error - TalkAction Interface] [13/07/2011 22:42:11] data/talkactions/scripts/addvip.lua:onSay [13/07/2011 22:42:11] Description: [13/07/2011 22:42:11] (luaGetCreatureStorage) Creature not found [13/07/2011 22:42:11] [Error - TalkAction Interface] [13/07/2011 22:42:11] data/talkactions/scripts/addvip.lua:onSay [13/07/2011 22:42:11] Description: [13/07/2011 22:42:11] data/talkactions/scripts/addvip.lua:15: attempt to perform arithmetic on global 'storageplayer' (a boolean value) [13/07/2011 22:42:11] stack traceback: [13/07/2011 22:42:11] data/talkactions/scripts/addvip.lua:15: in function <data/talkactions/scripts/addvip.lua:1> Ou seja nao consigo axa nenhum que funcione aqui :x Alguem ajuda POR FAVOR POR FAVOR to precisando muito eu do rep + e oq vcs quiserem ... Mas POR FAVOR ME AJUDA !
  22. [13/07/2011 00:07:54] [Error - TalkAction Interface] [13/07/2011 00:07:54] data/talkactions/scripts/vipaccgod.lua:onSay [13/07/2011 00:07:54] Description: [13/07/2011 00:07:54] data/lib/vipAccount.lua:34: attempt to call field 'executeQuery' (a nil value) [13/07/2011 00:07:54] stack traceback: [13/07/2011 00:07:54] data/lib/vipAccount.lua:34: in function 'installVip' [13/07/2011 00:07:54] data/talkactions/scripts/vipaccgod.lua:5: in function <data/talkactions/scripts/vipaccgod.lua:1> [13/07/2011 00:09:01] Error during getDataInt(viptime). Ta dando esse erro :S Quando eu digo /installvip Oq ser esse erro? Alguem ajuda ai Pow
  23. GicoO

    Quest !

    Queria um script igual ao global! que quando vc usa a Orichalcum Pearl depois que voce faz a Challenge quest e teleportado para aquele lugar (que eu nao sei o nome)... preciso rapido =D dou rep + :button_ok:
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...