inc/record.inc.php
changeset 56 6db9adfa86ac
parent 55 a885f557678f
child 57 acc4da012674
--- a/inc/record.inc.php	Sat Dec 29 14:42:34 2007 +0000
+++ b/inc/record.inc.php	Tue Jan 01 20:36:17 2008 +0000
@@ -148,6 +148,25 @@
 }
 
 
+function add_record_owner($zoneid,$userid,$recordid)
+{
+	global $db;
+	if (!xs($zoneid))
+	{
+		echo "debug: $zoneid";
+		error(ERR_RECORD_ACCESS_DENIED);
+	}
+	if (is_numeric($zoneid) || is_numeric($userid) || is_numeric($recordid))
+	{
+		$db->query("INSERT INTO record_owners (user_id, record_id) VALUES ('".$userid."','".$recordid."')");
+		return true;
+	}
+	else
+	{
+		error(sprintf(ERR_INV_ARGC, "add_record_owner", "at least one of the arguments is not numeric"));
+	}
+}
+
 /*
  * Adds a record.
  * This function validates it if correct it inserts it into the database.