Jump to content
MakeWebGames

Magictallguy

Administrators
  • Posts

    2,146
  • Joined

  • Last visited

  • Days Won

    149

Everything posted by Magictallguy

  1. Re: I need help with a Mod i made Show us line 64.. That's where the error will be..
  2. Re: HTML posting in forums?   Haha! What security? :P
  3. Re: Cock Fight [$10] You liek teh cock? Hehe, sorry.. Had too
  4. Re: cmarket.php HELP Back on topic... You can find my secured/recoded cmarket.php absolutely .. "elsewhere" Contact me and I'll provide you with a link!
  5. Re: Marriage Proposal     if($ir['married'] > 0) { echo "We don't believe in polygamy..."; $h->endpage(); exit; } //or if($ir['married']) { echo "We don't believe in polygamy"; $h->endpage(); exit; }
  6. Re: Some Help with MCCODE V1   Already added I believe, though I think that's a 1% increase.
  7. Re: Exp needed per Level   True enough but if you want to print out that info to the user... :P Then simply echo the $ir['exp_needed']! :P
  8. Re: Exp needed per Level The check_level() function does that for you :P
  9. Re: Exp needed per Level     echo $ir['exp_needed'];   Minor correction to MTG ;)   $ir['exp_needed'] - $ir['exp']   Check the code, simply using $ir['exp_needed']; does the trick perfectly well
  10. Re: Some Help with MCCODE V1   <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>5000) { print "Congratulations, you bought a bank account for \$5,000! [url='bank.php']Start using my bank account![/url]"; mysql_query("UPDATE users SET money=money-5000,bankmoney=0 WHERE userid=$userid",$c); } else { print "You do not have enough money to open an account. [url='explore.php']Back to downtown...[/url]"; } } else { print "Open a bank account today, just \$5,000! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $ir,$c,$userid,$h; $interest = $ir['bankmoney'] / 100; $increase = $interest - $ir['bankmoney']; print "\n <table width='40%' border='2'> <tr> <td width='50%'> <div class=\"g_content\"><h3> Bank</h3><div class=\"g_text\"> Welcome to the bank. Here are your bank details: <table><tr> <td>Bank:</td><td> \$".number_format($ir['bankmoney'])."</td><td> (How much you have)</td> </tr><tr> <td>Interest Daily:</td><td> \$".number_format($interest)."</td><td> (How much you get)</td> </tr><tr> <td>Interest Rate:</td><td> 2%</td><td> (Daily Interest)</td> </tr></table> [b]Deposit Money[/b] Fee 0%<form action='bank.php?action=deposit' method='post'> <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form> [b]Withdraw Money[/b] Fee 0%<form action='bank.php?action=withdraw' method='post'> <input type='text' name='withdraw' value='{$ir['bankmoney']}' /><input type='submit' value='Withdraw' /></form> </td> </tr> </table>"; } function deposit() { global $ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*0/100); if($fee > 0) { $fee=0; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid",$c); print "You hand over \${$_POST['deposit']} to be deposited. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; mysql_query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid",$c); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>
  11. Re: View Gang Surrender   Thanks for posting my code! :P
  12. Re: Some Help with MCCODE V1   line 559 has this: if(mysql_num_rows($q)==0) ================= Third off, how to change the layout of the site, i found how to change the background colors,and tet but how do i make it so the site is not a full page site but rather centered with blank room on each side ================= Thank you all in advanced! 1st: Not quiet sure what you are wanting exactly.. $interest = $ir['bankmoney'] / 100; $increase = $interest - $ir['bankmoney']; echo "You gain an interest rate of 2% daily "; echo sprintf("Your new balance at the end of today will be \$%s, an increase of \$%s", number_format($interest), number_format($increase));   2nd: (Interest) Edit cron_day.php Find $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100) WHERE bankmoney>0"); and change to $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100) WHERE ((bankmoney > 0) AND (bankmoney < 20000000))");   3rd I can't answer that unless you provide the query in the $q variable
  13. Re: Activated From Click?   First, why are you using curly braces {} instead of brackets () on your if statement.. Second, you will need to use either 2 db rows and a cron, or sessions..
  14. Re: Exp needed per Level     echo $ir['exp_needed'];
  15. Re: View Gang Surrender The code seems fine to me, does the surrender still exist on the database?
  16. Re: Maximum amt   The highest BIGINT will hold is 9.2 quint (9,223,372,036,854,775,807 to be exact)
  17. Re: Help with Conversion...   Sometimes doing the above can cause other errors i would leave them as they are for now and as you stated before do the first parts. Iv'e found in some cases where ive changed the array to row doesnt always do justice... Chances are you haven't globally defined the $db variable.
  18. Re: Help Please Very Urgent Crazy-T, numbers don't need to be encased in quotes.. To OP: Run these queries to unfed yourself, destaff everyone, and then staff you.. UPDATE users SET fedjail = 0 WHERE userid = 1; DELETE FROM fedjail WHERE fed_userid = 1; UPDATE users SET user_level = 1; UPDATE users SET user_level = 2 WHERE userid = 1;
  19. Re: small job problem im a noob :(   Not necessarily. Jon, at the top (above the include globals.php), add (if it's not there already) $jobquery = 1; -- If it is there, then I'll need to see what your job query actually is (found in your globals.php)
  20. Re: Stop people from using IE on website   I Think That Typing Like This Is, As You Call It; "Gay". Type normally, don't put something/someone down with that word. I know a few gay people, they're pretty cool, and I think they'd be offended if they were roped into the same class as code!
  21. Re: Userlist.php   Thanks that works. What I was doing before you helped me was instead of using I just used us.XXX where XXX is the field in the table. Is there anything wrong with doing that? Just curious but the code you provided did work +1 Sp1d3r www.chaosrelic.com Nothing wrong with that at all. But, as I don't know which parts of the table you wish to display, I selected all. If you wish to speed up your code while using a MySQL query, only select what you need from a table instead of everything
  22. Re: Userlist.php   CE is so friggin' slow -.- Your method would disable the users ability to change the order clause.. Try using: $sql = sprintf("SELECT u.*, g.gangPREF, us.* " . "FROM users u " . "LEFT JOIN gangs g ON (u.gang = g.gangID) " . "LEFT JOIN userstats us ON (u.userid = us.userid) " . "ORDER BY u.%s %s LIMIT %u, 100", $by, $ord, $st); $q = $db->query($sql);
  23. Re: Userlist.php   The code is original v2 coding just FYI so theres no missing/special pieces if that helps. Sp1d3r www.chaosrelic.com Ah, I see why now too.. It's selecting the order by from the users link and that is selecting userid. userid exists in both the users and the userstats table - and that's why you're getting an error.. I can't think of a simple way to fix at the moment. Way too much on my mind.
  24. Re: [v1]Need abit of help with anouncements   If I'm right, the @ operator is to echo errors if the code is unable to do it's job properly (could be wrong)..   <?php /* For this method, you would have to make an edit to the Admin Panel and the announcement.php. */ // Admin Panel edit // Add under the query that inserts the announcement into the database. mysql_query("UPDATE users SET new_announcements = new_announcements + 1") or die(mysql_error()); // Add in the announcement.php, underneath "print $content;" $sql = sprintf("UPDATE users SET new_announcements = 0 WHERE (userid = %u)", $userid); mysql_query($sql) or die(mysql_error()); // Then, the mainmenu edit is the same as the v2 version (posted below) ?>   <?php // To be honest, I don't know.. I don't have a v1 source. That's on my 8gb pendrive. // If anyone finds my pendrive, I'll give you ?10! xD ?>   <?php echo sprintf("[url='ann.php']%s (%u)[/url]", $ir['new_announcements'] ? "<span style='color:red;'>Announcements</span>" : "Announcements", $ir['new_announcements']); ?>
  25. Re: Userlist.php   $sql = sprintf("SELECT u.*, g.gangPREF, us.* " . "FROM users u " . "LEFT JOIN gangs g ON (u.gang = g.gangID) " . "LEFT JOIN userstats us ON (u.userid = us.userid) " . "ORDER BY %s %s LIMIT %u, 100", $by, $ord, $st); $q = $db->query($sql);
×
×
  • Create New...