tbrehm
2010-01-26 327f28a3e300b3e5c7000cbb0763cc8314b1c45b
interface/web/sites/database_edit.php
@@ -96,9 +96,10 @@
         $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name";
         $clients = $app->db->queryAllRecords($sql);
         $client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>';
         $tmp_data_record = $app->tform->getDataRecord($this->id);
         if(is_array($clients)) {
            foreach( $clients as $client) {
               $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
               $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
               $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
            }
         }
@@ -133,9 +134,10 @@
         $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
         $clients = $app->db->queryAllRecords($sql);
         $client_select = "<option value='0'></option>";
         $tmp_data_record = $app->tform->getDataRecord($this->id);
         if(is_array($clients)) {
            foreach( $clients as $client) {
               $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
               $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
               $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
            }
         }