• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior character creation date.

Lucenzo

The Way You Move :)
Joined
Jan 29, 2011
Messages
363
Reaction score
14
Location
UK
Heya


I have this
PHP:
 $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>';

But for some reason all characters have creation date "Created: 1 January 1970, 1:00 am"

How can i fix the date of creation?

Thanks x x
 
Hey, me again :p


There seems to be a small problem with people who have characters with ' in their nicks.
for example Hashi'ma, the page goes blank and it's only for those with names (') that are not working :p

Any ideas?

Thanks x x
 
shouldn't have allowed them in the first place. they're not allowed in real tibia.
Code:
WHERE players.name=\''.[B][COLOR="red"]mysql_escape_string([/COLOR][/B]$name[B][COLOR="red"])[/COLOR][/B].'\' AND
 
Hint about this in rules. :)
Simply add for ex. simple statment:

in your character creation code.
I used this:
PHP:
	elseif(preg_match('/[^a-zA-Z ]/', $s))
		$e['name'] = 'This name contains invalid letters. Please use only A-Z, a-z and space!';
 
I decided to keep the old creation page, as it has town support and few other things working, blocking illegal names for e.g Account Manager, and whatever names i desire in config.php

What you did looks great in the other thread but dislike missing towns support! :L

Also not sure what is the layout you provided for in your download? i have added .php file and the account folder and it seems to work fine without any errors or bugs? :p
So not sure why the layout? x x

Cheers x x
 
Aeron.mine.nu

Don't think he uses the layout that i do.
This happend while ex-changing layout.php file.
 
Where do i add this ? :L

PHP:
WHERE players.name=\''.mysql_escape_string($name).'\' AND

Hope this can fix the ' < bug.
 
add the function around the original part in the script (line 6)
Code:
	$p = $SQL->query('SELECT players.id,players.name,world_id,players.group_id,account_id,level,vocation,town_id,sex,lastlogin,rank_id,online,marriage,promotion,deleted,old_name,hide_char,comment'.($config['server']['freePremium'] ? '' : ',premdays,lastday').',accounts.created,rlname,location FROM players,accounts WHERE players.name=\''.mysql_escape_string($name).'\' AND players.account_id=accounts.id LIMIT 1')->fetch();
 
Last edited:
Back
Top