getPdo(); $data = []; if ($type === 'all' || $type === 'country') { $data['countries'] = $pdo->query( "SELECT id, code, name FROM data_dict_country WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } if ($type === 'all' || $type === 'area') { $data['areas'] = $pdo->query( "SELECT id, code, name, parent_code FROM data_dict_area WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } if ($type === 'all' || $type === 'industry') { $data['industries'] = $pdo->query( "SELECT id, code, name, parent_code FROM data_dict_industry WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } if ($type === 'all' || $type === 'certificate') { $data['certificates'] = $pdo->query( "SELECT id, code, name FROM data_dict_certificate WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } if ($type === 'all' || $type === 'source_channel') { $data['source_channels'] = $pdo->query( "SELECT id, name FROM source_channels WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } if ($type === 'all' || $type === 'company_type') { $data['company_types'] = $pdo->query( "SELECT id, code, name FROM data_dict_company_type WHERE is_active = 1 ORDER BY sort_order, id" )->fetchAll(); } Response::success($data);