Author Topic: Bank interest  (Read 7112 times)

Offline ValeeLaprade

Bank interest
« on: February 09, 2013, 09:11:41 am »
Some tutorial to activate interest in the bank? Before was in:
http://www.dansoftaustralia.net/smfshop_wiki/Bank_Interest
But now nothing shows in the page.  :(

I use SMF 2.0.4

Sorry for my english why only speak spanish
« Last Edit: February 09, 2013, 09:19:08 am by ValeeLaprade »

Offline WhiteEagle

Re: Bank interest
« Reply #1 on: February 26, 2013, 01:49:05 pm »
Hmmm, there was no dointerest.php in the file I got from SMF, so I Googled it up and created it.

I'm now getting this error in my cron job:
Fatal error: Call to undefined function  db_query() in /home/adultfun/public_html/site/Sources/shop/dointerest.php on line 20

How do I fix it?\

Update: Here is the code from the file:
Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.com/        |
\**********************************************/

//File: dointerest.php
//      The file to add interest to member's bank

//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005
// $Id: dointerest.php 4 2006-07-08 10:09:08Z daniel15 $

if(!isset($_SERVER["HTTP_HOST"])) {

   include(
"/home/adultfun/public_html/site/SSI.php");
   
   
$interest_rate $modSettings['shopInterest'] / 100;
   
db_query("UPDATE {$db_prefix}members
           SET moneyBank = moneyBank + (moneyBank*
{$interest_rate})"__FILE____LINE__);
   
   echo 
"Interest added at ".date("d/m/Y h:i:s A");
}
?>

« Last Edit: March 01, 2013, 01:09:35 pm by WhiteEagle »

Offline WhiteEagle

Re: Bank interest
« Reply #2 on: March 02, 2013, 02:19:27 pm »
Update: Interest is a scheduled task in 2.0.x - no need to set it up apparently. :D

Offline spartacus258

Re: Bank interest
« Reply #3 on: July 01, 2013, 08:08:59 am »
Yeah, i taught so ;D
Cand o femeie cumpara pantofi dama sau sandale dama va cumparara intotdeauna si o rochii de seara