Pakistan’s president says terrorist attacks won’t end friendship with China