Actually you need to give someone a chance to see your post.
You should not edit the code as you have above.
Problem 2 actual resolution is this
$description = stripslashes( $description );
$desc = stripslashes( $desc );
Find this line in showproduct.php
$tptitle[$tpfound] = ( strlen($toptitle) > 20 ? substr($toptitle,0,20)."..." : $toptitle );
above it add
$toptitle = stripslashes( $toptitle );
$Globals['maindir']} is most definately defined and used throughout the program everywhere