Trying to create a custom block
Make sure your module is named custom_block to match the function names you have used for your hooks. If you have to change the name of your module you will need to re-enable it.
Technically you should uninstall the module, then rename and re-enable - unless it isn't properly installed ans you can't uninstall it. This will keep unwanted data out of your database.

You also should not be printing things outside of functions in module files, like the views code at the top is doing.

Printing markup should be done at the theme level in templates, or in appropriate functions in your module (like you are going in your hook_block_view()).