Changeset 229 for trunk/forms.php
- Timestamp:
- Jun 21, 2009, 12:04:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forms.php
r219 r229 94 94 $Edit = '<select style="width: 100%;" name="'.$Context.$Index.'">'; 95 95 $DbResult = $Database->select($FormTypes[$Item['Type']]['Table'], $FormTypes[$Item['Type']]['Id'].' as Id, '.$FormTypes[$Item['Type']]['Name'].' as Name', $FormTypes[$Item['Type']]['Filter'].' ORDER BY Name'); 96 while($Row = $DbResult->fetch_array()) 97 $Edit .= '<option value="'.$Row['Id'].'">'.$Row['Name'].'</option>'; 96 while($Row = $DbResult->fetch_assoc()) 97 { 98 if($Row['Id'] == $this->Values[$Index]) $Selected = ' selected="selected"'; 99 else $Selected = ''; 100 $Edit .= '<option value="'.$Row['Id'].'"'.$Selected.'>'.$Row['Name'].'</option>'; 101 } 98 102 $Edit .= '</select>'; 99 103 break;
Note:
See TracChangeset
for help on using the changeset viewer.