update pages.php: testing directory helper.
update upload.php and form_main.php