home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / as_update.DB.inc < prev    next >
Encoding:
Text File  |  2003-03-16  |  890 b   |  31 lines

  1. <?php
  2. /********************************************************
  3.     include/as_update.DB.inc
  4.     
  5.     (C)2002-2003 Ryo Chijiiwa <Ryo@IlohaMail.org>
  6.  
  7.     This file is part of IlohaMail, and released under GPL.
  8.     See COPYING, or http://www.fsf.org/copyleft/gpl.html
  9.     
  10.     PURPOSE:
  11.         Update session table with latest send operation.
  12.  
  13. ********************************************************/
  14.  
  15.     // delete this session and any old unclosed ones
  16.     include_once("../conf/db_conf.php");
  17.     
  18.     //connect to db
  19.     include_once("../include/idba.$DB_TYPE.inc");
  20.     $db = new idba_obj;
  21.     if ($db->connect()){
  22.         $numSent = $numSent+$num_recepients;
  23.         $sql = "UPDATE $DB_SESSIONS_TABLE";
  24.         $sql.= " SET lastSend=".time().", numSent=$numSent";
  25.         $sql.= " WHERE sid='$sid'";
  26.         if ($db->query($sql)) echo "as updated done.<br>\n";
  27.         else echo "as update failed: $sql <br>\n";
  28.     }else{
  29.         echo "DB connection failed.<br>\n";
  30.     }
  31. ?>