My iPhone is saying ' charging is not supported with this accessory' but isnt plugged into anything?
The problem seems to be with the cable, where its 30-pin connector is broken. I'll advise you to try charging your iPhone with the Apple's main adapter, or the Apple cable. You can still buy a new adapter and try charging the iPhone.
Get it fixed. Bring it to your local Apple Inc. store.
The cord could be frayed, adapter broken. That's the message I got when my charger wasn't working and I needed a new one.