function charge(nom)
	file=fs.open(nom,"r")
	tmp=file.readAll()
	file.close()
	return tmp
end
function memoW(nom,info)
	file=fs.open(nom,"w")
	file.write(info)
	file.close()
end
anne=charge("anne")
mois=charge("mois")

while true do
	ecran=peripheral.wrap("left")
	tmp=http.get("http://localhost/houba/_comment/champ.php?anne="..anne.."&mois="..mois.."&utf8")

	donne=tmp.readAll()
	donne=textutils.unserialize(donne) 
	i=1
	ecran.setBackgroundColor(colors.black)
	ecran.clear()
	ecran.setTextScale(1)
	ecran.setCursorPos(1,1)
	ecran.setTextColor(colors.white)
	place="0"

	ecran.setBackgroundColor(colors.black)
	ecran.write(donne.quand..' - Total : '..donne.total)

	while donne.pantheon[i] do	
		
		if i%2==0 then
			ecran.setBackgroundColor(colors.black)
		else
			ecran.setBackgroundColor(colors.gray)
		end
		
		ecran.setCursorPos(1,i+1)
		if place==donne.pantheon[i].place then
			if tonumber(place)<10 then
				ecran.write(" ")
			else
				ecran.write("  ")
			end
		else
			ecran.write(donne.pantheon[i].place)
			place=donne.pantheon[i].place
		end
		if tonumber(place)<10 then
			ecran.write("  ")
		else
			ecran.write(" ")
		end
		ecran.write(donne.pantheon[i].user.."                                                               ")
		
		
		ecran.setCursorPos(30,i+1)
		
		ecran.write(" | "..donne.pantheon[i].nb)
		i=i+1
	end
	term.clear()
	term.setCursorPos(1,1)
	term.write("ComputerCraft ordi "..os.computerID())
	term.setCursorPos(1,2)
	term.write("Changer d'anne ? (Actuel "..anne..")")
	term.setCursorPos(1,3)
	anne=read()
	
	
	term.clear()
	term.setCursorPos(1,1)
	term.write("ComputerCraft ordi "..os.computerID())
	term.setCursorPos(1,2)
	term.write("Changer de mois ? (Actuel "..mois..")")
	term.setCursorPos(1,3)
	mois=read()
end