Multipartite entanglement between atoms and fields via twofold phase-dependent electromagnetically induced transparency