Page is a not externally linkable
MaxPowers - 8:40 pm on Jul 31, 2012 (gmt 0)
Your $$ bits were likely intentional by the original coders and plugins may rely on this code. Your MySQL wrapper seems to allow you to pass a connection handle to the connection function.
By default, your handle variable is $db_link and $link is set to 'db_link', so your connection does live at $$link. They could have done this other ways, but I see what they had going there.
It looks like you also need to change mysql_pconnect and mysql_connect to use the mysqli_ extension.
If your text editor has a search function, find all mysql_ and change them to mysqli_
As always, be sure to back everything up.