inc/record.inc.php
changeset 169 41353c2e0c9f
parent 161 0832d846bf8e
child 170 391e744a1def
equal deleted inserted replaced
168:e675b676907a 169:41353c2e0c9f
   934 	else { $perm_content_edit = "none" ; }
   934 	else { $perm_content_edit = "none" ; }
   935 
   935 
   936 	// Search for matching domains
   936 	// Search for matching domains
   937 	if ($perm == "own") {
   937 	if ($perm == "own") {
   938 		$sql_add_from = ", zones ";
   938 		$sql_add_from = ", zones ";
   939 		$sql_add_where = " AND zones.domain_id = domains.id AND zones.owner = " . $db->quote($userid);
   939 		$sql_add_where = " AND zones.domain_id = domains.id AND zones.owner = " . $db->quote($_SESSION['userid']);
   940 	}
   940 	}
   941 	
   941 	
   942 	$query = "SELECT 
   942 	$query = "SELECT 
   943 			domains.id AS zid,
   943 			domains.id AS zid,
   944 			domains.name AS name,
   944 			domains.name AS name,
   961 
   961 
   962 	// Search for matching records
   962 	// Search for matching records
   963 
   963 
   964 	if ($perm == "own") {
   964 	if ($perm == "own") {
   965 		$sql_add_from = ", zones ";
   965 		$sql_add_from = ", zones ";
   966 		$sql_add_where = " AND zones.domain_id = record.id AND zones.owner = " . $db->quote($userid);
   966 		$sql_add_where = " AND zones.domain_id = record.id AND zones.owner = " . $db->quote($_SESSION['userid']);
   967 	}
   967 	}
   968 
   968 
   969 	$query = "SELECT
   969 	$query = "SELECT
   970 			records.id AS rid,
   970 			records.id AS rid,
   971 			records.name AS name,
   971 			records.name AS name,