inc/users.inc.php
changeset 36 4ec5ab29f634
parent 26 5d63f1e71d6e
child 47 ae140472d97c
equal deleted inserted replaced
35:5533c4fff98f 36:4ec5ab29f634
   378       if (is_numeric($id))
   378       if (is_numeric($id))
   379       {
   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");
   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)
   381               if ($result->numRows() == 0)
   382               {
   382               {
   383                       error(ERR_USER_NOT_EXIST);
   383 		      return "";
   384               } else {
   384               } 
       
   385 	      else 
       
   386 	      {
   385                       $names = array();
   387                       $names = array();
   386                       while ($r = $result->fetchRow()) {
   388                       while ($r = $result->fetchRow()) 
       
   389 		      {
   387                               $names[] = $r['fullname'];
   390                               $names[] = $r['fullname'];
   388                       }
   391                       }
   389                       return implode(', ', $names);
   392                       return implode(', ', $names);
   390               }
   393               }
   391       }
   394       }