0) { // // Now we connect to the MySQL server and select the database // include_once $directory.'/admin/config.inc.php'; if ($dbc = @mysql_connect ($GB_DB['host'], $GB_DB['user'], $GB_DB['pass'])) { if (!@mysql_select_db ($GB_DB['dbName'], $dbc)) { die ('

Could not select the database because: '.mysql_error().'

'); } } else { die ('

Could not connect to MySQL because: '.mysql_error().'

'); } // // End of MySQL database information check // $our_query = 'SELECT COUNT(p_filename) AS totalpics FROM '.$table_prefix.'_pics'; $result = mysql_fetch_assoc(mysql_query($our_query, $dbc)); if($imgcount > $result['totalpics']) { echo 'You have ' . ($imgcount - $result['totalpics']) . ' orphaned image files in your public directory.'; } } ?>