Iphone doesn't want to connect to Wi-Fi. Does it have a virus?

I have a black iPhone 4s. It can't search for nearby Wi-Fi signals. When I open the control panel the Wi-Fi icon circle is blacked out when I touch it says [Wi-Fi not available]. When I go to settings it won't let me swipe to turn on the Wi-Fi signal. I can still go on the internet using my data. My iPhone is not jail broken. I have turned off and on my iPhone multiple times. I let the battery die. And I have also restarted it multiple times. Bluetooth also doesn't work.

Uhh no. Iphones don't get viruses.

go settings>general>reset>reset all data settings

The wi-fi modem must have been setup up with access list which allows only those MAC address which are
fed in it instead of being an open connection.

Reinstall newest/latest ios

You have to plug it into computer or upload software

If the option to turn it on is grayed out then you have most likely have a hardware problem. In most cases a cracked solder joint in the wi-fi module on the logic board. Sometimes this can be re-flowed in order to solve the problem although not always. I would go to a cell phone repair shop and ask them if they are familiar with the procedure.