-
[PHP]Account, character and clan self-management usefull includes.
Okay so, here is some old files (it's coming from my second website) so it's possible that code is unreadable because i was young when i maded it.
http://filebeam.com/1699d19df5e4910b32aa37b8ec1c9281
Password: oldstuff
How adding it to a themplate:
PHP Code:
<?PHP
if(file_exists('./inc/inc_'. $_GET['a'] .'.php')) {include('./inc/inc_'. $_GET['a'] .'.php'); }
elseif($_GET['a'] == '') {include('./inc/inc_login.php');}
else{echo 'This page does not exist !';}
?>
You only need to put this at the content part and for each time you gonna use ?a=x, x gonna be the content in ./inc/inc_x.php so you guess that if i change x for login or any other page in inc folder it's gonna change the cotent for this page.
Exemple:
If i execute url mysite.com/?a=login, content will be the login.
What it contain ?
-Login
-Password change
-Contry change
-Age change
-Character name change
-Hair change
-Face change
-Complet clan management
-Emblem upload
And alot of little stuff like that.
Owh and you'll need to change ODBC connection option in odbc.php and edit $CEURL in inc_clan.php. Don't forget to start a session.
Dot.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Thanks for the released
/Thanked
-
Re: [PHP]Account, character and clan self-management usefull includes.
gettin some good releases these days, i'm liking it...
-
Re: [PHP]Account, character and clan self-management usefull includes.
Good weed make me release good thing. :):
-
Re: [PHP]Account, character and clan self-management usefull includes.
Nice, this is useful thanks.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Dude, rename yourself to KushAddict or sumtin.
OT- I love you man, nice release..
-
Re: [PHP]Account, character and clan self-management usefull includes.
I have logged the error ..
[Wrong security code !]
-
Re: [PHP]Account, character and clan self-management usefull includes.
Love the release.
Keep it up!
-
Re: [PHP]Account, character and clan self-management usefull includes.
Quote:
Originally Posted by
rntpwn1212
I have logged the error ..
[Wrong security code !]
session_start(); or just put it automatic on php.ini "session.auto_start = 1" and don't forget to create a folder for your sessions by changig this 'session.save_path = "C:/SESSIONS/"' and create a folder named SESSIONS in C:\.
-
Re: [PHP]Account, character and clan self-management usefull includes.
-
Re: [PHP]Account, character and clan self-management usefull includes.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Oh good job, the only thing im interesting in is the clan management stuff, but other than that, nice... /Thanked
-
Re: [PHP]Account, character and clan self-management usefull includes.
I got this working although Im only interested in clan management aswell ^^
Under
add
In these files.
inc/inc_auth.php
inc/inc_clan.php
inc/inc_client.php
inc/inc_logout.php
-
Re: [PHP]Account, character and clan self-management usefull includes.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Quote:
Originally Posted by
Dude3889
I got this working although Im only interested in clan management aswell ^^
Under
add
In these files.
inc/inc_auth.php
inc/inc_clan.php
inc/inc_client.php
inc/inc_logout.php
PHP Code:
<?PHP
session_start();
if(file_exists('./inc/inc_'. $_GET['a'] .'.php')) {include('./inc/inc_'. $_GET['a'] .'.php'); }
elseif($_GET['a'] == '') {include('./inc/inc_login.php');}
else{echo 'This page does not exist !';}
?>
-
Re: [PHP]Account, character and clan self-management usefull includes.
thank you! btw is this sql injectable?
-
Re: [PHP]Account, character and clan self-management usefull includes.
No, anti sql injection..
PHP Code:
//The well-known antisql injection. Bad enough, it's needed.
function antisql($sql) {
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|--|\\\\)/"),"",$sql);
$sql = str_replace("'", "''", $sql);
$sql = trim($sql);
$sql = strip_tags($sql);
$sql = addslashes($sql);
return $sql;
}
-
Re: [PHP]Account, character and clan self-management usefull includes.
hmm.. I cannot login for some reason... I have put the correct info and the code and still won't login :S.
-
Re: [PHP]Account, character and clan self-management usefull includes.
sessions probably.. or odbc connection error..
-
Re: [PHP]Account, character and clan self-management usefull includes.
Quote:
Originally Posted by
belette321
PHP Code:
<?PHP
session_start();
if(file_exists('./inc/inc_'. $_GET['a'] .'.php')) {include('./inc/inc_'. $_GET['a'] .'.php'); }
elseif($_GET['a'] == '') {include('./inc/inc_login.php');}
else{echo 'This page does not exist !';}
?>
sense you added session_start();
inside inc_auth.php you will get conflicting errors.
But the above script isn't useful if your adding it a website
cause most sites already have the login. What ive done is strip
it down and changed the session and just included it into my
current control panel and added session_start();
-
Re: [PHP]Account, character and clan self-management usefull includes.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Quote:
Originally Posted by
Dude3889
sense you added session_start();
inside inc_auth.php you will get conflicting errors.
But the above script isn't useful if your adding it a website
cause most sites already have the login. What ive done is strip
it down and changed the session and just included it into my
current control panel and added session_start();
If you put it in my file you no more need to put the session_start(); inside inc_auth.php, inc_client.php, inc_clan.php or inc_logout... because it will initialize session for each page.
-
Re: [PHP]Account, character and clan self-management usefull includes.
The coding is pretty messy and some small things I wouldn't of done, but I'm only moderately knowledged in PHP so idk. Good release though not much is released around here lately.
-
Re: [PHP]Account, character and clan self-management usefull includes.
Quote:
Originally Posted by
belette321
No, anti sql injection..
PHP Code:
//The well-known antisql injection. Bad enough, it's needed.
function antisql($sql) {
$sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|--|\\\\)/"),"",$sql);
$sql = str_replace("'", "''", $sql);
$sql = trim($sql);
$sql = strip_tags($sql);
$sql = addslashes($sql);
return $sql;
}
Remember the function sql_regcase for php 5.3. is deprecated.
Thanks for the release