Problemet ligger vist i denne linie:
$query = mysql_query("SELECT id,title FROM news ORDER BY id DESC LIMIT ".$offset.",".$cfg['limit']."") or die(mysql_error());
Den skal nok nærmere se sådan her ud:
$query = mysql_query("SELECT id,title FROM news ORDER BY id DESC LIMIT ".$offset.",".$cfg['limit']) or die(mysql_error());