Code

updated glpi class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Jan 2006 13:54:18 +0000 (13:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Jan 2006 13:54:18 +0000 (13:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2407 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_glpi.inc

index 6c390cd43f1bd7571d445809b17135501547aeea..2170e0089aee68e6ce833d7c31918d6ba9cb1ee1 100644 (file)
@@ -824,6 +824,30 @@ class glpiDB{
                return($this->is_connected);
        }
 
+       function deleteAttachment($id)
+       {
+               if($this->is_connected){
+                       $qry = "DELETE FROM glpi_docs WHERE ID=".$id."";
+                       $this->query($qry);
+               }else{
+            echo "not connected";
+            return(false);
+        }
+       }
+       
+       function getAttachments()
+       {
+               if($this->is_connected){
+                       $qry = "SELECT * FROM glpi_docs WHERE name!='';";
+                       $ret = $this->query($qry);
+                       return($ret);
+               }else{
+            echo "not connected";
+            return(false);
+        }
+       }
+       
+
 }
 //$s = new glpiDB("vserver-01","glpi","tester","glpi");
 //print_r($s->query("SELECT * FROM glpi_computers"));