Ir para conteúdo
  • Cadastre-se

Ajuda Character Search


Posts Recomendados

Fala galera, meu site é modern acc... ando tendo um problema, quando pesquiso um nome de char. TESTE, ele pesquisa normal esse nome, mas nomes com espaço ele nao pesquisa, simplesmente recarrega a pagina... esse é o meu character_search.php. Conto com a ajuda de voces, para resolver por favor!!

 

 

<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Procurar Jogador</div>
<div class='content'>
<label>Nick Personagem</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
    if(!empty($_SESSION['sCharacters'])) {
        echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
            foreach($_SESSION['sCharacters'] as $character) {
                echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
            }
        ?>
            <a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
        <?php 
        echo "</div></div>";
    }
?>

Link para o post
Compartilhar em outros sites

Este tópico foi movido para a seção de Suporte Otserv.

Baixe Esse site aqui que disponibilizei no tibiaking, e pegue o arquivo. 

Creio eu que já vem arrumado isso.

 

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

Link para o post
Compartilhar em outros sites
44 minutos atrás, RicK Sanchez disse:

Este tópico foi movido para a seção de Suporte Otserv.

Baixe Esse site aqui que disponibilizei no tibiaking, e pegue o arquivo. 

Creio eu que já vem arrumado isso.

 

Eu baixei amigo, mesma coisa. da o mesmo erro.

Link para o post
Compartilhar em outros sites

me envia teu view_character.php

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

Link para o post
Compartilhar em outros sites
6 horas atrás, gutalo disse:

Fala galera, meu site é modern acc... ando tendo um problema, quando pesquiso um nome de char. TESTE, ele pesquisa normal esse nome, mas nomes com espaço ele nao pesquisa, simplesmente recarrega a pagina... esse é o meu character_search.php. Conto com a ajuda de voces, para resolver por favor!!

 

 

<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Procurar Jogador</div>
<div class='content'>
<label>Nick Personagem</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
    if(!empty($_SESSION['sCharacters'])) {
        echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
            foreach($_SESSION['sCharacters'] as $character) {
                echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
            }
        ?>
            <a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
        <?php 
        echo "</div></div>";
    }
?>

Testa esse irmão:

Spoiler

O erro não é no  character_search.php e sim no view_character.php\/

 

view_character.php

Editado por Nysman (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
1 hora atrás, RicK Sanchez disse:

me envia teu view_character.php

esse aqui

 

<?php
require_once("system/application/config/create_character.php");
    if(in_array(strtolower($player->name), $config['restricted_names']))
        error("You are not authorized to view this character.");
    else {
    if($player->isDeleted()) alert("This character has been deleted.");
    if($player->isNameLocked()) alert("This character has been name locked.");

    try {$comment = nl2br(decodeString(strip_tags($player->getComment())));}catch (Exception $e) {$comment = "Could not load comment.";}
    $nickname = ($account->getCustomField('nickname') == "") ? "Not set yet." : $account->getCustomField('nickname');
    try { $created = $player->getCreated(); } catch (Exception $e) { $created = time()-36000;}
?>
<div class='title'>Personagem !</div>
<table border="0" cellpadding="1" cellspacing="1" width="100%">
    <center><tr><td width='30%'>Name</td><td><?php echo $player->getName();?></td></tr>
    <center><tr><td width='30%'>Sex</td><td><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></td></tr>
    <center><tr><td width='30%'>Vocação</td><td><?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></td></tr>
    <center><tr><td width='30%'>Level</td><td><?php echo $player->getLevel(); ?></td></tr>
    <?php 
        $rank_of_player = $player->getRank();
        if(!empty($rank_of_player)) {
            $guild_id = $rank_of_player->getGuild()->getId();
            $guild_name = $rank_of_player->getGuild()->getName();
            echo "<tr><td width='35%'>Membro da Guild</td><td>".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'>".$guild_name."</a></td></tr>";
        }
    ?>
    <tr><td width='30%'>World</td><td><?php echo $config['worlds'][$player->getWorld()]; ?></td></tr>
    <tr><td width='30%'>Nickname</td><td><?php echo "<a href='".url('profile/view/'.$nickname)."'>".$nickname."</a>"; ?></td></tr>
    <tr><td width='30%'>Last login</td><td><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "Never" : UNIX_TimeStamp($player->getLastLogin()); ?></td></tr>
    <tr><td width='30%'>Comment</td><td><?php echo $comment; ?></td></tr>
    <tr><td width='30%'>Account Status</td><td><?php echo $status = ($account->isPremium()) ? "Premium" : "Free"; ?></td></tr>
    <tr><td width='30%'>Group</td><td><?php echo $config['groups'][$player->getGroup()]; ?></td></tr>
    <tr><td width='30%'>Status</td><td><?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td></tr>
    <tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>
</table>
<?php 
    $GLOBALS['player'] = $player;
    $ide = new IDE;
    try {
        $ide->loadInjections("character_view");
    }
        catch(Exception $e) {
            error($e->getMessage());
        }
    
}
?>

15 minutos atrás, Nysman disse:

Testa esse irmão:

  Ocultar conteúdo

O erro não é no  character_search.php e sim no view_character.php\/

 

view_character.php 3 kB · 0 downloads

Continua amigo. nao ta indo

Link para o post
Compartilhar em outros sites
<?php
require_once("system/application/config/create_character.php");
	if(in_array(strtolower($player->name), $config['restricted_names']))
		error("You are not authorized to view this character.");
	else {
	if($player->isDeleted()) alert("This character has been deleted.");
	if($player->isNameLocked()) alert("This character has been name locked.");

	try {$comment = nl2br(decodeString(strip_tags($player->getComment())));}catch (Exception $e) {$comment = "Could not load comment.";}
	$nickname = ($account->getCustomField('nickname') == "") ? "Not set yet." : $account->getCustomField('nickname');
	try { $created = $player->getCreated(); } catch (Exception $e) { $created = time()-36000;}
?>
<div class='bar'>Character</div>
<table width='100%'>
	<tr><td width='30%'>Name</td><td><?php echo $player->getName();?></td></tr>
	<tr><td width='30%'>Sex</td><td><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></td></tr>
	<tr><td width='30%'>Vocação</td><td><?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></td></tr>
	<tr><td width='30%'>Level</td><td><?php echo $player->getLevel(); ?></td></tr>
	<?php 
		$rank_of_player = $player->getRank();
		if(!empty($rank_of_player)) {
			$guild_id = $rank_of_player->getGuild()->getId();
			$guild_name = $rank_of_player->getGuild()->getName();
			echo "<tr><td width='30%'>Guild membership</td><td>".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'>".$guild_name."</a></td></tr>";
		}
	?>
	<tr><td width='30%'>Last login</td><td><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "Never" : UNIX_TimeStamp($player->getLastLogin()); ?></td></tr>
	<tr><td width='30%'>Comment</td><td><?php echo $comment; ?></td></tr>
	<tr><td width='30%'>Account Status</td><td><?php echo $status = ($account->isPremium()) ? "Premium" : "Free"; ?></td></tr>
	<tr><td width='30%'>Group</td><td><?php echo $config['groups'][$player->getGroup()]; ?></td></tr>
	<tr><td width='30%'>Status</td><td><?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td></tr>
	<tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>
</table>
<?php 
	$GLOBALS['player'] = $player;
	$ide = new IDE;
	try {
		$ide->loadInjections("character_view");
	}
		catch(Exception $e) {
			error($e->getMessage());
		}
	
}
?>

 

Tenta ae

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

Link para o post
Compartilhar em outros sites
4 minutos atrás, RicK Sanchez disse:

<?php
require_once("system/application/config/create_character.php");
	if(in_array(strtolower($player->name), $config['restricted_names']))
		error("You are not authorized to view this character.");
	else {
	if($player->isDeleted()) alert("This character has been deleted.");
	if($player->isNameLocked()) alert("This character has been name locked.");

	try {$comment = nl2br(decodeString(strip_tags($player->getComment())));}catch (Exception $e) {$comment = "Could not load comment.";}
	$nickname = ($account->getCustomField('nickname') == "") ? "Not set yet." : $account->getCustomField('nickname');
	try { $created = $player->getCreated(); } catch (Exception $e) { $created = time()-36000;}
?>
<div class='bar'>Character</div>
<table width='100%'>
	<tr><td width='30%'>Name</td><td><?php echo $player->getName();?></td></tr>
	<tr><td width='30%'>Sex</td><td><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></td></tr>
	<tr><td width='30%'>Vocação</td><td><?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></td></tr>
	<tr><td width='30%'>Level</td><td><?php echo $player->getLevel(); ?></td></tr>
	<?php 
		$rank_of_player = $player->getRank();
		if(!empty($rank_of_player)) {
			$guild_id = $rank_of_player->getGuild()->getId();
			$guild_name = $rank_of_player->getGuild()->getName();
			echo "<tr><td width='30%'>Guild membership</td><td>".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'>".$guild_name."</a></td></tr>";
		}
	?>
	<tr><td width='30%'>Last login</td><td><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "Never" : UNIX_TimeStamp($player->getLastLogin()); ?></td></tr>
	<tr><td width='30%'>Comment</td><td><?php echo $comment; ?></td></tr>
	<tr><td width='30%'>Account Status</td><td><?php echo $status = ($account->isPremium()) ? "Premium" : "Free"; ?></td></tr>
	<tr><td width='30%'>Group</td><td><?php echo $config['groups'][$player->getGroup()]; ?></td></tr>
	<tr><td width='30%'>Status</td><td><?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td></tr>
	<tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>
</table>
<?php 
	$GLOBALS['player'] = $player;
	$ide = new IDE;
	try {
		$ide->loadInjections("character_view");
	}
		catch(Exception $e) {
			error($e->getMessage());
		}
	
}
?>

 

Tenta ae

Sera que é no character view msm?  mesmo erro amigo. só ta mostrando nome unico, nome com espaço n carrega

Link para o post
Compartilhar em outros sites

manda teu config.php ae mermão

 

 

 

 

 

                                                                                                                                                     tumblr_nwmv2z4VEM1ujiquxo1_100.gif.2db64bb36f0f565e68ff2a90cb98f439.gif.59f4c4cf234d2f6906621cac0553a862.gif

https://github.com/italoxxx1

 

Link para o post
Compartilhar em outros sites
6 minutos atrás, RicK Sanchez disse:

manda teu config.php ae mermão

<?php
/*These configs are neccessary in order to make Modern AAC work.*/

/*URL of website including http:// and without slash at the end! */
$config['website'] = $config['website'] = 'http://'.$_SERVER['HTTP_HOST'] . '/'.trim(dirname($_SERVER['SCRIPT_NAME']), '/.\\');


/*Database information*/
$config['database']['host'] = "127.0.0.1";
$config['database']['login'] = "root";
$config['database']['password'] = "";
$config['database']['database'] = "";
 
/*Name of server*/
$config['server_name'] = "Mix Extreme";
 
// Sistema automatico Pagseguro by Pernilonguildo
// Seu email cadastrado no pagseguro
$config['pagseguro']['email'] = '';
 
// Nome do Produto
$config['pagseguro']['produtoNome'] = 'Premium points';
 
// Valor unitario do produto ou seja valor de cada ponto
// Exemplo de valores
// 100 = R$ 1,00
// 235 = R$ 2,35
// 4254 = R$ 42,54
$config['pagseguro']['produtoValor'] = '100'; 
 
// Token gerado no painel do pagseguro
$config['pagseguro']['token'] = '';  
/*End of most important configs*/

/* Simple ticket system */
$config['newsTickerLimit'] = 4; 
$config['newsTickerWords'] = 4; 
 
/*List of cities, declare by using city ID and name eg. 2=>"Soul Server" etc.*/
$config['cities'] = array(1 =>'Small City');

/*List of vocation available to choose when creating new character*/
$config['vocations'] = array(1=>"Goku", );

/*List of vocation that exists on server*/
$config['server_vocations'] = array(1=>"Goku",;
 
/*List of promotions, the key is vocation without promotion*/
$config['promotions'] = array(1=>"Master Sorcerer", 2=>"Elder Druid", 3=>"Royal Paladin", 4=>"Elite Knight");
 
/*Resitricted names*/
$config['restricted_names'] = array("god", "gamemaster", "admin", "account manager");
 
/*Names with any of this value cannot be created*/
$config['invalidNameTags'] = array("god", "gm", "cm", "gamemaster", "hoster", "admin");
 
 
/*ID and names of worlds*/
$config['worlds'][0] = "Extreme";
 
// Enable multiworld by uncommenting this
//$config['worlds'][1] = "Second World";
 
/* Addresses of each server */
$config['servers'][0] = array('address'=>'127.0.0.1', 'port'=>7171, 'vapusid'=>'%VAPUS_ID%');
 
// Enable multiworld by uncommenting this
//$config['servers'][1] = array('address'=>'127.0.0.1', 'port'=>7173, 'vapusid' => 'XXX');
 
/*Groups that exists on server*/
$config['groups'] = array(0=>"Player", 1=>"Player", 2=>"Tutor", 3=>"Senior Tutor", 4=>"Gamemaster", 5=>"Community Manager", 6=>"administrador");
 
 
/*Names of vocations as in database as samples. First key is world id and second vocation id.*/
$config['newchar_vocations'][0][1314] = "Ichigo Sample";

/*Don't show chaarcters with group id higher than*/
$config['players_group_id_block'] = 3;


/*Min. level to create guild*/
$config['levelToCreateGuild'] = 100;


/*Limit of latest deaths*/
$config['latestdeathlimit'] = 20;

/*Limit news per page*/
$config['newsLimit'] = 100;

/*Limit comments per page*/
$config['commentLimit'] = 0;

/*Template that should be used on website*/
$config['layout'] = "dbo4";

/*Title of a website*/
$config['title'] = "Mix Extreme";


/*Premdays given when creating new account.*/
$config['premDays'] = 0;


/*Positions to start when creating character*/
$startPos['x'] = 655;
$startPos['y'] = 399;
$startPos['z'] = 7;


/*Trigger password for scaffolding system.*/
$config['scaffolding_trigger'] = "password";

/*Minimum page access for admin priviliges*/
$config['adminAccess'] = 6;

/*Max threads per page*/
$config['threadsLimit'] = 10;

/*Max posts per page in a thread*/
$config['postsLimit'] = 0;

/*Time between posts*/
$config['timeBetweenPosts'] = 300;

/*Limit of submissions per page in bug tracker*/
$config['bugtrackerPageLimit'] = 10;

/*Limit of houses on listing page*/
$config['housesLimit'] = 10;

/*Level to buy house*/
$config['houseLevel'] = 120;

/*Lenght of housing auction in seconds*/
$config['houseAuctionTime'] = 604800;

/*Default timezone*/
$config['timezone'] = "Europe/London";

/*Allowed IPs to use command prompt in admin panel*/
$config['allowedToUseCMD'] = array("127.0.0.1", "localhost");

/* Path to your UI theme */
$config['UItheme'] = "smoothness/jquery-ui-1.7.2.custom.css";

/*Destination to guilds logos folder, must be writable.*/
$config['uploads'] = "/public/guild_logos/";

/* Status timeout (recheck if server is online) */
$config['statusTimeout'] = 1 + (5 * 60); // Default to 5min

/* Wrap words longer than */
$config['wrap_words'] = 80;

/*Limit comments per page in videos view*/
$config['videoCommentsLimit'] = 0;

/*Limit of videos to show while searching*/
$config['videoSearchLimit'] = 0;

/*Maximum amount of characters per account*/
$config['maxCharacters'] = 20;

/*Limit of inbox/outbox messages per page*/
$config['messagesLimit'] = 0;

/*Amount of names to be saved when looking for characters*/
$config['characterSearchLimit'] = 10;

/*Switch on Admin Window*/
$config['adminWindow'] = true;

/*Integrate facebook to AAC? (TRUE/FALSE)*/
$config['facebook'] = false;

/*Max amount of saved actions*/
$config['actionsCount'] = 15;

/*Player per page in hishscore */
$config['highscore']['per_page'] = 15;

/*Total players to show in highscores*/
$config['highscore']['total'] = 100;


/* Guild board creation */
$config['guildboardTitle'] = "Guildboard for %NAME%";
$config['guildboardDescription'] = "This is the guildboard for the great %NAME% guild!";

/* VAPus Settings */
$config['VAPusGraphStep'] = 1; // step * update time = time steps on graph, etc 6 with an update time of 10min = one hour

//Enable delay between creating characters
$config['characterDelay'] = true;

//Time between creating characters in seconds
$config['characterDelayTime'] = 60;

//Enable delay between creating accounts
$config['accountDelay'] = true;

//Time between creating accounts in seconds
$config['accountDelayTime'] = 240;

//Account restrictions
$config['restrictedAccounts'] = array('1'); 

############EVENTS############

# Event fired just after main framework to gain access to all features
$config['onLoad'] = array();

# Event fired after all finished loading no headers should be sent
$config['onReady'] = array();


#############################

/*
######################################################################################################################
 * Do not touch any of the configs below if you are not 100% sure what you are doing!
 * These are config to the engine, usually the default ones works well so no change needed for unexperienced users.
######################################################################################################################
*/
// Tiny hack to figure if we use Windows or not.
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') @define('USING_WINDOWS', 1);
else @define('USING_WINDOWS', 0);

if(USING_WINDOWS) $config['engine']['PHPversion'] = "5.3.0";
else $config['engine']['PHPversion'] = "5.3.0";
$config['engine']['indexPage'] = "index.php";
$config['engine']['uri_protocol'] = "REQUEST_URI";
$config['engine']['charSET'] = "UTF-8";
$config['engine']['enable_hooks'] = FALSE;
$config['engine']['permitted_uri_chars'] = "a-z 0-9~%.:_\-'+";
$config['engine']['enable_query_strings'] = FALSE;
$config['engine']['global_xss_filtering'] = TRUE;
$config['engine']['compress_output'] = FALSE;
$config['engine']['proxy_ip'] = "";
$config['engine']['autoload_libraries'] = array();
$config['engine']['autoload_helper'] = array();
$config['engine']['autoload_plugin'] = array();
$config['engine']['autoload_config'] = array();
$config['engine']['autoload_model'] = array();
$config['engine']['default_controller'] = "home";
$config['engine']['platforms'] = array('windows nt 6.0' => 'Windows Longhorn', 'windows nt 5.2' => 'Windows 2003', 'windows nt 5.0' => 'Windows 2000', 'windows nt 5.1' => 'Windows XP', 'windows nt 4.0' => 'Windows NT 4.0', 'winnt4.0' => 'Windows NT 4.0', 'winnt 4.0' => 'Windows NT', 'winnt' => 'Windows NT', 'windows 98' => 'Windows 98', 'win98' => 'Windows 98', 'windows 95' => 'Windows 95', 'win95' => 'Windows 95', 'windows' => 'Unknown Windows OS', 'os x' => 'Mac OS X', 'ppc mac' => 'Power PC Mac', 'freebsd' => 'FreeBSD', 'ppc' => 'Macintosh', 'linux' => 'Linux', 'debian' => 'Debian', 'sunos' => 'Sun Solaris', 'beos' => 'BeOS', 'apachebench' => 'ApacheBench', 'aix' => 'AIX', 'irix' => 'Irix', 'osf' => 'DEC OSF', 'hp-ux' => 'HP-UX', 'netbsd' => 'NetBSD', 'bsdi' => 'BSDi', 'openbsd' => 'OpenBSD', 'gnu' => 'GNU/Linux', 'unix' => 'Unknown Unix OS' );
$config['engine']['mobiles'] = array('mobileexplorer' => 'Mobile Explorer', 'palmsource' => 'Palm', 'palmscape' => 'Palmscape', 'motorola' => "Motorola", 'nokia' => "Nokia", 'palm' => "Palm", 'iphone' => "Apple iPhone", 'ipod' => "Apple iPod Touch", 'sony' => "Sony Ericsson", 'ericsson' => "Sony Ericsson", 'blackberry' => "BlackBerry", 'cocoon' => "O2 Cocoon", 'blazer' => "Treo", 'lg' => "LG", 'amoi' => "Amoi", 'xda' => "XDA", 'mda' => "MDA", 'vario' => "Vario", 'htc' => "HTC", 'samsung' => "Samsung", 'sharp' => "Sharp", 'sie-' => "Siemens", 'alcatel' => "Alcatel", 'benq' => "BenQ", 'ipaq' => "HP iPaq", 'mot-' => "Motorola", 'playstation portable' => "PlayStation Portable", 'hiptop' => "Danger Hiptop", 'nec-' => "NEC", 'panasonic' => "Panasonic", 'philips' => "Philips", 'sagem' => "Sagem", 'sanyo' => "Sanyo", 'spv' => "SPV", 'zte' => "ZTE", 'sendo' => "Sendo", 'symbian' => "Symbian", 'SymbianOS' => "SymbianOS", 'elaine' => "Palm", 'palm' => "Palm", 'series60' => "Symbian S60", 'windows ce' => "Windows CE", 'obigo' => "Obigo", 'netfront' => "Netfront Browser", 'openwave' => "Openwave Browser", 'mobilexplorer' => "Mobile Explorer", 'operamini' => "Opera Mini", 'opera mini' => "Opera Mini", 'digital paths' => "Digital Paths", 'avantgo' => "AvantGo", 'xiino' => "Xiino", 'novarra' => "Novarra Transcoder", 'vodafone' => "Vodafone", 'docomo' => "NTT DoCoMo", 'o2' => "O2", 'mobile' => "Generic Mobile", 'wireless' => "Generic Mobile", 'j2me' => "Generic Mobile", 'midp' => "Generic Mobile", 'cldc' => "Generic Mobile", 'up.link' => "Generic Mobile", 'up.browser' => "Generic Mobile", 'smartphone' => "Generic Mobile", 'cellphone' => "Generic Mobile" );
$config['engine']['robots'] = array('googlebot' => 'Googlebot', 'msnbot' => 'MSNBot', 'slurp' => 'Inktomi Slurp', 'yahoo' => 'Yahoo', 'askjeeves' => 'AskJeeves', 'fastcrawler' => 'FastCrawler', 'infoseek' => 'InfoSeek Robot 1.0', 'lycos' => 'Lycos' );
$config['engine']['browsers'] = array('Opera' => 'Opera', 'MSIE' => 'Internet Explorer', 'Internet Explorer' => 'Internet Explorer', 'Shiira' => 'Shiira', 'Firefox' => 'Firefox', 'Chimera' => 'Chimera', 'Phoenix' => 'Phoenix', 'Firebird' => 'Firebird', 'Camino' => 'Camino', 'Netscape' => 'Netscape', 'OmniWeb' => 'OmniWeb', 'Safari' => 'Safari', 'Mozilla' => 'Mozilla', 'Konqueror' => 'Konqueror', 'icab' => 'iCab', 'Lynx' => 'Lynx', 'Links' => 'Links', 'hotjava' => 'HotJava', 'amaya' => 'Amaya', 'IBrowse' => 'IBrowse' );
$config['engine']['mimes'] = array('hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'csv' => array ('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel' ), 'bin' => 'application/macbinary', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => 'application/octet-stream', 'class' => 'application/octet-stream', 'psd' => 'application/x-photoshop', 'so' => 'application/octet-stream', 'sea' => 'application/octet-stream', 'dll' => 'application/octet-stream', 'oda' => 'application/oda', 'pdf' => array ('application/pdf', 'application/x-download' ), 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' => 'application/postscript', 'smi' => 'application/smil', 'smil' => 'application/smil', 'mif' => 'application/vnd.mif', 'xls' => array ('application/excel', 'application/vnd.ms-excel', 'application/msexcel' ), 'ppt' => array ('application/powerpoint', 'application/vnd.ms-powerpoint' ), 'wbxml' => 'application/wbxml', 'wmlc' => 'application/wmlc', 'dcr' => 'application/x-director', 'dir' => 'application/x-director', 'dxr' => 'application/x-director', 'dvi' => 'application/x-dvi', 'gtar' => 'application/x-gtar', 'gz' => 'application/x-gzip', 'php' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php', 'phps' => 'application/x-httpd-php-source', 'js' => 'application/x-javascript', 'swf' => 'application/x-shockwave-flash', 'sit' => 'application/x-stuffit', 'tar' => 'application/x-tar', 'tgz' => 'application/x-tar', 'xhtml' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml', 'zip' => array ('application/x-zip', 'application/zip', 'application/x-zip-compressed' ), 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mpga' => 'audio/mpeg', 'mp2' => 'audio/mpeg', 'mp3' => array ('audio/mpeg', 'audio/mpg' ), 'aif' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'ram' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio', 'rpm' => 'audio/x-pn-realaudio-plugin', 'ra' => 'audio/x-realaudio', 'rv' => 'video/vnd.rn-realvideo', 'wav' => 'audio/x-wav', 'bmp' => 'image/bmp', 'gif' => 'image/gif', 'jpeg' => array ('image/jpeg', 'image/pjpeg' ), 'jpg' => array ('image/jpeg', 'image/pjpeg' ), 'jpe' => array ('image/jpeg', 'image/pjpeg' ), 'png' => array ('image/png', 'image/x-png' ), 'tiff' => 'image/tiff', 'tif' => 'image/tiff', 'css' => 'text/css', 'html' => 'text/html', 'htm' => 'text/html', 'shtml' => 'text/html', 'txt' => 'text/plain', 'text' => 'text/plain', 'log' => array ('text/plain', 'text/x-log' ), 'rtx' => 'text/richtext', 'rtf' => 'text/rtf', 'xml' => 'text/xml', 'xsl' => 'text/xml', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'avi' => 'video/x-msvideo', 'movie' => 'video/x-sgi-movie', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'word' => array ('application/msword', 'application/octet-stream' ), 'xl' => 'application/excel', 'eml' => 'message/rfc822' );
$config['engine']['doctypes'] = array('xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', 'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'html5' => '<!DOCTYPE html>', 'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', 'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">' );
$config['engine']['url_suffix'] = ".ide";
$config['engine']['sess_cookie_name'] = 'ci_session';
$config['engine']['sess_expiration'] = 7200;
$config['engine']['sess_encrypt_cookie'] = FALSE;
$config['engine']['sess_use_database'] = FALSE;
$config['engine']['sess_table_name'] = 'ci_sessions';
$config['engine']['sess_match_ip'] = FALSE;
$config['engine']['sess_match_useragent'] = TRUE;
$config['engine']['sess_time_to_update'] = 300;
$config['engine']['rewrite_short_tags'] = false;
if(USING_WINDOWS == 1) {
//Load management is not available on Windows.
$config['engine']['loadManagement'] = false;
} else {
//Load management is a maximum ammount of processes website is using. If the website is flooded it will drop connection with users outside this amount.
$config['engine']['loadManagement'] = false;
$config['engine']['maxLoad'] = 60;
}

/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| If you have enabled error logging, you can set an error threshold to 
| determine what gets logged. Threshold options are:
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
|    0 = Disables logging, Error logging TURNED OFF
|    1 = Error Messages (including PHP errors)
|    2 = Debug Messages
|    3 = Informational Messages
|    4 = All Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['engine']['log_threshold'] = 0;


#DON'T TOUCH! DECLARING CONSTANS!
@DEFINE('LEVELTOCREATEGUILD', $config['levelToCreateGuild']);
@DEFINE('PREMDAYS', $config['premDays']);
@DEFINE('HOSTNAME', $config['database']['host']);
@DEFINE('USERNAME', $config['database']['login']);
@DEFINE('PASSWORD', $config['database']['password']);
@DEFINE('DATABASE', $config['database']['database']);
@DEFINE('WEBSITE', $config['website']);
?>
 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

Brother, troca o seu script por esse que vai funcionar agora: ^^ 

Spoiler

<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Character lookup</div>
<div class='content'>
<label>Character name</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
    if(!empty($_SESSION['sCharacters'])) {
        echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
            foreach($_SESSION['sCharacters'] as $character) {
                echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
            }
        ?>
            <a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
        <?php 
        echo "</div></div>";
    }
?>

 

Link para o post
Compartilhar em outros sites
  • 3 weeks later...
Em 23/11/2020 em 01:21, Nysman disse:

Brother, troca o seu script por esse que vai funcionar agora: ^^ 

  Ocultar conteúdo

<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Character lookup</div>
<div class='content'>
<label>Character name</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
    if(!empty($_SESSION['sCharacters'])) {
        echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
            foreach($_SESSION['sCharacters'] as $character) {
                echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
            }
        ?>
            <a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
        <?php 
        echo "</div></div>";
    }
?>

 

vi sua resposta agora. nao adiantou.

 

Link para o post
Compartilhar em outros sites
Em 09/11/2020 em 17:15, gutalo disse:

Fala galera, meu site é modern acc... ando tendo um problema, quando pesquiso um nome de char. TESTE, ele pesquisa normal esse nome, mas nomes com espaço ele nao pesquisa, simplesmente recarrega a pagina... esse é o meu character_search.php. Conto com a ajuda de voces, para resolver por favor!!

 

 

<?php
echo form_open("character/view");
?>
<div class='message'>
<div class='title'>Procurar Jogador</div>
<div class='content'>
<label>Nick Personagem</label> <input name='name' id='search' type='text'> 
<input type='submit' value='Search'>
</form>
</div>
</div>
<br/>
<?php 
    if(!empty($_SESSION['sCharacters'])) {
        echo "<div class='message'><div class='title'>History</div><div id='history' class='content'>";
            foreach($_SESSION['sCharacters'] as $character) {
                echo "<b><a href=\"".url('character/view/'.$character['name'])."\">".ucwords($character['name'])."</a></b> - ".ago($character['time'])."<br/>";
            }
        ?>
            <a href='#' onClick='$("#history").load("<?php echo url('character/clearHistory');?>");'>Clear History</a>
        <?php 
        echo "</div></div>";
    }
?>

Mudou esse para oque eu mandei e mesmo assim não teve solução? LOL

Link para o post
Compartilhar em outros sites

Cara seu problema pode ser na URI, ela ajuda a identificar a fonte. Pelo que vi no seu config.php não está definido como auto.

Tente alterar ela e vê se resolve.

Troque:

$config['engine']['uri_protocol'] = "REQUEST_URI";

Por:

$config['engine']['uri_protocol'] = "AUTO";

 

Esse é o padrão, assim ele detecta automaticamente.

Editado por Yan Liima (veja o histórico de edições)

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

Link para o post
Compartilhar em outros sites
4 horas atrás, Yan Liima disse:

Cara seu problema pode ser na URI, ela ajuda a identificar a fonte. Pelo que vi no seu config.php não está definido como auto.

Tente alterar ela e vê se resolve.

Troque:



$config['engine']['uri_protocol'] = "REQUEST_URI";

Por:



$config['engine']['uri_protocol'] = "AUTO";

 

Esse é o padrão, assim ele detecta automaticamente.

Amigo, eu tentei esse metodo, no meu site quando coloco AUTO simplesmente n carrega mais pagina nenhuma. apenas da reload

Quando clico em qualquer aba, aparece la.

//index.php/p/v/deaths um exemplo cliquei em mortes, fico na pagina inicial do meu site ainda. 

Editado por gutalo (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Agora, gutalo disse:

Amigo, eu tentei esse metodo, no meu site quando coloco AUTO simplesmente n carrega mais pagina nenhuma. apenas da reload

 

 

Qual Modern o senhor está utilizando ?

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

Link para o post
Compartilhar em outros sites
6 minutos atrás, gutalo disse:

meu site é o mixextreme.com.br n sei na real qual é a versão!

Bom pelo que vi o problema está no view_character.php como citado pelo @Nysman

 

Faz o seguinte, baixa algum outro modern acc e substitua o system\application\views\view_character.php ou \system\application\character.php.

 

Talvez isto resolva

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

Link para o post
Compartilhar em outros sites

Oque ele me passou nao resolveu. eu fiz a alteração! e o meu view_character.php é esse aqui

Spoiler

<?php
require_once("system/application/config/create_character.php");
    if(in_array(strtolower($player->name), $config['restricted_names']))
        error("You are not authorized to view this character.");
    else {
    if($player->isDeleted()) alert("This character has been deleted.");
    if($player->isNameLocked()) alert("This character has been name locked.");

    try {$comment = nl2br(decodeString(strip_tags($player->getComment())));}catch (Exception $e) {$comment = "Could not load comment.";}
    $nickname = ($account->getCustomField('nickname') == "") ? "Not set yet." : $account->getCustomField('nickname');
    try { $created = $player->getCreated(); } catch (Exception $e) { $created = time()-36000;}
?>
<div class='title'>Personagem !</div>
<table border="0" cellpadding="1" cellspacing="1" width="100%">
    <center><tr><td width='30%'>Name</td><td><?php echo $player->getName();?></td></tr>
    <center><tr><td width='30%'>Sex</td><td><?php echo $sex = ($player->getSex() == 1) ? "Male" : "Female" ?></td></tr>
    <center><tr><td width='30%'>Vocação</td><td><?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></td></tr>
    <center><tr><td width='30%'>Level</td><td><?php echo $player->getLevel(); ?></td></tr>
    <?php 
        $rank_of_player = $player->getRank();
        if(!empty($rank_of_player)) {
            $guild_id = $rank_of_player->getGuild()->getId();
            $guild_name = $rank_of_player->getGuild()->getName();
            echo "<tr><td width='35%'>Membro da Guild</td><td>".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'>".$guild_name."</a></td></tr>";
        }
    ?>
    <tr><td width='30%'>World</td><td><?php echo $config['worlds'][$player->getWorld()]; ?></td></tr>
    <tr><td width='30%'>Nickname</td><td><?php echo "<a href='".url('profile/view/'.$nickname)."'>".$nickname."</a>"; ?></td></tr>
    <tr><td width='30%'>Last login</td><td><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "Never" : UNIX_TimeStamp($player->getLastLogin()); ?></td></tr>
    <tr><td width='30%'>Comment</td><td><?php echo $comment; ?></td></tr>
    <tr><td width='30%'>Account Status</td><td><?php echo $status = ($account->isPremium()) ? "Premium" : "Free"; ?></td></tr>
    <tr><td width='30%'>Group</td><td><?php echo $config['groups'][$player->getGroup()]; ?></td></tr>
    <tr><td width='30%'>Status</td><td><?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td></tr>
    <tr><td width='30%'>Created</td><td><?php echo ago($created)." | ".UNIX_TimeStamp($created); ?></td></tr>
</table>
<?php 
    $GLOBALS['player'] = $player;
    $ide = new IDE;
    try {
        $ide->loadInjections("character_view");
    }
        catch(Exception $e) {
            error($e->getMessage());
        }
    
}
?>

 

Nao amigos, nao resolveu.

 

7 minutos atrás, Yan Liima disse:

Bom pelo que vi o problema está no view_character.php como citado pelo @Nysman

 

Faz o seguinte, baixa algum outro modern acc e substitua o system\application\views\view_character.php ou \system\application\character.php.

 

Talvez isto resolva

 

7 horas atrás, Nysman disse:

Mudou esse para oque eu mandei e mesmo assim não teve solução? LOL

nao resolveu pessoal.

Spoiler

<?php

class Character extends Controller {
    function index() {
        parent::Controller();
    }
    
    function _characterExists($name) {
            $this->load->model("character_model");
            if($this->character_model->characterExists($name)) {
                $this->form_validation->set_message('_characterExists', 'This character name already exists, please choose another one!');
                return false;
            }
            else
                return true;
        }
    
    function _checkCity($id) {
        $this->config->load('create_character.php');
        if(!array_key_exists($id, $this->config->item('cities'))) {
            $this->form_validation->set_message('_checkCity', 'Unknown City');
            return false;
        }
        else
            return true;
    }
    
    function _checkWorld($id) {
        $this->config->load('create_character.php');
        if(!array_key_exists($id, $this->config->item('worlds'))) {
            $this->form_validation->set_message('_checkWorld', 'Unknown World');
            return false;
        }
        else
            return true;
    }
    
    function _checkVocation($id) {
        $this->config->load('create_character.php');
        if(!array_key_exists($id, $this->config->item('vocations'))) {
            $this->form_validation->set_message('_checkVocation', 'Unknown Vocation');
            return false;
        }
        else
            return true;
    }
    
    function _checkSex($id) {
        if($id != 0 and $id != 1) {
            $this->form_validation->set_message('_checkSex', 'Unknown Sex');
            return false;
        }
        else
            return true;
    }
    
    function _checkDelay() {
            global $config;
            if(!isset($_SESSION['characterDelay'])) $_SESSION['characterDelay'] = 0;
            if($config['characterDelay']) {
                if(@(time()-$_SESSION['characterDelay']) > 240) {
                    return true;
                }
                else {
                    $this->form_validation->set_message('_checkDelay', 'You cannot create another character just after another. Please wait few minutes.');
                    return false;
                }
            }
            else
                return true;
        }
    
    function _validName($name) {
        require("config.php");
        $name = explode(" ", $name);
            foreach($name as $unit) {
                if(in_array(strtolower($unit), $config['invalidNameTags'])) {
                    $this->form_validation->set_message('_validName', 'Invalid Name');
                    return false;
                }
                else if(strlen($unit) == 1) {
                    $this->form_validation->set_message('_validName', 'Invalid Name');
                    return false;
                }
                else
                    continue;
            }
    }
    
    // Function which make the player more real by tatu hunter
    // Eg: elder'Druid = Elder'Druid
    //       elder'druid = Elder'druid
    //     druid theMaster = Druid themaster
    function strFirst($name) {
        $name = explode(' ', trim($name));
        for($i=0, $t = sizeof($name); $i<$t; ++$i)
            for($j=0, $l=strlen($name[$i]); $j<$l; ++$j)
                !$j ? 
                ($name[$i][$j] = !$i ? ($name[$i][$j] == strtoupper($name[$i][$j]) ? $name[$i][$j] : strtoupper($name[$i][$j])): $name[$i][$j])  : 
                ($name[$i][$j] = ($name[$i][$j-1] == '\'' ? $name[$i][$j] : 
                strtolower($name[$i][$j])));
    
        $ret = '';
        foreach($name as $k)
            $ret .= $k . ' ';
    
        return trim($ret);
    }
    
    function create_character($ajax = 0) {
        require_once("system/application/config/create_character.php");
        global $config;
        global $ide;
        $data['worlds'] = $config['worlds'];
        $data['cities'] = $config['cities'];
        $data['vocations'] = $config['vocations'];
        $this->load->model("character_model");
        $count = $this->character_model->getCount();
        if($count >= $config['maxCharacters'] && $ajax == 1) exit;
        if($count >= $config['maxCharacters']) $ide->redirect(WEBSITE."/index.php/account/index/3");
        $this->load->helper('form');
        $this->load->library('form_validation');
        if($_POST) {
            $_POST['name'] = trim(ucwords(strtolower(decodeString($_POST['name']))));
            $this->form_validation->set_rules('name', 'Player Name', "required|min_length[3]|max_length[20]|nickname|callback__characterExists|callback__validName|callback__checkDelay");
            $this->form_validation->set_rules('city', 'City', 'required|integer|callback__checkCity');
            $this->form_validation->set_rules('world', 'World', 'required|integer|callback__checkWorld');
            $this->form_validation->set_rules('vocation', 'Vocation', 'required|integer|callback__checkVocation');
            $this->form_validation->set_rules('sex', 'Sex', 'required|integer|callback__checkSex');
                
            if($this->form_validation->run() == true) {
                $ide = new IDE;
                $char_to_copy_name = $config['newchar_vocations'][$_POST['world']][$_POST['vocation']];
                $ots = POT::getInstance();
                $ots->connect(POT::DB_MYSQL, connection());
                $char_to_copy = new OTS_Player();
                $char_to_copy->find($char_to_copy_name);
                $this->load->model("character_model");
                /* This code (Most of it actually) has been taken from Gesior AAC. */
                $account_logged = $ots->createObject('Account');
                $account_logged->load($this->character_model->getAccountID());
                if(!$char_to_copy->isLoaded()) {    show_error('Sample character could not be found!'); }
                if($_POST['sex'] == "0")
                $char_to_copy->setLookType(136);
                $player = $ots->createObject('Player');
                $player->setName($this->strFirst($_POST['name']));
                $player->setAccount($account_logged);
                $player->setWorld($_POST['world']);
                $player->setGroup($char_to_copy->getGroup());
                $player->setSex($_POST['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($_POST['city']);
                $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($startPos['x']);
                $player->setPosY($startPos['y']);
                $player->setPosZ($startPos['z']);
                $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->setLossContainers($char_to_copy->getLossContainers());
                $player->save();
                $_SESSION['characterDelay'] = time();
                unset($player);
                $player = $ots->createObject('Player');
                $player->find($_POST['name']);
                if($player->isLoaded())
                {
                    $player->setCustomField('world_id', (int) $_POST['world']);
                    $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();
                    $SQL = POT::getInstance()->getDBHandle();
                    $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']."');");
                        
                    if($ajax == 0)
                        $ide->redirect(WEBSITE.'/index.php/account/index/1');
                    else
                        $ide->criticalRedirect(WEBSITE.'/index.php/account/index/1');
                }
            }
        }
        if($ajax == 1) {
            error(validation_errors());
            $ide->system_stop();
        }
        else
            $this->load->view('create_character', $data);
    }
    
    public function view($name = null) {
        global $config;
        if(!@is_array($_SESSION['sCharacters']))
            $_SESSION['sCharacters'] = array();
        $ide = new IDE;
        if(!empty($name)) {
            $name = decodeString($name);
            $data['character'] = $name;
            $ots = POT::getInstance();
            $ots->connect(POT::DB_MYSQL, connection());
            $player = $ots->createObject('Player');
            $player->find($name);
            if(!$player->isLoaded()) {
                $ide->redirect("../../character/view/");
            }
            else {
                if(!in_multiarray($name, $_SESSION['sCharacters'])) {
                    array_unshift($_SESSION['sCharacters'], array("name"=>$name, "time"=>time()));
                    if(count($_SESSION['sCharacters']) > $config['characterSearchLimit'])
                        array_pop($_SESSION['sCharacters']);
                }
                
                $data['player'] = $player;
                $data['account'] = $player->getAccount();
            }
            $this->load->view('view_character.php', $data);
        }
        else {
            $this->load->helper("form");
                if($_POST) {
                    $name = decodeString($_POST['name']);
                    $ots = POT::getInstance();
                    $ots->connect(POT::DB_MYSQL, connection());
                    $player = new OTS_Player();
                    $player->find($name);
                    if($player->isLoaded()) {
                        $ide->redirect("../character/view/$name");
                    }
                    else {
                        error("$name could not be found.");
                    }
                    
                }
            $this->load->view('character_search.php');
        }
    
    }
    
    public function online() {
        $this->load->helper('form');
        $this->load->model("character_model");
        $data['players'] = $this->character_model->getPlayersOnline();
        $this->load->view("online_players.php", $data);
    }
    
    public function clearHistory() {
            global $ide;
            $_SESSION['sCharacters'] = array();
                echo "History Cleared!";
            $ide->system_stop();
        }
}

?>

e esse é o meu character.php ja tenho 4 site modern e nao tem solução.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo