Author Topic: SMFShop Manual Interest  (Read 2104 times)

Offline Suzie Q

SMFShop Manual Interest
« on: December 05, 2010, 10:21:44 pm »
Can someone tell me what code I need to put into a clickable button to update all bank savers by a percentage of their saved amounts ie. the interest.

Ive tried fiddling with the following with no joy.

Quote
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.net/        |
\**********************************************/

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

//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005

include("https://localhost/SMF/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");
?>


Thanks

SMF Shop3.1.6.1 SMF2.0