Ir para conteúdo
  • Cadastre-se

(Resolvido)[WEBSITE] Problema com caracteres especiais


Ir para solução Resolvido por loreal,

Posts Recomendados

  • Moderador

Estou usando o modern acc, como configuro ele para bloquear caracteres especiais na criação de personagens.

Caracteres que quero bloquear @ ~ [ ] ' " -

Alguem sabe onde eu configuro isso ?

function onLove()
if getPlayerTrueLove(girlfriend) then
doPlayerBeHappy(cid, true)
doRemoveVirginity(cid, true)
else
doSendCancel(cid,"you do not know how good it feels to be loved")
end end

;)

 

Link para o post
Compartilhar em outros sites

posta seu createaccount.php

 

ou procure por if(!isset($e['name'])) 

 

e adicione isso em baixo 

if(!isset($e['name'])) {
					foreach(array('@', '~', '[', ']', '-', '"') as $v)
					if($v == substr($s, 0, strlen($v))) {
							$e['name'] = 'Não poder usar esse tipo caracteres!';
							break;
							
							

I like

Link para o post
Compartilhar em outros sites
  • Moderador

<div class='errors'> <?php echo error(validation_errors()); ?> </div>
<?php include("public/js/keyboard.php");
global $config;
?>
<script>
function createAccount() {
$('.loader').show();
var form = $('#createAccount').serialize();
$.ajax({
url: '<?php echo WEBSITE; ?>/index.php/account/create/1',
 type: 'post',
 data: form,
 success: function(data) {
  $('.errors').html(data);
  $('.loader').hide();
 }
});
}
</script>
<link rel="stylesheet" type="text/css" href="<?php echo WEBSITE; ?>/public/css/keyboard.css">
<div class='message'>
<div class='title'>Crie uma Conta</div>
<div class='content'> <?php echo form_open('account/create', array('onSubmit'=>'createAccount(); return false;', 'id'=>'createAccount')); ?>
<fieldset>
<legend >Conta Info</legend>
<div class="table">
<ul style="width:30%">
<li class="even">
<label for="name">Login da Conta:</label>
</li>
<li class="odd">
<label for="nickname">Nickname:</label>
</li>
<li class="even">
<label for="email">E-mail:</label>
</li>
<li class="odd">
<label for="password">Senha:</label>
</li>
<li class="even">
<label for="repeat">Repita:</label>
</li>
</ul>
<ul style="width:70%">
<li class="even">
<input type="text" value="<?php echo set_value('name'); ?>" id="name" class="keyboardInput" name="name"/>
</li>
<li class="odd">
<input type='text' name='nickname' id="nickname" value='<?php echo set_value('nickname'); ?>' />
</li>
<li class="even">
<input  type="text" value="<?php echo set_value('email'); ?>" id="email" name="email"/>
</li>
<li class="odd">
<input type="password" class="keyboardInput" id="password" name="password"/>
</li>
<li class="even">
<input type="password" class="keyboardInput" id="repeat" name="repeat"/>
</li>
</ul>
</div>
</fieldset>
<fieldset>
<legend>Personagem info</legend>
<div class="table">
<ul style="width:30%">
<li class="even">
<label for="character_name">Nome do Personagem:</label>
</li>
<li class="odd">
<label for="sex">Sexo:</label>
</li>
<li class="even">
<label for="vocation">Vocaçao:</label>
</li>
<li class="odd">
<label for="city">Escolha a cidade:</label>
</li>
<li class="even">
<label for="world">Mundo:</label>
</li>
</ul>
<ul style="width:70%">
<li class="even">
<input  type="text" id="character_name" value="<?php echo set_value('character_name'); ?>" name="character_name"/>
</li>
<li class="odd">
<input name="sex" type="radio" id="sex" value="1" checked="checked" />
male &nbsp;
<input type="radio" id="sex" name="sex" value="0" />
female </li>
<li class="even">
<select name="vocation" class="keyboardInput" id="vocation">
<option value="1">Goku</option>
<option value="6">Gohan</option>
<option value="76">Goten</option>
<option value="2">Vegeta</option>
<option value="7">Trunks</option>
<option value="78">Chibi Trunks</option>
<option value="12">Brolly</option>
<option value="3">Piccolo</option>
<option value="5">Android C17</option>
<option value="13">Android C18</option>
<option value="9">Freeza</option>
<option value="8">Cell</option>
<option value="10">Buu</option>
<option value="11">Tsuful</option>
<option value="91">Cooler</option>
<option value="100">Bardock</option>
<option value="105">Uub</option>
<option value="109">Dende</option>
<option value="303">Pan</option>
<option value="314">Janemba</option>
<option value="324">Shin</option>
<option value="353">Kuririn</option>
<option value="343">Tenshin</option>
<option value="333">Videl</option>
</select>
</li>
<li class="odd">
<select name="city" id="city">
<?php 
foreach($config['cities'] as $city => $name)  
echo '<option value="'.$city.'">'.$name.'</option>'; ?>
</select>
</li>
<li class="even">
<?php 
if(sizeof($config['worlds']) > 1) { ?>
<select name="world" id="world">
<?php
foreach($config['worlds'] as $world => $name)  
echo '<option value="'.$world.'">'.$name.'</option>'; ?>
</select>
<?php }else{ ?>
<input type="hidden" name="world" value="0" />
<?php echo $config['worlds'][0]; ?>
<?php } ?>
</li>
</ul>
</div>
</fieldset>
<fieldset>
<legend>Security image</legend>
<div class="table">
<ul style="width: 30%">
<li class="even">
 
</li>
<li class="even">
<label>Captcha World</label>
</li>
</ul>
<ul style="width: 70%">
<li class="even">
<?php echo $captcha;?>
</li>
<li class="even">
<input type='text' name='captcha'/> 
</li>
</ul>
</div>
</fieldset>
<br/>
<label>&nbsp;</label>
<input class='sub' type="submit" value="Criar conta"/>
<?php echo loader(); ?>
</form>
</div>
<div class='bar'>Criando sua conta você concorda com as <a href='#' onClick='$("#rules").toggle(500);'>REGRAS</a> do servidor.</div>
</div>
<div id='rules' style='margin-top: 10px; width: 100%; height: 300px; overflow: auto; display: none;'><?php echo nl2br(getContent("system/rules.php")); ?></div>

 

function onLove()
if getPlayerTrueLove(girlfriend) then
doPlayerBeHappy(cid, true)
doRemoveVirginity(cid, true)
else
doSendCancel(cid,"you do not know how good it feels to be loved")
end end

;)

 

Link para o post
Compartilhar em outros sites
  • Solução

tenta assim

 

<div class='errors'> <?php echo error(validation_errors()); ?> </div>
<?php include("public/js/keyboard.php");
global $config;
?>
<script>
function createAccount() {
$('.loader').show();
var form = $('#createAccount').serialize();
$.ajax({
url: '<?php echo WEBSITE; ?>/index.php/account/create/1',
 type: 'post',
 data: form,
 success: function(data) {
  $('.errors').html(data);
  $('.loader').hide();
 }
});
}
</script>
<link rel="stylesheet" type="text/css" href="<?php echo WEBSITE; ?>/public/css/keyboard.css">
<div class='message'>
<div class='title'>Crie uma Conta</div>
<div class='content'> <?php echo form_open('account/create', array('onSubmit'=>'createAccount(); return false;', 'id'=>'createAccount')); ?>
<fieldset>
<legend >Conta Info</legend>
<div class="table">
<ul style="width:30%">
<li class="even">
<label for="name">Login da Conta:</label>
</li>
<li class="odd">
<label for="nickname">Nickname:</label>
</li>
<li class="even">
<label for="email">E-mail:</label>
</li>
<li class="odd">
<label for="password">Senha:</label>
</li>
<li class="even">
<label for="repeat">Repita:</label>
</li>
</ul>
<ul style="width:70%">
<li class="even">
<input type="text" value="<?php echo set_value('name'); ?>" id="name" class="keyboardInput" name="name"/>
</li>
<li class="odd">
<input type='text' name='nickname' id="nickname" value='<?php echo set_value('nickname'); ?>' />
<?php
if(!isset($e['name'])) {
foreach(array('@', '~', '[', ']', '-', '"') as $v)
if($v == substr($s, 0, strlen($v))) {
$e['name'] = 'Não poder usar esse tipo caracteres!';
break; ?>
</li>
<li class="even">
<input  type="text" value="<?php echo set_value('email'); ?>" id="email" name="email"/>
</li>
<li class="odd">
<input type="password" class="keyboardInput" id="password" name="password"/>
</li>
<li class="even">
<input type="password" class="keyboardInput" id="repeat" name="repeat"/>
</li>
</ul>
</div>
</fieldset>
<fieldset>
<legend>Personagem info</legend>
<div class="table">
<ul style="width:30%">
<li class="even">
<label for="character_name">Nome do Personagem:</label>
</li>
<li class="odd">
<label for="sex">Sexo:</label>
</li>
<li class="even">
<label for="vocation">Vocaçao:</label>
</li>
<li class="odd">
<label for="city">Escolha a cidade:</label>
</li>
<li class="even">
<label for="world">Mundo:</label>
</li>
</ul>
<ul style="width:70%">
<li class="even">
<input  type="text" id="character_name" value="<?php echo set_value('character_name'); ?>" name="character_name"/>
</li>
<li class="odd">
<input name="sex" type="radio" id="sex" value="1" checked="checked" />
male &nbsp;
<input type="radio" id="sex" name="sex" value="0" />
female </li>
<li class="even">
<select name="vocation" class="keyboardInput" id="vocation">
<option value="1">Goku</option>
<option value="6">Gohan</option>
<option value="76">Goten</option>
<option value="2">Vegeta</option>
<option value="7">Trunks</option>
<option value="78">Chibi Trunks</option>
<option value="12">Brolly</option>
<option value="3">Piccolo</option>
<option value="5">Android C17</option>
<option value="13">Android C18</option>
<option value="9">Freeza</option>
<option value="8">Cell</option>
<option value="10">Buu</option>
<option value="11">Tsuful</option>
<option value="91">Cooler</option>
<option value="100">Bardock</option>
<option value="105">Uub</option>
<option value="109">Dende</option>
<option value="303">Pan</option>
<option value="314">Janemba</option>
<option value="324">Shin</option>
<option value="353">Kuririn</option>
<option value="343">Tenshin</option>
<option value="333">Videl</option>
</select>
</li>
<li class="odd">
<select name="city" id="city">
<?php 
foreach($config['cities'] as $city => $name)  
echo '<option value="'.$city.'">'.$name.'</option>'; ?>
</select>
</li>
<li class="even">
<?php 
if(sizeof($config['worlds']) > 1) { ?>
<select name="world" id="world">
<?php
foreach($config['worlds'] as $world => $name)  
echo '<option value="'.$world.'">'.$name.'</option>'; ?>
</select>
<?php }else{ ?>
<input type="hidden" name="world" value="0" />
<?php echo $config['worlds'][0]; ?>
<?php } ?>
</li>
</ul>
</div>
</fieldset>
<fieldset>
<legend>Security image</legend>
<div class="table">
<ul style="width: 30%">
<li class="even">
 
</li>
<li class="even">
<label>Captcha World</label>
</li>
</ul>
<ul style="width: 70%">
<li class="even">
<?php echo $captcha;?>
</li>
<li class="even">
<input type='text' name='captcha'/> 
</li>
</ul>
</div>
</fieldset>
<br/>
<label>&nbsp;</label>
<input class='sub' type="submit" value="Criar conta"/>
<?php echo loader(); ?>
</form>
</div>
<div class='bar'>Criando sua conta você concorda com as <a href='#' onClick='$("#rules").toggle(500);'>REGRAS</a> do servidor.</div>
</div>
<div id='rules' style='margin-top: 10px; width: 100%; height: 300px; overflow: auto; display: none;'><?php echo nl2br(getContent("system/rules.php")); ?></div>

 

 

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

I like

Link para o post
Compartilhar em outros sites
  • Moderador

Erro Parse error: syntax error, unexpected $end in C:\xampp\htdocs\system\application\views\create.php on line 177

function onLove()
if getPlayerTrueLove(girlfriend) then
doPlayerBeHappy(cid, true)
doRemoveVirginity(cid, true)
else
doSendCancel(cid,"you do not know how good it feels to be loved")
end end

;)

 

Link para o post
Compartilhar em outros sites
  • Moderador

Obrigado funcionou reputado.

function onLove()
if getPlayerTrueLove(girlfriend) then
doPlayerBeHappy(cid, true)
doRemoveVirginity(cid, true)
else
doSendCancel(cid,"you do not know how good it feels to be loved")
end end

;)

 

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