Pm limit per day in lava

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pm limit per day in lava

    If you know about this code then please learn me.
    LoveForum.BiZ

    #2
    You have many solution. I'll show you one method.

    add a col in _users , pmstoday int(3)
    in _settings last_cron int(10)

    // in inboxproc.php
    PHP Code:
    $info mysql_fetch_object(mysql_query("SELECT `pmstoday` FROM `ibwf_users` WHERE `id`='$uid'"));
    if (
    $info->pmstoday <= 100// 100 - max pms in one day
    {
      
    // send pm code
      
    mysql_query("UPDATE `ibwf_users` SET `pmstoday`=`pmstoday`+1 WHERE `id`='$uid'");
    }
    else
    {
      echo 
    'Bla bla bla errors.';

    // index.php maybe core.php (if you have mysql instance declarated)
    PHP Code:
    $sett mysql_fetch_oject(mysql_query("SELECT `value` FROM `ibwf_settings` WHERE `name`='last_cron'"));
    if (
    $sett->value time())
    {
       
    mysql_query("UPDATE `ibwf_users` SET `pmstoday`='0'");
       
    mysql_query("UPDATE `ibwf_settings` SET `value`='".time()."' WHERE `name`='last_cron'");

    <?php unlink('World/Europe/Romania.country'); ?>

    Comment

    Working...
    X