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

« back to all changes in this revision

Viewing changes to IlohaMail/include/save_colors.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
    save_colors.DB.inc
 
4
    
 
5
    (C)Copyright 2002 Ryo Chijiiwa
 
6
    This file is part of IlohaMail, released under GPL
 
7
 
 
8
        PURPOSE:
 
9
                Save colors (in $my_colors) to DB back-end
 
10
        PRE-CONDITIONS:
 
11
                "include/session_auth.inc"
 
12
                $dataID 
 
13
                $my_colors
 
14
                
 
15
********************************************************/
 
16
 
 
17
include_once("../include/array2sql.inc");
 
18
include_once("../conf/db_conf.php");
 
19
include_once("../include/idba.$DB_TYPE.inc");
 
20
 
 
21
$iOpened = false;
 
22
 
 
23
if ($session_dataID > 0){
 
24
        //connect to db
 
25
        $db = new idba_obj;
 
26
        if ($db->connect()){
 
27
                //update
 
28
                $sql = Array2SQL($DB_COLORS_TABLE, $my_colors, "UPDATE");
 
29
                $sql.= " WHERE id=$session_dataID";
 
30
                if (!$db->query($sql)) echo "DB query failed: $sql <br>\n";
 
31
        }else{
 
32
                echo "DB connection failed.<br>\n";
 
33
        }
 
34
}
 
35
?>
 
 
b'\\ No newline at end of file'