replaced access to deprecated rcmail functions

functions found:
- get_table_name
- write_log