A polytropic model of quark stars