equal
deleted
inserted
replaced
16 * GNU General Public License for more details. |
16 * GNU General Public License for more details. |
17 * |
17 * |
18 * You should have received a copy of the GNU General Public License |
18 * You should have received a copy of the GNU General Public License |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 */ |
20 */ |
|
21 |
|
22 function zone_id_exists($zid) { |
|
23 global $db; |
|
24 $query = "SELECT COUNT(id) FROM domains WHERE id = " . $db->quote($zid); |
|
25 $count = $db->queryOne($query); |
|
26 if (PEAR::isError($result)) { error($result->getMessage()); return false; } |
|
27 return $count; |
|
28 } |
|
29 |
21 |
30 |
22 function get_zone_id_from_record_id($rid) { |
31 function get_zone_id_from_record_id($rid) { |
23 global $db; |
32 global $db; |
24 $query = "SELECT domain_id FROM records WHERE id = " . $db->quote($rid); |
33 $query = "SELECT domain_id FROM records WHERE id = " . $db->quote($rid); |
25 $zid = $db->queryOne($query); |
34 $zid = $db->queryOne($query); |