Bifurcation analysis of a linear Hamiltonian system with two kinds of impulsive control