
nheimberg
Members-
Posts
26 -
Joined
-
Last visited
Never
nheimberg's Achievements
Newbie (1/14)
0
Reputation
-
Re: Left and right hand menu? There was a huge discussion on this before. I was going to use the solution, but never tried it out. Here are some of the things that were posted in it that I took down in notes. function menuarea() { include "mainmenu.php"; global $ir,$c; print "</td><td valign='top'> "; } function endpage() { print "</td> <td width=10%>"; include_once("mainmenur.php"); echo "</td> </tr> </table> </body> </html>"; } } ?> That is at the end of my header. Note the mainmenur.php. That should be the right side menu. That is all I have in my notes, so I dont know if that will help or not. It may be a shot in the dark. ok editing to say I found the original topic http://criminalexistence.com/ceforums/i ... ic=2710.30
-
Re: bank to bank xfer ok, maybe I will get a reply if I post the code. Like I said, this just a modified send cash, so I am not claiming that I wrote it. <?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(); $_GET['ID'] = abs((int) $_GET['ID']); $_POST['bankmoney'] = abs((float) $_POST['bankmoney']); if($ir['donatordays']>=1){ if(!((int)$_GET['ID'])) { print "Invalid User ID"; } else if($_GET['ID'] == $userid) { print "Haha, what does sending money to yourself do anyway?"; } else { if((float) $_POST['bankmoney']) { if($_POST['bankmoney'] > $ir['bankmoney']) { print "MOTHER OF HELL! DON'T SEND money YOU DON'T DAMN WELL HAVE!!!"; } else { mysql_query("UPDATE users SET bankmoney=bankmoney-{$_POST['bankmoney']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET bankmoney=bankmoney+{$_POST['bankmoney']} WHERE userid={$_GET['ID']}",$c); print "You sent \${$_POST['bankmoney']} to ID {$_GET['ID']}."; event_add($_GET['ID'],"You were transferred \${$_POST['bankmoney']} from {$ir['username']}.",$c); $it=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}",$c) or die(mysql_error()); $er=mysql_fetch_array($it); mysql_query("INSERT INTO bankxferlogs VALUES ('', $userid, {$_GET['ID']}, {$_POST['bankmoney']}, unix_timestamp(), '{$ir['lastip']}', '{$er['lastip']}')",$c); } } else { print "<h3> Transferring Money</h3> You are transferring money to ID: {$_GET['ID']}. <form action='bankxfer.php?ID={$_GET['ID']}' method='post'> Amnt: <input type='text' name='bankmoney' /> <input type='submit' value='Send' /></form>"; print "<h3>Latest 5 Transfers</h3> <table width=75% border=2> <tr style='background:gray'> <th><font color=black>Time</font></th> <th><font color=black>User From</font></th> <th><font color=black>User To</font></th> <th><font color=black>Amount</font></th> </tr>"; $q=mysql_query("SELECT bx.*,u1.username as sender, u2.username as sent FROM bankxferlogs bx LEFT JOIN users u1 ON bx.bxFROM=u1.userid LEFT JOIN users u2 ON bx.bxTO=u2.userid WHERE bx.bxFROM=$userid ORDER BY bx.bxTIME DESC LIMIT 5",$c) or die(mysql_error()." "."SELECT bx.*,u1.username as sender, u2.username as sent FROM bankxferlogs bx LEFT JOIN users u1 ON bx.bxFROM=u1.userid LEFT JOIN users u2 ON bx.bxTO=u2.userid WHERE bx.bxFROM=$userid ORDER BY bx.bxTIME DESC LIMIT 5"); while($r=mysql_fetch_array($q)) { if($r['bxFROMIP'] == $r['bxTOIP']) { $m="<span style='color:red;font-weight:800'>MULTI</span>"; } else { $m=""; } print "<tr> <td>" . date("F j, Y, g:i:s a",$r['bxTIME']) . "</td><td>{$r['sender']} [{$r['bxFROM']}] </td><td>{$r['sent']} [{$r['bxTO']}] </td> <td> \${$r['bxAMOUNT']}</td> </tr>"; } print "</table>"; } $h->endpage(); } } else{ print"Donators Only function."; $h->endpage(); } ?> and the sql table that I am using is : CREATE TABLE `bankxferlogs` ( `bxID` int(11) NOT NULL auto_increment, `bxFROM` int(11) NOT NULL default '0', `bxTO` int(11) NOT NULL default '0', `bxAMOUNT` bigint(20) NOT NULL default '0', `bxTIME` int(11) NOT NULL default '0', `bxFROMIP` varchar(15) NOT NULL default '127.0.0.1', `bxTOIP` varchar(15) NOT NULL default '127.0.0.1', `bxCONTENT` longtext NOT NULL, PRIMARY KEY (`bxID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2091 ;
-
Ok, so I took the cash xfer and converted it to a bank xfer. It all works except the logging. I changed all the cx(cash xfers) to bx (bank xfer) and created a table using the same format as the cash logs. Any idea why this wont log? ~Natasha
-
Re: NEW!! Advanced House Break-In When you attempt to steal an item, do you see their whole inventory or a partial list? If you see the inventory, can I look at one persons stuff and not like it so I get to look at someone elses stuff? What is the ingame cost to attempt this? brave, will, cash, combination, etc.?
-
Re: [mccode] Mods 4 Sale - UPDATED POST me too. I have a bunch of negatives for no apparent reason. If someone has a problem with my questions I ask, then I wish they would be an adult and come to me directly instead of being immature and giving negative karma for no reason.
-
Re: [Free v1] Advanced Warning System Thanks. This is a really nice addition and will help keep the staff notes to a minimum. +1 ~Natasha
-
Re: IRC Guide Wow, lots of good information compiled here. Thanks.
-
Re: Number format I have a link in my header that shows amount of money in bank and it links to the bank. It looks like this.... <a href='bank.php'>Go Station Bank: \$".number_format($ir['bankmoney'])." Hope that helps. ~Natasha
-
Re: Number format Got it. THanks Deception
-
What is the way to get money amounts to show properly? ie. $123,456,789 rather than $123456789 I would like the commas to be used. Thanks, Natasha
-
Re: Free Multiple Event Deleter - FREE! Great addition. Thanks Oxidati0n +1 ~natasha
-
Re: Counting (nr game) 1089
-
Re: Game Rank Here is how mine is set up. print " <table> <tr> <td>Name: {$ir['username']}</td> <td>Crystals: {$cm}</td> </tr> <tr> <td>Level: {$ir['level']}</td> <td>Exp: {$exp}%</td> </tr> <tr> <td>Money: $fm</td> <td>HP: {$ir['hp']}/{$ir['maxhp']}</td> </tr> <tr> <td>Property: {$ir['hNAME']}</td> <td>Married: $marital</td> </tr> <tr> <td>Game Rank: ".get_gamerank($ir['level'], $ir['hPRICE'], $ir)."</td> </tr> </table>";
-
Re: Help Please:) I think he is wanting to know how to make the banner switch to a hospital banner or a jail banner when in hosp or jail. He knows it is in the header, but cant seem to make it work.