~ubuntu-branches/ubuntu/maverick/ilohamail/maverick

« back to all changes in this revision

Viewing changes to IlohaMail/include/as_update.DB.inc

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-02-04 13:44:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040204134437-kz8j3ui2qa7oq8z2
Tags: upstream-0.8.12
ImportĀ upstreamĀ versionĀ 0.8.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
?>
 
 
b'\\ No newline at end of file'