Mise à jour copyright

Indentation du code
This commit is contained in:
Rodolphe Quiedeville 2003-05-15 19:31:07 +00:00
parent 570179fdf1
commit 08467fb2ef

View File

@ -1,5 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* *
* $Id$ * $Id$
* $Source$ * $Source$
@ -53,14 +53,18 @@ class ActionComm
* *
* *
*/ */
Function add($author) { Function add($author)
{
$sql = "INSERT INTO actioncomm (datea, fk_action, fk_soc, fk_user_author, fk_user_action, fk_contact, percent, note,priority) "; $sql = "INSERT INTO actioncomm (datea, fk_action, fk_soc, fk_user_author, fk_user_action, fk_contact, percent, note,priority) ";
$sql .= " VALUES ('$this->date',$this->type,$this->societe, $author->id,"; $sql .= " VALUES ('$this->date',$this->type,$this->societe, $author->id,";
$sql .= $this->user->id . ", $this->contact, $this->percent, '$this->note', $this->priority);"; $sql .= $this->user->id . ", $this->contact, $this->percent, '$this->note', $this->priority);";
if ($this->db->query($sql) ) { if ($this->db->query($sql) )
{
return 1; return 1;
} else { }
else
{
print $this->db->error() . "<br>" . $sql; print $this->db->error() . "<br>" . $sql;
} }
} }
@ -69,13 +73,16 @@ class ActionComm
* *
* *
*/ */
Function fetch($id) { Function fetch($id)
{
$sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact "; $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note,c.libelle, fk_soc, fk_user_author, fk_contact ";
$sql .= "FROM actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;"; $sql .= "FROM actioncomm as a, c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;";
if ($this->db->query($sql) ) { if ($this->db->query($sql) )
if ($this->db->num_rows()) { {
if ($this->db->num_rows())
{
$obj = $this->db->fetch_object(0); $obj = $this->db->fetch_object(0);
$this->id = $id; $this->id = $id;
@ -91,7 +98,9 @@ class ActionComm
$this->db->free(); $this->db->free();
} }
} else { }
else
{
print $this->db->error(); print $this->db->error();
} }
} }
@ -100,7 +109,8 @@ class ActionComm
* *
* *
*/ */
Function delete($id) { Function delete($id)
{
$sql = "DELETE FROM actioncomm WHERE id=$id;"; $sql = "DELETE FROM actioncomm WHERE id=$id;";