Copyright notes at top op every source file
[fa-stable.git] / inventory / includes / db / items_category_db.inc
index 5372e0aff3c14460189398385e4f73096802f0e9..fb856eae8b1c9d80c35c41a01f90896bde08c513 100644 (file)
@@ -1,10 +1,19 @@
 <?php
-
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
 function add_item_category($description)
 
 {
        $sql = "INSERT INTO ".TB_PREF."stock_category (description)
-               VALUES (".db_quote($description).")";
+               VALUES (".db_escape($description).")";
 
        db_query($sql,"an item category could not be added");
 }
@@ -12,7 +21,7 @@ function add_item_category($description)
 function update_item_category($ItemCategory, $description)
 
 {
-       $sql = "UPDATE ".TB_PREF."stock_category SET description = ".db_quote($description)."
+       $sql = "UPDATE ".TB_PREF."stock_category SET description = ".db_escape($description)."
         WHERE category_id = '$ItemCategory'";
 
        db_query($sql,"an item category could not be updated");
@@ -44,5 +53,4 @@ function get_category_name($id)
        return $row[0];
 }
 
-
 ?>
\ No newline at end of file