base on YiiFramework 1.x