1. It can be done with PHP and a database. You can try looking
for open-source ad servers or code a simple one on your own.
2. I don't get your question. You mean you would like to
modularize that section of HTML code for your sidebar such that
when you update it, all the pages that contains the sidebar will be
updated as well? If so, PHP's include() function may suit your
needs.
2) not really... but I think i got this gist le... It is more of
like an online shopping website, the sidebar remain same throughout
with the links, the other side contains the products, or shopping
cart, or anything, whenever u click to view other products or
links. Guess could use PHP to churn out the html file