Jump to content
MakeWebGames

Seker

Members
  • Posts

    579
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Seker

  1. I had to re-do my staff edit user function because it just wasn't working for some reason. Now, after re-doing it, it's still not working. It says "User Edited" but it just doesn't do anything. Can anyone spot anything obvious?   function edit_user_form() { global $c, $h; $user = abs((INT) $_POST['user']); $d = mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us on u.userid=us.userid WHERE u.userid={$user}", $c); if ($_POST['nusername']) { $energy = 10 + $_POST['nlevel'] * 2; $nerve = 3 + $_POST['nlevel'] * 2; $hp = 50 + $_POST['nlevel'] * 50; mysql_query("UPDATE users SET username='{$_POST['nusername']}',level={$_POST['nlevel']},money={$_POST['nmoney']},crystals={$_POST['ncrystals']},energy=$energy,brave=$nerve,maxbrave=$nerve,maxenergy=$energy,hp=$hp,maxhp=$hp,hospital={$_POST['nhospital']},jail={$_POST['njail']},gang={$_POST['ngang']},donatordays={$_POST['ndonatordays']},display_pic='{$_POST['ndisplay_pic']}',bankmoney={$_POST['nbankmoney']} WHERE userid={$user}") or die(mysql_error()); mysql_query("UPDATE userstats SET strength={$_POST['nstrength']},agility={$_POST['nagility']},guard={$_POST['nguard']},labour={$_POST['nlabour']},IQ={$_POST['nIQ']} WHERE userid={$user}") or die(mysql_error()); print "User Edited!"; } else { $ue = mysql_fetch_array($d); if ($ue['display_pic']) { $pic = $ue['display_pic']; } else { $pic = "http://districtwars.net/pics/default.png"; } print " <table width='590px' border='2'> <tr> <td align='center'> <form action='new_staff.php?action=edituserform' method='post' /> Username: <input type='text' name='nusername' value='{$ue['username']}' /><br /> Level: <input type='text' name='nlevel' value='{$ue['level']}' /><br /> Gold: <input type='text' name='nmoney' value='{$ue['money']}' /><br /> Tokens: <input type='text' name='ncrystals' value='{$ue['crystals']}' /><br /> Hospital Time: <input type='text' name='nhospital' value='{$ue['hospital']}' /><br /> Jail Time: <input type='text' name='njail' value='{$ue['jail']}' /><br /> Gang ID: <input type='text' name='ngang' value='{$ue['gang']}' /><br /> Donator Days: <input type='text' name='ndonatordays' value='{$ue['donatordays']}' /><br /> Display Pic: <input type='text' name='ndisplay_pic' value='{$pic}' /><br /> Gold Storage: <input type='text' name='nbankmoney' value='{$ue['bankmoney']}' /><br /> Strength: <input type='text' name='nstrength' value='{$ue['strength']}' /><br /> Agility: <input type='text' name='nagility' value='{$ue['agility']}' /><br /> Guard: <input type='text' name='nguard' value='{$ue['guard']}' /><br /> Labour: <input type='text' name='nlabour' value='{$ue['labour']}' /><br /> IQ: <input type='text' name='nIQ' value='{$ue['IQ']}' /><br /> <input type='submit' value='Edit User' /></form> </td> </tr> </table>"; } }
  2. Now, now, Spanky. Did I say anything about selling? Redistributing is redistributing. And you have no right to do so, no matter the circumstances. Macroing programs are legitimate programs, even when used for illegitimate purposes. Period.
  3. Regardless of what it was used for, you still paid for that. You can't go around giving it to people. Haven't you learned anything?
  4. So, someone's framing you? If that's the case, I still reference karma.
  5. I think your problem could be the ever present "Karma Chameleon." Note: I'm not saying skooda tried the very same thing on District Wars. But I am saying the IP's of the 30-ish accounts created matched his.
  6. I think you could do this just by adding a secondary location field to your cities table. Then, just modify the queries to suit.
  7. I can't really get behind any of the shows since I saw Cavalcade Of Cartoon Comedy. That's where you need to look. Seth's work only gets better uncensored.
  8. $db->query("UPDATE users SET rank=rank+1 WHERE(laston >= (" . time() . "-(15*60)))");   Maybe? Not sure, though.
  9. I was growing some grapes. This being the desert, they die off pretty fast if you don't stay on the watering every day. They were brittle, broken, and almost certainly dead. After a week of heavy watering twice a day, alas, they sprung back to life, green and full as ever. Just saying. It's not dead until it's dead.
  10. Well, I've since re-vamped the login and register page, as well as a huge "graphical" upgrade in game. The playerbase is slowly increasing. New features are in the works, as well as being added almost daily. Overall, I'm happy with the direction it's taking. I feel like it's shaping into what I had envisioned at the start of the project.
  11. I've actually fixed this and since changed my register page again. However, if anyone runs into a similar problem, the issue was using a php variable inside the html form. The solution was changing: <input type="hidden" name="ref" value='{$fref}'>   To: <input type="hidden" name="ref" value='<?php $fref ?>'>   Can't believe I stared at that for hours and couldn't figure it out.
  12. Didn't even see that. Yeah, that would likely fix you right up. Hah
  13. Change :   WHERE `userid` = ('%u')",   To:   WHERE (`userid` = %u)" ,   Error: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `userid` = ('1')' at line 6 Query was UPDATE `users` SET `money` = `money` - '40', `investPROFIT` = '0', `investSTART` = unix_timestamp(), `investLENGTH` = '0', `investDAYS` = '0', WHERE `userid` = ('1')
  14. Okay, when I re-worked my register page, I must have mangled something or misplaced something. As of right now, referals are not working. It's not inserting anything. It's not giving any errors. Just not working. Does anyone see anything really obvious I missed? (Note: Not looking for comments on the validation or the quality of code. Was my first attempt. Just looking for a fix to the referals.)   <?php session_start(); require_once(dirname(_FILE_) . "/mysql.php"); require_once(dirname(_FILE_) . "/global_func.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>District Wars</title> <body style="background-image: url(/jimages/ui-bg_glow-ball_25_0d230b_600x600.png);background-size:1200px;background-position:center;width:810px;background-repeat:repeat;"> <link rel="stylesheet" href="css/game.css" type="text/css" /> <link rel="shortcut icon" href="images/dwicon.ico"> <style type="text/css"> #divIMG { position: relative ; width:810px; height:781px; margin-left: auto ; margin-right: auto ; background: url('/pics/registerimage.jpg') no-repeat; } #divLOGIN { position:absolute; width:110px; height:20px; top:184px; left:355px; } #divNAME { position:absolute; width:200px; height:20px; top:294px; left:431px; } #divPASS { position:absolute; width:200px; height:20px; top:323px; left:431px; } #divCONFPASS { position:absolute; width:200px; height:20px; top:352px; left:431px; } #divEMAIL { position:absolute; width:200px; height:20px; top:381px; left:431px; } #divPROMO { position:absolute; width:200px; height:20px; top:409px; left:431px; } #divFACEBOOK { position:absolute; width:450px; height:20px; top:185px; left:505px; } #divTWITTER { position:absolute; width:150px; height:20px; top:185px; left:199px; } #divREGISTER { position:absolute; width:110px; height:20px; top:444px; left:519px; } //#divREFERRAL { // visibility: none; //} </style> </head> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> <?php $ip = ($_SERVER['REMOTE_ADDR']); if (file_exists('ipbans/' . $ip)) { echo ' <table width="100%"> <tr> <th>Error! Your IP is BANNED!</th> </tr> </table>'; die(''); } if ($_POST['username']) { if (!$_POST['promo']) { $startm = 10000; $startc = 500; } else { if (($_POST['promo'] = 'LAUNCH') || ($_POST['promo'] = 'launch')) { $startm = 15000; $startc = 1200; } else if (($_POST['promo'] = 'FACEBOOK') || ($_POST['promo'] = 'facebook') || ($_POST['promo'] = 'Facebook')) { $startm = 20000; $startc = 1000; } else { $sm = 10000; $startc = 500; } } $username = $_POST['username']; $username = mysql_real_escape_string( htmlentities(stripslashes($username), ENT_QUOTES, 'ISO-8859-1'), $c); $query = sprintf("SELECT `username` FROM `users` WHERE `username`='%s'", $username); $q = mysql_query($query,$c); if (mysql_num_rows($q)) { echo ' <font color="orange">Username already in use. Choose another.</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; } else if ($_POST['password'] != $_POST['cpassword']) { echo' <font color="orange">Error! Your passwords do not match! Go back and try again!</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; } else if (!$_POST['email']) { echo ' <font color="orange">Error! You did not enter an email! Go back and try again!</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; } else if (!$_POST['password']) { echo ' <font color="orange">Error! You did not enter a password! Go back and try again!</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; } else { $_POST['ref'] = abs((int) $_POST['ref']); $ip = $_SERVER['REMOTE_ADDR']; mysql_query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES('', '{$username}', '{$username}', md5('{$_POST['password']}'), 1, {$startm}, {$startc}, 3, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', " . time() . ", '{$_POST['email']}', -1, '$ip')", $c); $i = mysql_insert_id($c); mysql_query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)", $c); mysql_query("INSERT INTO hunting_USERS VALUES($i,1,10,10,0,0,75)", $c); if ($_POST['ref'] > 0) { $refquery = sprintf("SELECT `userid`,`lastip` FROM `users` WHERE `userid` = %d", $_POST['ref']); $rq = mysql_query($refquery,$c); if (mysql_num_rows($rq) == 0) { mysql_free_result($rq); echo ' <font color="orange">Referrer does not exist.</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; die(''); } $rem_IP = mysql_result($rq, 0, 0); mysql_free_result($rq); if (($rem_IP == $ip) && ($_POST['ref'] != 1)) { echo ' <font color="orange">Error! You share an IP with your referrer!</font><br /> <a href="register.php"><img src="pics/back.png" title="Go Back" alt="Go Back" /></a>'; die(''); } mysql_query("UPDATE `users` SET `crystals` = `crystals` + 100,`refferals`=`refferals`+1 WHERE `userid` = {$_POST['ref']}", $c); event_add($_POST['ref'], "For refering $username to the game, you have gained 100 Tokens!!", $c); $e_rip = mysql_real_escape_string($rem_IP, $c); $e_oip = mysql_real_escape_string($ip, $c); mysql_query("INSERT INTO `referals` VALUES(NULL, {$_POST['ref']}, $i, ' . time() . ', '{$e_rip}', '$e_oip')", $c); } echo ' <table width="100%" align="center"> <tr> <th><font color="orange">You have signed up, enjoy the game.</font></th> </tr> <tr> <td align="center"><a href="login.php"><font color="yellow">Login</font></a><td> </tr> </table>'; } } else { $gref = abs((int) $_GET['REF']); $fref = $gref ? $gref : ''; ?> <div id="divIMG"> <div id="divLOGIN"> <form action="login.php"> <input type="submit" style="width:110px;" value='Log In'> </form> </div> <form action="register.php" method="post"> <div id="divNAME"> <input type="text" name="username" style="width:200px;" value=""> </div> <div id="divPASS"> <input type="text" name="password" style="width:200px;" value=""> </div> <div id="divCONFPASS"> <input type="text" name="cpassword" style="width:200px;" value=""> </div> <div id="divEMAIL"> <input type="text" name="email" style="width:200px;" value=""> </div> <div id="divPROMO"> <input type="text" name="promo" style="width:200px;" value=""> </div> <input type="hidden" name="ref" value='{$fref}'> <div id="divTWITTER"> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://districtwars.net" data-text="Sign up to District Wars today!" data-via="DistrictWars" data-related="DistrictWars" data-hashtags="mmorpg">Tweet</a> </div> <div id="divREGISTER"> <input type="submit" style="width:110px;" value="Register"> </div> </form> <div id="divFACEBOOK" class="fb-like" data-href="http://districtwars.net" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true"></div> </div> <?php } ?> </body> </html>
  15. I've also found a laundry list of other "possible" reasons. No one seems to really have a concrete answer. I will try the ADDROVERRIDE. For now, I know users with PayPal accounts seem to have no issue.
  16. I definitely agree that at least the landing page needs to hold major appeal. Mine... Does not. And I do fear it's likely cost me some signups already, but I am working on it. As far as within the game, I also am of the opinion that it's not necessarily about the glamour. A game needs substance. Features players will enjoy and be able to utilize in a readily available manner. It's all about keeping the impatience of the players at bay, as well as keeping a good balance between what the players want and what's best for the game. Feature wise, I believe DW to be off to a good start. There are already a few more systems in the works to be implemented over the coming weeks. Honestly, overall, I'm happy with what it is and what it's growing into. Can I say for sure the players will continue to agree? Of course not. All I can do is try my best and give it my all. And, of course, create a better landing page. :P
  17. According to the buyer, it is Visa and has never been linked to a PayPal account. My PayPal is verified. And, still, I cannot find a decent answer anywhere on the internet. It's a big problem. I don't understand why PayPal would exclude people without an account. They get their transaction fees, regardless.
  18. "The card you entered cannot be used for this payment. Please enter a different credit or debit card number" Has anyone had any of their members receive this message when trying to make a payment through PayPal with a credit card not linked to a PayPal account? I've searched through a dozen PayPal community topics and probably a dozen more other sites, and all I can seem to find is that PayPal gives some generic, frustratingly unhelpful response mentioning "limiting non-account transactions." Has anyone encountered this problem? If so, is there a fix for it? Could this be a coding error, or is it definitely on PayPal's side? This is definitely an urgent matter, and I would appreciate it majorly if anyone could help.
  19. Thank you muchly. :) It's definitely been a journey. Especially since this whole project has been teaching me PHP. I knew what I wanted to do and I knew I would get it done. Was only a matter of time. :)
  20. Well, a little update. Changed the login page completely. Bad news - It's still not very good. Good news - It's a little better than that ridiculous other one. Better news - I coded it myself, so now I know how to do it when I get a better page. :)
  21. Yeah, even that doesn't look like that for me. I just don't understand it. I thought it may be screen size, but zooming out or in changes nothing. For now, I have another one that, while still not what most would call very good, is at least better than the one there, I believe. My only issue is figuring out how to code it. Going to play around with it later today and see if I can stumble upon a solution. But, thanks for the feedback, everyone. Will definitely work on fixing the issues.
  22. And I do appreciate it. Took the creator on his word, silly me.
  23. So, the main problems I'm hearing seem to be display-wise, correct? That's actually good news, as I expected that. And Zu, I did catch that one security issue you... Decided to test. I knew it's better to do things yourself instead of relying on others' work. But yes, graphical and design based changes will be coming. That is definitely my weak area, and I can admit that. :P
  24. Very strange, as I use Chrome as well. I don't know why the tree is repeating for you and not for me. Or why the whole menu is centered, as it's not supposed to be. [ATTACH=CONFIG]606[/ATTACH]
  25. Eh I suppose the items system is more on the backend side of things than what a player would see. For example, with V1, you can literally equip an unlimited amount of weapons and there's no way to unequip them. That's just ridiculous, even for the default package. Mind taking a SS of the alignment issues? Everything seems right on my screen. And yes, I've been thinking on the vote and donate images. Sure, they probably don't need to be THAT big, but I don't want them tiny, either. Should always be there to... Encourage. Also, with the menu, I've considered changing the tree. But again, mind doing a SS of the "reducing?" Again, all looks fine to me.
×
×
  • Create New...