It seems that you are having absolute constipation
Sitting for long time with giving strain for passing stool, there might be having stiff back and leg muscles producing pain on back and legs.
Due to passing hard fecal material there might be some injury
to piles giving rise bleeding.
Take plenty of water.
Take laxative daily at night.
Take more fiber containing diet.
ok andtake care.