equal
deleted
inserted
replaced
362 error(ERR_USER_NOT_EXIST); |
362 error(ERR_USER_NOT_EXIST); |
363 } |
363 } |
364 } |
364 } |
365 error(ERR_INV_ARG); |
365 error(ERR_INV_ARG); |
366 } |
366 } |
|
367 |
|
368 /** |
|
369 * get_owners_from_domainid |
|
370 * |
|
371 * @todo also fetch the subowners |
|
372 * @param $id integer the id of the domain |
|
373 * @return String the list of owners for this domain |
|
374 */ |
|
375 function get_owners_from_domainid($id) { |
|
376 |
|
377 global $db; |
|
378 if (is_numeric($id)) |
|
379 { |
|
380 $result = $db->query("SELECT users.id, users.fullname FROM users, zones WHERE zones.domain_id=$id AND zones.owner=users.id ORDER by fullname"); |
|
381 if ($result->numRows() == 0) |
|
382 { |
|
383 error(ERR_USER_NOT_EXIST); |
|
384 } else { |
|
385 $names = array(); |
|
386 while ($r = $result->fetchRow()) { |
|
387 $names[] = $r['fullname']; |
|
388 } |
|
389 return implode(', ', $names); |
|
390 } |
|
391 } |
|
392 error(ERR_INV_ARG); |
|
393 } |
|
394 |
367 ?> |
395 ?> |