Pošalji zapis e-poštom: Photoionization and shock modelling of the h II region abundance sequence and of luminous infrared galaxies