See this line in your code above?
Code:
if (eregi("block-Block_Creator.php",$PHP_SELF)) {
Make "block-Block_Creator.php" the same as your files name. So if the name of the block's PHP file is warnings.php this line should read "block-warnings.php
Try that with your original code