#coding:utf-8
import cgi
import yatedondake
import player_model

players = player_model.get_from_store()       #从 模型得到数据

form_data = cgi.FieldStorage()
player_name = form_data['which_player'].value



print (yatedondake.start_response())

print (yatedondake.include_header("教练Kelly的Timng 数据"))

print (yatedondake.header("Player:  " + player_name + ",出生日期:" + players[player_name].date +  "."))

print (yatedondake.para("这个选手最快时间为========:"))

print (yatedondake.u_list(players[player_name].top3()))

print (yatedondake.include_footer({"Home":"/index.html", "Select another Player": "generate_list_page262.py"})) #"Select another Player"==============>返回前一个CGI脚本
#coding:utf-8
import yatedondake
import player_model
import glob

data_files = glob.glob("data/*.txt")

player = player_model.put_to_store(data_files)

print (yatedondake.start_response())

print (yatedondake.include_header("教练Kelly的选手列表..."))

print (yatedondake.start_form("generate_timing_data.py"))

print (yatedondake.para("Select a player from the list to work with:"))

for each_player in player:
    print (yatedondake.radio_button("Witch_player", player[each_player].name))

print (yatedondake.end_form("提交"))    #生成表单的最后创建一个定制的 “提交”按钮

print (yatedondake.include_footer({"Home": "/index.html"}))