SMF Shop

SMFShop => Installation Problems => Topic started by: ValeeLaprade on February 09, 2013, 09:11:41 am

Title: Bank interest
Post by: ValeeLaprade 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
Title: Re: Bank interest
Post by: WhiteEagle 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");
}
?>

Title: Re: Bank interest
Post by: WhiteEagle 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
Title: Re: Bank interest
Post by: spartacus258 on July 01, 2013, 08:08:59 am
Yeah, i taught so ;D