Something close to that. One that is a little more in depth than that. It is similar however it doesn't require the key to be stored within the PHP file. Just glancing at the link it appears to use a blowfish algorithm which if memory serves right uses a reverse sequence to encrypt your data. I didn't do a lot of studying about blowfish when it was first introduced because of this. So such as if you have:
1234567890 It would then encrypt using something with the reverse sequence and a key provided in order to encrypt the data.
Something such as: 0987654321 + key
I could be wrong as it was a very long time ago that I read the article explaining how blowfish actually encrypts and frankly at that time it was a little over my head however I believe it was something similar to the above. Blowfish to my knowledge has never been broken or cracked even with its simplistic encryption method.
The encryption program I have uses the PHP mcrypt to encrypt using the AES256 algorithm with SALT added in to it. Otherwise it is similar to what you have shown.
I was under the impression that sha1 was an encryption and not a hash. Thanks for the clarification on that. I don't use SHA1. Either way SHA1 if you look it up is not a good way to store passwords since it can be easily decrypted.
Explanation of broken and cracked. (Does not apply to hashes)
When an encryption algorithm is considered broken it means that there has been a flaw found in the algorithm. This flaw doesn't mean that you can decrypt the data from the flaw. It merely means that there is something wrong with the algorithm. Example: AES256 has been broken but not cracked. What this means is that instead of it taking 1 billion billion years to decipher a password using that algorithm it will simply take over a billion years (or hundreds of millions of years) to crack the password.
When an encryption algorithm is considered cracked it means that the flaws that were found can be used to decipher the encrypted material without the encryption key. Someone successfully exploited the flaws found in the algorithm to decrypt encrypted data.
Hashing Alogrithms such as MD5 are easier to crack because of the MD5 hash databases out there. There are even articles on how to decrypt MD5 Encrypted Passwords with Salt.