added nzbstatus check for gid creation

added db connect string to start of loop in monitor.php, should help the with disabled by running issues