add notice on unpaid order
there should be a break after case
use db_query and better redirection
drop db_select