index.php has include ("config.php"); as the first line. config.php has $q = $_GET['q']; as line 15. Meaning you supply q when you run the index.php script.
Your no MySQL-Link comes from database opened in config.php. Guess you didn't open it.
Your last two looks like it wants a price from a table forsale_content.
My guess you are running these files without setting up the needed database and tables.