Yes, they are friction shifters. Both should be really budget friendly and can be made to work with many different gear counts.
Friction shifters generally do not need to match the advertised gear count with the real cog or chainring count on the bike. Shifters move the derailleur and keep it in position by means of pulling the cable and keeping it in tension. The friction type usually have many small detents to help keep the lever in position. These detents are small enough that they can make little difference in cable pull, so effectively 2 or 3 diferent detents can be right to keep the derailleur in the same cog. 7 Speed and less cog systems usually have very loose tolerances, which aids towards working with low-spec shifters. In contrast, indexed shifters are designed to pull the cable in specific, fixed amounts, wich relieve the rider from finely adjusting the lever every time they shift, but require fine tuning and a bit more maintenance.
What limits the amount of cogs the shifter is good for is primarily the amount of cable pull you can achieve, which depends on the diameter of the barrel where the cable spools into and how much the lever can spin. However, higher cog counts require very precise cable pull since the cogs are spaced closer together, and so can be impractical to use with friction shifters, since it is more difficult to turn the lever a very exact amount, by hand, every time.
As far as I know, the cog spacing for 7 and lower is always the same, but for 8 cogs is diminished a little, which means the total cable pull you need to move the derailleur from smallest to largest cog is almost the same in a 7 speed or in an 8 speed.
I currently use shifters that look exactly like the ones on your first picture on a 3x9 transmission on a bike that originally came with 3x8 indexed, non-friction MTB shifters and they work perfectly fine. The ones I bought did cost me around US$ 5 locally (in Tegucigalpa, Honduras) Here, most bike products of this quality level are imported from China.
The ones on your second picture appear to be functionally exactly the same, just a different aesthetic. That type of shifter may also vary greatly in quality. The cheaper plastic ones may be prone to breaking and getting brittle if they spend a lot of time in direct sun shine. The good thing is you can find ones that look nicer.
You can also find, from certain known brands, ones that are really nice, very well machined and polished, but can cost ten to twenty times more. I've have never used those nicer versions and do not know if they are worth the extra expense in the functional sense. They sure do add visual appeal to the bike (but that can be the opposite of what you want for an specific bike).
There are friction shifters available that are indexed. Those are essentially the same thing but instead of many very small detents, they have a specific number of large ones. Those can be nicer but you do have to match the number of shifts with the numbers of cogs and chainrings you plan to use. They also result in a system that needs to be fine tuned, like trigger type, indexed shifters. You can distinguish them because they usually bear somewhat large number labels. None of the examples you give appear to have these.
Here is an example image:
A word of caution: A friction shifter, specially the ones pictured on the O.P. examples, do not have a limiter and may be able to pull enough cable to make the derailleur go past the largest cog, maybe even into the spokes. If that happens while you are pedalling, you may jam the chain between spokes and the cog, or even make the derailleur catch on the spokes and be pulled backwards, breaking it. That is why it is imperative to properly set the limit screws on the rear derailleur specifically. On the front Derailleur a similar problem can occur, making the chain fall off the largest chainring and into the crank arm. An indexed system can somewhat get away with less than perfect limit screw setting since they have a more controlled cable pull range.