Gate-dependent spectral functions and many-body effect for a triple dot structure