Custom MapleStory UserCP / Login Script.

Status
Not open for further replies.
Elite Diviner
Joined
Feb 28, 2007
Messages
446
Reaction score
4
MapleStory UserCP (Login Script)
What is this script / project about? My main goal is to provide an easy to use script that will allow your users to log-into and check up on server updates and such, while providing server status and character information from the database (MySQL), along with a comprehensive admin control panel to maintain your users with out the needed to edit the database directly.

Task List Blue = 100% Done Red = Almost Done Orange = TBD (To be done)

- Login part

  • - Form - 100% Done.
  • - PHP sessions - 100% Done.
  • - Session member pages - 100% Done.
  • - Language translator - 80% Done. (Thanks Murad )

- Member Area


  • - Ranking - 50% Done. (Need to fix the SQL query)
  • - Welcome message with PHP session. Example "Welcome asdaa You have logged in successfully" 100% Done.
- Logout


  • - Destroy sessions - 100% Done.
  • - Return you to index to relog after 3 seconds - 100% Done.
- Admin Area

  • - User Management (Deletion, change username, server updates) 0% Done.

What will it look like? There will currently be NO style to this.
Why? So you can use it directly into your own websites theme / Layout.
 
Last edited:
My whole issue this, I'm trying to display the users character information once they login but since that requires grabbing data from more than one table, I'm not sure on how to do, I never tried it o_o

This is what I have so far, I know its wrong Lol. I was experimenting.

PHP:
<?
/*
Created by Amanda of Ragezone, and AmoraMS owner. Please do not recreate this software with out asking first
Email : [email protected]
*/
//================
// Session Start
//================
session_start(); 
$myuser = $_SESSION['name'];
if(!session_is_registered(name)){
header("location:index.php");
}
?>
<html>
<body>
Coming Soon<br>(<?php echo $myuser;?> You have Logged in Successfully)
<a href="./logout.php">Logout</a><br>
</body>
</html>
<?php
//================
    // SQL Query
    //================
    include("./includes/config.php");
    $result = mysql_query('SELECT `id` FROM `odinms`.`accounts` WHERE `name`="'.$myuser.'"') or die(mysql_error());
    $find_id = mysql_fetch_array($result);
    $_SESSION['id'] = $find_id['id'];
    $query = mysql_query('SELECT `name` FROM `odinms`.`characters` WHERE `id`="'.$_SESSION['id'].'"') or die(mysql_error());
?>
<center>My, AmoraMS DB information
    <table border="0">
    <tr>
        <th>Username</th>
        <th>ID</th>
        <th>Character</th>
    </tr>
    <?php
        if(mysql_num_rows($query)<1) die( 'There are no results :( -> ' . $query . '<br />');
        
        while($row2 = mysql_fetch_array($query))
        {
        
            echo '
    <tr>
        <td>' . $myuser . '</td>
        <td>' . $_SESSION['id'] . '</td>
        <td>' . $row2['name'] . '</td>
    </tr>';
            
        }
        //================
        // End
        //================
    
    ?>
    </table>
</center>
 
I believe i should be :

Code:
 $result = mysql_query("SELECT * FROM `characters` WHERE `id`="'.$_SESSION['id'].`") or die(mysql_error());

Or somthing around the lines of that. Good luck!
 
PHP:
mysql_query("SELECT level, exp,gender,hair,fame,face,rank,rankmove,jobrank,jobrankmove,pvpkills,pvpdeaths FROM 'characters'")

Something like that.

Edit: @MapleReleck, I was, but I quit MapleDEV.

Believe what you wanna believe, I honestly could care less.

Edit2: Whipped this up.

PHP:
				if($row[job] == 0)
					echo "
							<img src='images/beginner.gif' alt='Beginner' />";
				if($row['job'] >= 100 && $row['job'] < 200)
					echo "
							<img src='images/warrior.gif' alt='Warrior' />";
				if($row['job'] >= 200 && $row['job'] < 300)
					echo "
							<img src='images/magician.gif' alt='Magician' />";
				if($row['job'] >= 300 && $row['job'] < 400)
					echo "
							<img src='images/bowman.gif' alt='Bowman' />";
				if($row['job'] >= 400 && $row['job'] < 500)
					echo "
							<img src='images/thief.gif' alt='Thief' />";
				if($row['job'] >= 500 && $row['job'] < 600)
					echo "
							<img src='images/pirate.gif' alt='Pirate' />"; 
				if($row['job'] >= 900 && $row['job'] < 1000)
					echo "
							<img src='images/gm.gif' alt='GM' />";

Not sure if it'll work, did this quick.
 
PHP:
mysql_query("SELECT level, exp,gender,hair,fame,face,rank,rankmove,jobrank,jobrankmove,pvpkills,pvpdeaths FROM 'characters'")

Something like that.

Edit: @MapleReleck, I was, but I quit MapleDEV.

Believe what you wanna believe, I honestly could care less.

Edit2: Whipped this up.

PHP:
				if($row[job] == 0)
					echo "
							<img src='images/beginner.gif' alt='Beginner' />";
				if($row['job'] >= 100 && $row['job'] < 200)
					echo "
							<img src='images/warrior.gif' alt='Warrior' />";
				if($row['job'] >= 200 && $row['job'] < 300)
					echo "
							<img src='images/magician.gif' alt='Magician' />";
				if($row['job'] >= 300 && $row['job'] < 400)
					echo "
							<img src='images/bowman.gif' alt='Bowman' />";
				if($row['job'] >= 400 && $row['job'] < 500)
					echo "
							<img src='images/thief.gif' alt='Thief' />";
				if($row['job'] >= 500 && $row['job'] < 600)
					echo "
							<img src='images/pirate.gif' alt='Pirate' />"; 
				if($row['job'] >= 900 && $row['job'] < 1000)
					echo "
							<img src='images/gm.gif' alt='GM' />";

Not sure if it'll work, did this quick.


It should..... But then you would need to define $row
 
ohshit, made a mistake.

if($row[job] == 0)
echo "

Should be

if($row['job'] == 0)
echo "

Edit: also, no problem.

Edit2:

I guess last contribution, getting tired, and lazy

PHP:
				if ($row['job']=="000")
					echo "Beginner";
				if ($row['job']=="100")
					echo "Warrior";
				if ($row['job']=="110")
					echo "Fighter";
				if ($row['job']=="120")
					echo "Page";
				if ($row['job']=="130")
					echo "Spearman";
				if ($row['job']=="111")
					echo "Crusader";
				if ($row['job']=="121")
					echo "White Knight";
				if ($row['job']=="131")
					echo "Dragon Knight";
				if ($row['job']=="112")
					echo "Hero";
				if ($row['job']=="122")
					echo "Paladin";
				if ($row['job']=="132")
					echo "Dark Knight";
				if ($row['job']=="200")
					echo "Magician";
				if ($row['job']=="210")
					echo "F/P Wizard";
				if ($row['job']=="220")
					echo "I/L Wizard";
				if ($row['job']=="230")
					echo "Cleric";
				if ($row['job']=="211")
					echo "F/P Mage";
				if ($row['job']=="221")
					echo "I/L Mage";
				if ($row['job']=="231")
					echo "Priest";
				if ($row['job']=="212")
					echo "F/P Arch Mage";
				if ($row['job']=="222")
					echo "I/L Arch Mage";
				if ($row['job']=="232")
					echo "Bishop";
				if ($row['job']=="300")
					echo "Bowman";
				if ($row['job']=="310")
					echo "Hunter";
				if ($row['job']=="320")
					echo "Crossbowman";
				if ($row['job']=="311")
					echo "Ranger";
				if ($row['job']=="321")
					echo "Sniper";
				if ($row['job']=="312")
					echo "Bow Master";
				if ($row['job']=="322")
					echo "Marksman";
				if ($row['job']=="400")
					echo "Thief";
				if ($row['job']=="410")
					echo "Assassin";
				if ($row['job']=="420")
					echo "Bandit";
				if ($row['job']=="411")
					echo "Hermit";
				if ($row['job']=="421")
					echo "Chief Bandit";
				if ($row['job']=="412")
					echo "Night Lord";
				if ($row['job']=="422")
					echo "Shadower";
				if ($row['job']=="500")
					echo "Pirate";
				if ($row['job']=="510")
					echo "Brawler";
				if ($row['job']=="520")
					echo "Gunslinger";
				if ($row['job']=="511")
					echo "Marauder";
				if ($row['job']=="521")
					echo "Buccaneer";
				if ($row['job']=="512")
					echo "Outlaw";
				if ($row['job']=="522")
					echo "Corsair";
				if ($row['job']=="900")
					echo "GM";
				if ($row['job']=="910")
					echo "SuperGM";
 
Status
Not open for further replies.
Back