Structure of electric double layers: A simple weighted density functional approach