Page 1 of 1

Bank update: 0.7.4-0.8.1

Posted: Wed Jul 29, 2009 3:17 pm
by Erik Mortis
Last Update: http://shireroth.org/forum/viewtopic.php?f=226&t=11338

Code: Select all

0.7.5 changed how transferfunds() worked by integrating some of the error checking
			into it. This will make it easier to incorperate functionality into forums.
			also takes care of logging now. Should I make account deletion easier for 
			admins by removing the password requirement? Screw the password! It is gone. 
0.8.0 Format fixes in dblib and creation of tax page(not finished).
			Added <tiny> to the styles. Created repair.php for table fixing.  
			Updated bank menu. updated viewaccounts.php for type. 
			More fixes to simple.css. added typeselect() to htmllib.php
			Created changetype.php. Added apply_tax() to bankops.php 
			Finnished tax.php though appply_tax() is not complete.
			'Government' Type accounts are now active.
0.8.1 rebuilt transfer.php and admintransfer.php, and moved the last of the error
			handling into transfer(). Finnshed apply_tax(). Created bank_error()
			Added <error> to the css. Started making some pages use bank_erro().

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Jul 29, 2009 3:23 pm
by Andreas the Wise
Here's something interesting. I'm in my account (which has admin). I try to change type of an account (eg to government). It does so ... but then it also wipes my admin powers. I can no longer see all the admin features, only "Gralus Summary" which no longer gives me individual accounts either. If I log out and log in again, I have admin powers again ... until I change an account type. Same on Company.

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Jul 29, 2009 4:08 pm
by Erik Mortis
That's... bizarre... I must be resetting your $SESSION['status']... I'll look into it.


I have fixed it. (and all the other change*.php pages to check to make sure you are changing yourself before bothering to update the session.

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Jul 29, 2009 7:04 pm
by Andreas the Wise
Working, thanks!

I've added in Gov/Company status, to the best of my knowledge (I assume that Gov includes things like ministries, and renders them tax exempt). Can users see their status? It appears not, as far as I can tell.

For the future, it would be nice if the bank stats gave average account funds for Private/Company/Government accounts separately (because they are inherently different types of monetary amounts). It might also be interesting to provide such averages per country too, so we could see which citizens were richer (on average).

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Jul 30, 2009 12:31 pm
by Erik Mortis
Yeah. Government is tax exempt. Except for Regional Accounts which are not on the Imperial Level.

The stats page needs work, I haven't bothered with it since putting in all these new things.

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Oct 07, 2009 3:07 am
by Jonas
Erik, I'm still hoping that you will add the nation's name behind the account name in the list (when you want to send money). Something like this:
Erik Mortis (Shireroth)
:fish

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Oct 07, 2009 9:07 pm
by Erik Mortis
I'd have to change some things, but it is doable.

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Oct 08, 2009 7:11 am
by Jonas
Really?! :yay:

Re: Bank update: 0.7.4-0.8.1

Posted: Fri Oct 09, 2009 7:01 pm
by Erik Mortis
Actually. No. I was pondering how it's done in my head, and it's not possible to do as it's currently programmed. Or.. More accurately, I could have it display that way, but then the bank would no longer function, as that is not how usernames are stored.

Re: Bank update: 0.7.4-0.8.1

Posted: Sat Oct 10, 2009 3:00 am
by Jonas
Erik Mortis wrote:Actually. No. I was pondering how it's done in my head, and it's not possible to do as it's currently programmed. Or.. More accurately, I could have it display that way, but then the bank would no longer function, as that is not how usernames are stored.
And if you make two columns? One with the name and next to it the nation?

Re: Bank update: 0.7.4-0.8.1

Posted: Sat Oct 10, 2009 2:24 pm
by Andreas the Wise
Couldn't you display it by
echo "$username ($nation)"; whatever those variables are called (actually more likely $row['username'] and $row['nation'] or equivalent). If the variables don't display well within " ", then concatenate the string -
echo $username . " (" . $nation . ")";

Re: Bank update: 0.7.4-0.8.1

Posted: Sun Oct 11, 2009 11:10 am
by Erik Mortis
That would work, but he's talking about altering the drop menu that lets you pick a name to send money to.

Re: Bank update: 0.7.4-0.8.1

Posted: Sun Oct 11, 2009 2:07 pm
by Andreas the Wise
Ah. Well ... no, you're right, that would be fairly difficult.

Re: Bank update: 0.7.4-0.8.1

Posted: Mon Oct 12, 2009 12:43 pm
by Erik Mortis
Unless I can make the displayed value OTHER then the actual value... but I know such way to do that in HTML.

Re: Bank update: 0.7.4-0.8.1

Posted: Mon Oct 12, 2009 1:32 pm
by Andreas the Wise
Actually ... displayed value other than the actual value should be easy. You can certainly do it in drop down menus ....

Re: Bank update: 0.7.4-0.8.1

Posted: Tue Oct 13, 2009 5:31 pm
by Erik Mortis
with HTML forms? Got a link to an example? I'm sure it's easy. I just haven't seen the syntax for it.

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Oct 14, 2009 4:03 am
by Andreas the Wise
http://w3schools.com/html/tryit.asp?fil ... ml_select2


In summary:
<option value="volvo">Volvo</option>
Change the bit inside the " " to whatever you want the database to receive. Change the bit between the < ... > </option> into what you want displayed.

Re: Bank update: 0.7.4-0.8.1

Posted: Wed Oct 14, 2009 12:05 pm
by Erik Mortis
Why didn't I see that..... thanks.

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 2:59 pm
by Andreas the Wise
As the only person worried by this, as the only person other than you with access to it ...
The System Transaction Log. At one point, the table displayed so the Date column was wide enough so that the date fitted on one line. Now it doesn't. And it annoys me, because in one fell swoop it doubles the scrolling distance to see the latest transaction. Could you widen that column again, so the date displays on one line?

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 4:58 pm
by Erik Mortis
I think the issue was that someone made a reason that was to long. it's automatically done. It's your screen size that causes it to wrap. I have no power over it. (well, maybe). It annoys me too. but the alternative is scrolling left/right or smaller font.

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 5:14 pm
by Andreas the Wise
Erik Mortis wrote:I think the issue was that someone made a reason that was to long. it's automatically done. It's your screen size that causes it to wrap. I have no power over it. (well, maybe). It annoys me too. but the alternative is scrolling left/right or smaller font.
Hmm. Can you make the Reason column a set length then? Would that solve it?

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 5:54 pm
by Erik Mortis
proly. Then I'de have to go truncate the reasons already there.

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 6:18 pm
by Andreas the Wise
My thought was, if the reason column is the one that goes double-lined if necessary, instead of the date, then that would produce far less double lines ...

Re: Bank update: 0.7.4-0.8.1

Posted: Thu Nov 05, 2009 6:51 pm
by Erik Mortis
Not sure I can do that due to how it's printed. it's an HTML issue.