Jump to content
MakeWebGames

GRPG Hitlist


CodingKid

Recommended Posts

Hi guys,

This is a pretty basic hitlist that I have coded just to show my coding a little, took me around 2 hours to complete in total and I have tested the majority a little and it all seems to work from what I gather but I have not fully tested so their might be a little issue in there or two.

Features:

  • The ability to list a user for someone to do a hit on.
  • The ability to give a prize to whoever does your hit.
  • The ability to attack someone and complete the hit and get the prize.

Installation

Step One:

Insert these SQL's into phpmyadmin:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Step Two:

create a file called hitlist.php and paste the code in below:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Step Three

Open up classes.php and just above class User_Stats { paste:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Then open up your attack.php file and paste into the attack won section:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

And that should be everything! If you find any errors or issues then please let me know and I will ammend them as soon as possible.

hit.jpg.0af44cbc20e1f105a59db2dc0d082a7c.jpg

hit2.jpg.fa41179045132f99b166d3348940b6d3.jpg

Edited by adamhull
Link to comment
Share on other sites

It's nice, however your class lacks the reason of using a class - if that makes sense.

I would re-arrange your class structure, and make it more object-oriented (although there is only so much you can do with just two methods)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

It's nice, however your class lacks the reason of using a class - if that makes sense.

I would re-arrange your class structure, and make it more object-oriented (although there is only so much you can do with just two methods)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Yes the way you have approached the class is much better than the way I did and I also understand what your saying about the class lacking the reason of being a class.

I did think that maybe using a class was a little overkill for what the system was actually doing but if it were to be expanded or used elsewhere then having the class just makes it that little easier.

Link to comment
Share on other sites

  • 1 month later...

A couple of things i changed as a choice and a couple are important i think.

1) Secure the $reason better. I also used strip tags and it seemed to stop java popups i was otherwise able to create.

2) Add csrf protection to the form. Not sure it really matters but i am trying to do it to all forms. Would love clarification on that.

3) Limit $reason characters. Because i was able to add a truck load of characters and corrupt the table. Atleast i think thats what did it. Either way a limit should be there.

4) Prevent non existent ids from being added. Obvious reasons for that.

5) Limit the amount of hits per user. Otherwise people could just go stupid and add thousands.

I know i am being picky on some things but i just feel to make a hitlist complete it needs most of them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...