replace smarty by php