inc/record.inc.php
changeset 56 6db9adfa86ac
parent 55 a885f557678f
child 57 acc4da012674
equal deleted inserted replaced
55:a885f557678f 56:6db9adfa86ac
   146 	}
   146 	}
   147 
   147 
   148 }
   148 }
   149 
   149 
   150 
   150 
       
   151 function add_record_owner($zoneid,$userid,$recordid)
       
   152 {
       
   153 	global $db;
       
   154 	if (!xs($zoneid))
       
   155 	{
       
   156 		echo "debug: $zoneid";
       
   157 		error(ERR_RECORD_ACCESS_DENIED);
       
   158 	}
       
   159 	if (is_numeric($zoneid) || is_numeric($userid) || is_numeric($recordid))
       
   160 	{
       
   161 		$db->query("INSERT INTO record_owners (user_id, record_id) VALUES ('".$userid."','".$recordid."')");
       
   162 		return true;
       
   163 	}
       
   164 	else
       
   165 	{
       
   166 		error(sprintf(ERR_INV_ARGC, "add_record_owner", "at least one of the arguments is not numeric"));
       
   167 	}
       
   168 }
       
   169 
   151 /*
   170 /*
   152  * Adds a record.
   171  * Adds a record.
   153  * This function validates it if correct it inserts it into the database.
   172  * This function validates it if correct it inserts it into the database.
   154  * return values: true if succesful.
   173  * return values: true if succesful.
   155  */
   174  */