Nasser's answer is indeed the correct one. The second screenshot is from Mathematica 8 whereas the first one is from Mathematica 9.
CDF are created by exporting a notebook as the Moderation team mention. If you want to have a cdf without the original code that creates the various dynamic contents you simply delete that code and then export as CDF. You could create a notebook for this purpose (retaining the original notebook) by copying and pasting the original content into the new notebook and exporting from there afer selecting and deleting all Input cells.
An alternative (and there are many) is to select the input cells and change them to closed cells through the Cell/CellProperties menu. You can also suppress their cell brackets by using the option inspector as needed.