Jump to content

bearruler

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.KingdomsDivided.com

Profile Information

  • Gender
    Not Telling

bearruler's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. JavaScript is executed by the web browser after the entire page has loaded. You could just send them to a different location, but they could easily get around it by disabling JavaScript. If you want to keep someone out of somewhere, use server-side authentication. Bruce
  2. Which would put less load on the server? Bear
  3. I'm not exactly sure how to ask this, so I'm going to try to give an example I have an operation that will be run by cron, so I don't want it to be too heavy As of now, It loops though everyone Each time the file is run, the "Employees" gets 100% of the bosses income, divided amoung themselves. The bosses income does not include the bonus he gets from HIS boss. So [table] [tr] [td]employee[/td] [td]boss[/td] [td]income[/td] [td]money[/td] [/tr] [tr] [td]10000[/td] [td]0[/td] [td]100000[/td] [td]0[/td] [/tr] [tr] [td]10001[/td] [td]10000[/td] [td]50000[/td] [td]0[/td] [/tr] [tr] [td]10002[/td] [td]10001[/td] [td]10000[/td] [td]0[/td] [/tr] [tr] [td]10003[/td] [td]10001[/td] [td]5000[/td] [td]0[/td] [/tr] [/table] 0 means they have no boss And of course, this would never happen in a real world senario. Without the boss bonus, it is a simple [code]$sql="Update `table` SET `money`=`money`+`income`";[/code] However, I need to give the people with bosses x% of their bosses income Employee 10000 gets his striaght income because he has no boss Employee 10001 gets his income (50,000) PLUS his boss bonus. Since 10001 is the only one whos boss is 10000, he gets 100% (100,000). So he gets a total of 150,000 Employee 10002 gets his income (10,000) Plus his boss bonus. This time, there are two people who split it. He gets 50,000 / 2 = 25,000. His total is 35,000 Employee 10003 is the same as above, except he gets only 5,000 plus his 25,000 bonus. I'm not really sure if this is possible, as it becomes multiple queries within a query.... Thanks, Bear
  4. My site works fine in IE and FF when its in the subdomain of my main domain (http://t2.knightsdivine.net/). The problem is, it doesnt put the bottom menu fixed on the bottom when its in a masked .co.nr domain name (http://troop2.co.nr) in Internet Explorer. Firefox works fine everywhere. I pasted the source code from the .co.nr domain name into http://t2.knightsdivine.net/test.php and that works fine too. Its only when its in the .co.nr domain name in IE... Is there any way to fix that? I'd leave it as is, but 99% of the people using the site are IE users :( Thanks Bear
  5. I tried everything in there, it returns 1 for things like bearruler, but also names like bea$$rruler Bear
  6. I have a little experience with Regular expressions, but this one is just pissing me off Im sure its so simple, but everything I have tried/found doesnt work All I need is a simple pattern to validate names on my website. Names can have letters (case doesnt matter, must start in a letter), numbers, underscores, and dashes Allowed names: bearruler bearruler129 bear_ruler bear-ruler be-ar_ru13r Illegal names: _bearruler bear ruler 129bearruler bear@ruler bearru|er {bearruler} You get the point... Anyway, the php should be [code] $name="The Name They are attempting to use"; $pattern='thepattern'; if (preg_match($pattern, $name)) echo "ok"; //etc... [/code] Does anyone know a pattern that will fit this? Thanks, Bear
  7. Haha dont worry about offending me, thats why I posted here. I am "artisticly retarded" Anyway, I have done some work with what you suggested (killing BG image, making colors better, redoing my css file, better html) When I get the next draft out Ill post that. I have the main page done, except for the news portion which Ill need to play around with. I was thinking most pages will follow easily. I still have work to do on the left menu and the top banner Thanks for your help so far Bear
  8. When you echo a line, you cant have quotes in that line. php will see those quotes as ending the text its echoing, and going back into php syntax To echo a quote character, use \" [code] echo "<table border="0" cellpadding="0" cellspacing="2" width="510" class="pageoutline">"; [/code] Should be [code] echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"510\" class=\"pageoutline\">"; [/code] or [code] echo "<table border=0 cellpadding=0 cellspacing=2 width=510 class=pageoutline>"; [/code] or [code] ?><table border="0" cellpadding="0" cellspacing="2" width="510" class="pageoutline"><? [/code] And this is the mysql (database) forum. Syntax errors should go in the basic php help forum Bear
  9. I have been working on my game for a few months now Unfortunatly, I have had a semi-difficult time drawing in new players First of all, I code, I dont design. The layout of the game isnt great and I would love it if anyone had some pointers to make it look alittle nicer Second of all, I was wondering if anyone had any feature ideas Finally, If anyone had any Ideas of how to recruit more players, that would be great ;) It really annoys me that games who actually bought the code (which was ripped from another online game) and changed the logo and name have thousands of players... Thanks for your help, Bear www.KnightsDivine.net
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.