-
Posts
739 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Events
Everything posted by peterisgb
-
works a charm now, thanks so much
-
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
i done those steps, its comes up that the table does not exsist when it does. -
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
well there is a forum database but its seprate from the main game database and the code on here trys and place the code into the same database as the game which its in another database...... -
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
er,,, well there is no db structure like that in the main one, i donknot how to get it to work in a seprate datbase -
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
erm..... all i need is the game register.php database code bit for auto making account for the forums like step 3. -
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
if you google this this is the only thing that comes up. -
mccode-v2 SMF Registration Intergration!!!!!
peterisgb replied to Dayo's topic in Free Modifications
i been trying to get this to work with SMF 2.0.2 with a few changes but i cant get it to work, has anyone done this yet, thanks -
thanks, i dont mind doing some work, which i did quite alot of it, but thanks for the point in the right direction, i think i should be able to do the rest. (i Hope) i used the code above, i know where to put it, but paypal chucks back this query The link you have used to enter the PayPal system contains an incorrectly formatted item amount. and this was using $('input[name=amount]').val(sum.toFixed(2));
-
Not bad, still one of the problems i have is the price from the total on the table dont show up when you click the donate button
-
so can anyone help with this, if not i'll just remove it,
-
one thing i do need help with tho is that ipn donated page, link would i put into the paypal button as a completed and failed return from paypal link /ipn_donator.php?action=Completed=pack=1 etc. < thats not right of course, some help would be good, thanks
-
I havent seen anything like this before so i tried to make my own donation page where the users choose what they want in the donations packs, The table and the sums work fine, but i cant figure out how to transport the info into the paypal donations link, If some-one could help me with this so i can then post it in the free modifcations aswell, thanks. <?php include "globals.php"; print " <br /> <h2>Custom Donator Packs</h2> <br /> This Page is Still under work, PLEASE DO NOT USE THIS UNTIL I GIVE THE GO-AHEAD. Thanks<br /> If you Enter 1 on the Points Section, You will not Get the Point, you have to put min of 10 in, thanks<br /> <br /><br /> <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script> </head> <body> <table width='450px' border='1' style='border-collapse:collapse;background-color:#E8DCFF'> <tr> <td width='40px'>1</td> <td>Dollars</td> <td><input class='txt' type='text' name='txt'/></td> <td>1 = $100,000,000</td> </tr> <tr> <td>2</td> <td>Gold</td> <td><input class='txt' type='text' name='txt'/></td> <td>1 = 100,000 Gold</td> </tr> <tr> <td>3</td> <td>Turns</td> <td><input class='txt' type='text' name='txt'/></td> <td>1 = 500 Turns</td> </tr> <tr> <td>4</td> <td>Points</td> <td><input class='txt' type='text' name='txt'/></td> <td>10 = 1 Points</td> </tr> <tr> <td>5</td> <td>Donator Days</td> <td><input class='txt' type='text' name='txt'/></td> <td>1 = 10 Donator Days</td> </tr> <tr> <td>6</td> <td>Smoking Levels</td> <td><input class='txt' type='text' name='txt'/></td> <td>1 = 1,000 Smoking Levels</td> </tr> <tr id='summation'> <td> </td> <td align='right'>Total to Pay :</td> <td align='center'>$<span id='sum'>0</span></td> </tr> </table> <script> $(document).ready(function(){ //iterate through each textboxes and add keyup //handler to trigger sum event $('.txt').each(function() { $(this).keyup(function(){ calculateSum(); }); }); }); function calculateSum() { var sum = 0; //iterate through each textboxes and add the values $('.txt').each(function() { //add only if the value is number if(!isNaN(this.value) && this.value.length!=0) { sum += parseFloat(this.value); } }); //.toFixed() method will roundoff the final sum to 2 decimal places $('#sum').html(sum.toFixed(2)); } </script> <br /><br /><br /><br /> <form action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_blank'> <input type=hidden name=cmd value=_xclick> <input type='hidden' name='business' value='{$set['paypal']}'> <input type='hidden' name='item_name' value='{$domain}|Custom|M=|G=|T=|P=|DD=|SL=|{$userid}'> <input type='hidden' name='amount' value='0'> <input type='hidden' name='no_shipping' value='1'> <input type='hidden' name='return' value='http://{$domain}/donatordone.php?action=done&type=special'> <input type='hidden' name='cancel_return' value='http://{$domain}/donatordone.php?action=cancel'> <input type='hidden' name='notify_url' value='http://{$domain}/ipn_donator.php'> <input type='hidden' name='cn' value='Your Player ID'> <input type='hidden' name='currency_code' value='USD'> <input type='hidden' name='tax' value='0'> <input type='image' src='https://www.paypal.com/en_US/i/btn/x-click-but21.gif' border='0' name='submit' alt='Make payments with PayPal - it's fast, free and secure!'> </form> "; $h->endpage(); ?>
-
well i dont have alot of cash left in my bugdet, for for what i have i want to secure one page at a time untill they all get done, my budget is tight, i got the users but they need protecting.
-
Which page is the least secured from hackers and admin hacks and that, (not forums in my case) and how much would it cost to secure that one file?
-
well i edited to fit the game, but didnt work grr
-
$used=array(); $q=mysql_query("SELECT * FROM inventory WHERE inv_userid=$userid"); while ( $r=mysql_fetch_array($q) ) { if ( ! in_array ( $r['inv_id'], $used ) ) { $currdel=array(); $used[] =$r['inv_id']; $currdel[]=$r['inv_id']; $amount=$r['inv_qty']; $q2=mysql_query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid = {$r['inv_itemid']} AND inv_id != {$r['inv_id']}"); while ( $r2 = mysql_fetch_array($q2) ) { $used[]=$r2['inv_id']; $currdel[]=$r2['inv_id']; $amount+=$r2['inv_qty']; } mysql_query("DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).")"); mysql_query("INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount)"); } } this might help aswell,
-
i tried that djkanna, i get an error when i do that
-
only thing i would suggest is go into your phpmyadmin (if thats what your using) and change all your stats in BIGINT 55 this is what i did to overcome the limits.
-
give this a try. <?php require "global_func.php"; 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); $m=mysql_query("SELECT FROM users WHERE userid={$ir['married']}"); $par=mysql_fetch_row($m); if($ir['married'] == 0) { die("You are not married, come back when you have a partner"); } $_GET['action'] = (isset($_GET['action']) && is_string($_GET['action'])) ? stripslashes(trim($_GET['action'])) : FALSE; switch($_GET['action']) { case 'givemoney': give_money_form(); break; case 'givemoneysub': give_money_submit(); break; case 'givecrystals': give_crystals_form(); break; case 'givecrystalssub': give_crystals_submit(); break; case 'givebank': give_bank_form(); break; case 'givebanksub': give_bank_submit(); break; case 'givebankcrystals': give_bankcrystals_form(); break; case 'givebankcrystalssub': give_bankcrystals_submit(); break; case 'takemoney': take_money_form(); break; case 'takemoneysub': take_money_submit(); break; case 'takecrystals': take_crystals_form(); break; case 'takecrystalssub': take_crystals_submit(); break; case 'takebank': take_bank_form(); break; case 'takebanksub': take_bank_submit(); break; case 'takecbank': take_cbank_form(); break; case 'takecbanksub': take_cbank_submit(); break; case 'sleep': sleep_form(); break; case 'sleepsub': sleep_submit(); break; case 'divorce': divorce(); break; case 'allowence': allowence_form(); break; default: index(); break; } function give_money_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Giving Money</h3> This action will give your money to your partner You currently have <b>\${$ir['money']}</b> that you could send. <form action='partner.php?action=givemoneysub' method='post'> Money: <input type='text' name='money' value='0'> <input type='submit' value='Give Money' /></form>"; } function give_money_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['money'] < $_POST['money']) { die("You are trying to give more money than you can <a href='partner.php'?action=givemoney>Back</a>"); } else { mysql_query("UPDATE users SET money=money+".abs(floatval($_POST['money']))." WHERE userid={$par['userid']}"); mysql_query("UPDATE users SET money=money-".abs(floatval($_POST['money']))." WHERE userid=$userid"); event_add($par['userid'],"You partner has just given you \${$_POST['money']}",$c); print"You gave \${$_POST['money']} to your partner"; } } function give_crystals_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Giving crystals</h3> This action will give your crystals to your partner You currently have <b>{$ir['crystals']}</b> crystals that you could send. <form action='partner.php?action=givecrystalssub' method='post'> Crystals: <input type='text' name='crystals' value='0'> <input type='submit' value='Give crystals' /></form>"; } function give_crystals_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['crystals'] < $_POST['crystals']) { die("You are trying to give more crystals than you can. <a href='partner.php'?action=givecrystals>Back</a>"); } else { mysql_query("UPDATE users SET crystals=crystals+".abs(floatval($_POST['crystals']))." WHERE userid={$par['userid']}"); mysql_query("UPDATE users SET crystals=crystals-".abs(floatval($_POST['crystals']))." WHERE userid=$userid"); event_add($par['userid'],"You partner has just given you {$_POST['crystals']} crystals",$c); print"You gave {$_POST['crystals']} crystals to your partner"; } } function give_bank_form() { global $db,$ir,$c,$h,$userid,$par; if ($ir['bankmoney'] < 0) { die("You dont have a bank account"); } if ($par['bankmoney'] < 0) { die("Your partner doesnt have a bank account"); } else { print "<h3>Giving Bank Money</h3> This action will give bank money to your partner You currently have <b>\${$ir['bankmoney']}</b> that you could send. <form action='partner.php?action=givebanksub' method='post'> Bank Money: <input type='text' name='bankmoney' value='0'> <input type='submit' value='Give Bank Money' /></form>"; } } function give_bank_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['bankmoney'] < $_POST['bankmoney']) { die("You are trying to give more bank money than you can <a href='partner.php'?action=givecrystals>Back</a>"); } else { mysql_query("UPDATE users SET bankmoney=bankmoney+".abs(floatval($_POST['bankmoney']))." WHERE userid={$par['userid']}"); mysql_query("UPDATE users SET bankmoney=bankmoney-".abs(floatval($_POST['bankmoney']))." WHERE userid=$userid"); event_add($par['userid'],"You partner has just wired you \${$_POST['bankmoney']} into your bank account",$c); print"You wired \${$_POST['bankmoney']} to your partner"; } } function give_bankcrystals_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>Giving Bank crystals</h3> This action will give your bank crystals to your partner You currently have <b>{$ir['bankcrystals']}</b> bank crystals that you could send. <form action='partner.php?action=givebankcrystalssub' method='post'> Bank Crystals: <input type='text' name='bankcrystals' value='0'> <input type='submit' value='Give Bank Crystals' /></form>"; } function give_bankcrystals_submit() { global $db,$ir,$c,$h,$userid,$par; if ($ir['bankcrystals'] < $_POST['bankcrystals']) { die("You are trying to give more bank crystals than you can. <a href='partner.php'?action=givebankcrystals>Back</a>"); } else { mysql_query("UPDATE users SET bankcrystal=bankcrystal+".abs(floatval($_POST['bankcrystals']))." WHERE userid={$par['userid']}"); mysql_query("UPDATE users SET bankcrystal=bankcrystal-".abs(floatval($_POST['bankcrystals']))." WHERE userid=$userid"); event_add($par['userid'],"You partner has just given you {$_POST['bankcrystals']} crystals",$c); print"You gave {$_POST['bankcrystals']} crystals to your partner"; } } function take_money_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their money."); } else { print "<h3>Take Money</h3> This action will take money from your partner Your partner has \${$par['money']}. <form action='partner.php?action=takemoneysub' method='post'> Money: <input type='text' name='money' value='{$par['money']}'> <input type='submit' value='Take Money' /></form>"; } } function take_money_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their money."); } if ($par['money'] < $_POST['money']) { die("You are trying to take more money than you can. <a href='partner.php'?action=takemoney>Back</a>"); } else { mysql_query("UPDATE users SET money=money+".abs(floatval($_POST['money']))." WHERE userid=$userid"); mysql_query("UPDATE users SET money=money-".abs(floatval($_POST['money']))." WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken \${$_POST['money']} from your hand money",$c); print"You took \${$_POST['money']} from your partner"; } } function take_crystals_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their crystals"); } else { print "<h3>Take Crystals</h3> This action will take crystals from your partner Your partner has {$par['crystals']} crystals. <form action='partner.php?action=takecrystalssub' method='post'> Crystals: <input type='text' name='crystals' value='{$par['crystals']}'> <input type='submit' value='Take Crystals' /></form>"; } } function take_crystals_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their crystals."); } if ($par['crystals'] < $_POST['crystals']) { die("You are trying to take more crystals than you can. <a href='partner.php'?action=takecrystals>Back</a>"); } else { mysql_query("UPDATE users SET crystals=crystals+".abs(floatval($_POST['crystals']))." WHERE userid=$userid"); mysql_query("UPDATE users SET crystals=crystals-".abs(floatval($_POST['crystals']))." WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken {$_POST['crystals']} crystals from you",$c); print"You took {$_POST['crystals']} crystals from your partner"; } } function take_bank_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their finacial bank money."); } if ($ir['bankmoney'] < 0) { die("You dont have a bank account"); } if ($par['bankmoney'] < 0) { die("Your partner dose not have a bank account"); } else { print "<h3>Take Bank Money</h3> This action will take bank money from your partner Your partner has \${$par['bankmoney']}. <form action='partner.php?action=takebanksub' method='post'> Bank Money: <input type='text' name='bank' value='{$par['bankmoney']}'> <input type='submit' value='Take Bank Money' /></form>"; } } function take_bank_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their bank money."); } if ($par['bankmoney'] < $_POST['bankmoney']) { die("You are trying to take more bank money than you can <a href='partner.php'?action=takebank>Back</a>"); } else { mysql_query("UPDATE users SET bankmoney=bankmoney+".abs(floatval($_POST['bankmoney']))." WHERE userid=$userid"); mysql_query("UPDATE users SET bankmoney=bankmoney-".abs(floatval($_POST['bankmoney']))." WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken \${$_POST['bank']} from your bank account",$c); print"You took \${$_POST['bank']} from your partner"; } } function take_cbank_form() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their bank crystals."); } if ($ir['bankcrystals'] < 0) { die("You dont have a crystal bank account"); } if ($par['bankcrystals'] < 0) { die("Your partner doesnt have a crystal bank account."); } else { print "<h3>Take Bank Crystals</h3> This action will take bank money from your partner Your partner has {$par['bankcrystals']} bank crystals. <form action='partner.php?action=takebanksub' method='post'> Bank Crystals: <input type='text' name='cbank' value='{$par['bankcrystals']}'> <input type='submit' value='Take Bank Money' /></form>"; } } function take_cbank_submit() { global $db,$ir,$c,$h,$userid,$par; if ($par['allowence'] == 0) { die("Your partner hasnt allowed your to access their bank crystals."); } if ($par['bankcrystals'] < $_POST['cbank']) { die("You are trying to take more bank money than you can <a href='partner.php'?action=takecbank>Back</a>"); } else { mysql_query("UPDATE users SET bankcrystals=bankcrystals+".abs(floatval($_POST['bankcrystals']))." WHERE userid=$userid"); mysql_query("UPDATE users SET bankcrystals=bankcrystals-".abs(floatval($_POST['bankcrystals']))." WHERE userid={$par['userid']}"); event_add($par['userid'],"Your partner has just taken {$_POST['bankcrystals']} crystals from your bank account",$c); print"You took {$_POST['bankcrystals']} bank crystals from your partner"; } } function sleep_form() { global $db,$ir,$c,$h,$userid,$par; if($ir['tired'] == 1) { die("You are too tired to sleep with your partner again"); } print "<h3>Sleep with your Partner?</h3> <form action='partner.php?action=sleepsub' method='post'> <input type='submit' value='Sleep With {$par['username']}' /></form>"; } function sleep_submit() { global $db,$ir,$c,$h,$userid,$par; if($ir['tired'] == 1) { die("You are too tired to sleep with your partner again"); } if (!$_POST['msg']) { mysql_query("UPDATE users SET happiness=happiness+1 WHERE userid=$userid"); mysql_query("UPDATE users SET tired=1 WHERE userid=$userid"); event_add($par['userid'],"Your partner has just slept with you. Please take a pregnancy test.",$c); print"You slept with your partner and gained 1 happiness!"; } } function divorce() { global $ir, $mr, $c, $userid, $h; mysql_query("UPDATE users SET married=0 WHERE userid IN($userid, {$ir['married']})", $c); event_add($ir['married'],"{$ir['username']} divorced you... Your now single...",$c); print "You divorced your partner and went back to being single. > <a href='index.php'>Back</a>"; } function allowence_form() { global $db,$ir,$c,$h,$userid,$par; print "<h3>C</h3> This action will decide wether you want to allow your partner to take money, crystals, bank money, bank crystals, etc or not... [<a href='partner.php'?action=allowence&allow=yes>Allo w</a>] [<a href='partner.php'?action=allowence&allow=no>Do Not Allow</a>] "; if($_GET['allow'] == yes) { mysql_query("UPDATE users SET allowence=1 WHERE userid=$userid"); print" Now your partner is allowed to access your finance"; } else if($_GET['allow'] == no) { mysql_query("UPDATE users SET allowence=0 WHERE userid=$userid"); print" Now your partner isnt allowed to access your finance"; } } function index() { global $db,$ir,$c,$h,$userid,$par; print " <h3><center>Information</h3> <center><table width=60% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr> <th><font color=gold>Theirs</th> <th><font color=gold>Yours</th> </tr> <tr> <td><center>Money: \${$par['money']}</td> <td><center>Money: \${$ir['money']}</td> </tr> <td><center>Crystals: {$par['crystals']}</td> <td><center>Crystals: {$ir['crystals']}</td> </tr> <tr> <td><center>Banked Money: \${$par['bankmoney']}</td> <td><center>Banked Money: \${$ir['bankmoney']}</td> </tr> <tr> <td><center>Banked Crystals: {$par['bankcrystals']}</td> <td><center>Banked Crystals: {$ir['bankcrystals']}</td> </tr> </table> <h3><center>Partner Managment</h3> <center><table width=60% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr> <td><a href='partner.php'?action=givemoney><center>Send Money</a></td> <td><a href='partner.php'?action=takemoney><center>Take Money</a></td> </tr><tr> <td><a href='partner.php'?action=givebank><center>Send Bank Money</a></td> <td><a href='partner.php'?action=takebank><center>Take Bank Money</a></td> </tr><tr> <td><a href='partner.php'?action=givecrystals><center>Sen d Crystals</a></td> <td><a href='partner.php'?action=takecrystals><center>Tak e Crystals</a></td> </tr><tr> <td><a href='partner.php'?action=givebankcrystals><center >Send Bank Crystals</a></td> <td><a href='partner.php'?action=takecbank><center>Take Bank Crystals</a></td> </tr><tr> <td><a href='partner.php'?action=sleep'><center>Sleep With {$par['username']}</td> <td><a href='partner.php'?action=allowence><center>Marria ge Allowence!</a></td> </tr><tr> <td colspan='2'><a href='partner.php'?action=divorce><center>Divorce</a></td></tr></table> <h3><center>Marriage Stats</h3> <center><table width=60% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr> <td><center>Your Happiness: {$ir['happiness']}</td> <td><center>Their Happiness: {$par['happiness']}</td></tr></table>"; } $h->endpage();
-
i done it now, thanks anyway
-
well not for me, this is my whole page <style type="text/css"> <!-- body { font-family:arial;font-size:12px;color: red; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; } table,tr,td { font-family:arial;font-size: 12px; } img { border:none; } textarea { font-family:arial;font-size:12px;color: black; } a#button1a { display: block; width: 170px; height: 16px; background-image: url(menu.jpg); background-position: 0 0; margin: 0 auto; } a#button1a:hover { background-image: url(menu3.jpg); background-position: 0 -37px; } a .alt { display: none; } a#button1b { display: block; width: 170px; height: 30px; background-image: url(menu3.jpg); background-position: 0 0; margin: 0 auto; } a#button1b:hover { background-image: url(menu3.jpg); background-position: 0 -37px; } a .alt { display: none; } --> </style> <?php session_start(); if (!isset ($_SESSION['userid']) ) { echo '<p>Not logged in.</p>'; exit; } include "config.php"; global $_CONFIG,$set,$ir; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $userInfo = $db->query('SELECT `userid`, `level`, `energy`, `maxenergy`, `will`, `maxwill`, `brave`, `maxbrave`, `exp`, `hp`, `maxhp`, `gymxp`, `gexp_needed` FROM `users` WHERE (`userid` = '.$_SESSION['userid'].')'); if ($db->num_rows($userInfo) > 0) { $ir = $db->fetch_row($userInfo); $exp_needed=(($ir['level']+1.5)*($ir['level']+1.5)*($ir['level']+1)*2.7); $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=number_format(($ir['exp']/$exp_needed*100), 2); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $gymperc=number_format(($ir['gymxp']/$ir['gexp_needed']*100), 2); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $gymopp=100-$gymperc; print "<center> <a id='button1b' href='energyrefill.php'> <b>Energy:</b> {$ir['energy']}/{$ir['maxenergy']} <small>[<font color='green'>Refill</font>]</small><br /> <img src=bargreen.gif width=$enperc height=12><img src=barred.gif width=$enopp height=12> </a> <a id='button1b' href=''> <b>Will:</b> {$wiperc}%<br /> <img src=bluebar.gif width=$wiperc height=12><img src=barred.gif width=$wiopp height=12> </a> <a id='button1b' href='criminal.php' target='_parent'> <b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=barpurple.gif width=$brperc height=12><img src=barred.gif width=$bropp height=12> </a> <a id='button1b' href=''> <b>Health:</b> {$hpperc}%<br /> <img src=bargreen.gif width=$hpperc height=12><img src=barred.gif width=$hpopp height=12> </a> <a id='button1b' href=''> <b>XP:</b> {$experc}%<br /> <img src=bluebar.gif width=$experc height=12><img src=barred.gif width=$exopp height=12> </a> <a id='button1b' href=''> <b>Gym XP:</b> {$gymperc}%<br /> <img src=bluebar.gif width=$gymperc height=12><img src=barred.gif width=$gymopp height=12></a> <br /><br /> </center>"; } ?>
-
i have this gang war system where you buy territorys, (cant find the orginal post) but you buy a sector of teritory for your gang i was wondering is there a way i can clear the tables, the tables are as follows $db->query(sprintf("UPDATE gangs SET gangTER1=0)); $db->query(sprintf("UPDATE gangs SET gangTER2=0)); $db->query(sprintf("UPDATE gangs SET gangTER3=0)); $db->query(sprintf("UPDATE gangs SET gangTER4=0)); $db->query(sprintf("UPDATE gangs SET gangTER5=0)); $db->query(sprintf("UPDATE gangs SET gangTER6=0)); $db->query(sprintf("UPDATE gangs SET gangTER7=0)); $db->query(sprintf("UPDATE gangs SET gangTER8=0)); $db->query(sprintf("UPDATE gangs SET gangTER9=0)); $db->query(sprintf("UPDATE gangs SET gangTER10=0)); $db->query(sprintf("UPDATE gangs SET gangTER11=0)); $db->query(sprintf("UPDATE gangs SET gangTER12=0)); $db->query(sprintf("UPDATE gangs SET gangTER13=0)); $db->query(sprintf("UPDATE gangs SET gangTER14=0)); $db->query(sprintf("UPDATE gangs SET gangTER15=0)); $db->query(sprintf("UPDATE gangs SET gangTER16=0)); $db->query(sprintf("UPDATE gangs SET gangTER17=0)); $db->query(sprintf("UPDATE gangs SET gangTER18=0)); $db->query(sprintf("UPDATE gangs SET gangTER19=0)); $db->query(sprintf("UPDATE gangs SET gangTER20=0)); $db->query(sprintf("UPDATE gangs SET gangTER21=0)); $db->query(sprintf("UPDATE gangs SET gangTER22=0)); $db->query(sprintf("UPDATE gangs SET gangTER23=0)); $db->query(sprintf("UPDATE gangs SET gangTER24=0)); $db->query(sprintf("UPDATE gangs SET gangTER25=0)); is there a way i can get them wiped so i can add then to the weekly cron, i was thinking along the same lines as like the voting crons, but that wipes the table completely, can someone help. Thanks
-
niether one worked.
-
i tried this, but then the bars dont work correcty and it goes upto a higher number, the 100 = 100% When i changed all the 100% to 150 all the things go into 150% which does not compute in my books lol
-
i know this might seem dumb but on the playerbars in your codes it will be in erm... header.php (i've changed mine so its different) well anyway you have the stats bar on the side panel which is this selected code below: $exp_needed=(($ir['level']+1.5)*($ir['level']+1.5)*($ir['level']+1)*2.7); $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=number_format(($ir['exp']/$exp_needed*100), 2); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $gymperc=number_format(($ir['gymxp']/$ir['gexp_needed']*100), 2); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $gymopp=100-$gymperc; print "<center> <a id='button1b' href='energyrefill.php'> <b>Energy:</b> {$ir['energy']}/{$ir['maxenergy']} <small>[<font color='green'>Refill</font>]</small><br /> <img src=bargreen.gif width=$enperc height=12><img src=barred.gif width=$enopp height=12> </a> <a id='button1b' href=''> <b>Will:</b> {$wiperc}%<br /> <img src=bluebar.gif width=$wiperc height=12><img src=barred.gif width=$wiopp height=12> </a> <a id='button1b' href='criminal.php' target='_parent'> <b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=barpurple.gif width=$brperc height=12><img src=barred.gif width=$bropp height=12> </a> <a id='button1b' href=''> <b>Health:</b> {$hpperc}%<br /> <img src=bargreen.gif width=$hpperc height=12><img src=barred.gif width=$hpopp height=12> </a> <a id='button1b' href=''> <b>XP:</b> {$experc}%<br /> <img src=bluebar.gif width=$experc height=12><img src=barred.gif width=$exopp height=12> </a> <a id='button1b' href=''> <b>Gym XP:</b> {$gymperc}%<br /> <img src=bluebar.gif width=$gymperc height=12><img src=barred.gif width=$gymopp height=12></a> <br /><br /> </center>"; } ?> So well my point is these bars only go a certain percent which is 100% but this limits tge size width it goes, How do i make the stats bar longer than what is it.