print "<html>" form = cgi.FieldStorage() card_id = int(sys.argv[1]) serial_num = int(sys.argv[2]) base.header(title='ngCCM ePortage') base.top() #print 'card_id = ', card_id #print 'serial_num = ', serial_num module_functions.add_test_tab(serial_num,card_id) #print '<div class="row">' #print '<div class="col-md-12">' #print '<h2>Test Results for ngCCM %s</h2>' % serial_num #print '</div>' #print '</div>' revokes=module_functions.Portage_fetch_revokes(serial_num) db = connect(0) cur = db.cursor() cur.execute("select test_type, name, desc_long from Test_Type where required = 1 order by relative_order ASC") for test_type in cur: module_functions.ePortageTest(test_type[0], serial_num, test_type[1], revokes, test_type[2]) base.bottom()
import base import home_page_list import module_functions from connect import connect # cgi header print "Content-type: text/html\n" form = cgi.FieldStorage() card_id = base.cleanCGInumber(form.getvalue("card_id")) serial_num = base.cleanCGInumber(form.getvalue("serial_num")) base.header(title="uHTR ePortage") base.top() # print 'card_id = ', card_id # print 'serial_num = ', serial_num module_functions.add_test_tab(serial_num, card_id) revokes = module_functions.Portage_fetch_revokes(serial_num) db = connect(0) cur = db.cursor() cur.execute("select test_type, name from Test_Type where required = 1 order by relative_order ASC") for test_type in cur: module_functions.ePortageTest(test_type[0], serial_num, test_type[1], revokes) base.bottom()
form = cgi.FieldStorage() card_id = base.cleanCGInumber(form.getvalue('card_id')) serial_num = base.cleanCGInumber(form.getvalue('serial_num')) # Print basic HTML stuff: base.begin() base.header(title='ATD: Board {0}'.format(serial_num)) # Print the header base.top() #print 'card_id = ', card_id #print 'serial_num = ', serial_num module_functions.add_test_tab(serial_num, card_id) revokes=module_functions.Portage_fetch_revokes(serial_num) db = connect(0) cur = db.cursor() cur.execute("SELECT test_type, name FROM Test_Type WHERE required = 1 order by relative_order ASC") for test_type in cur: test_type_id=test_type[0] test_name=test_type[1] attempts = module_functions.Portage_fetch(test_type_id, serial_num) module_functions.ePortageTest(test_type_id, serial_num, test_name, revokes , attempts) module_functions.moduleNotesDump( serial_num ) module_functions.export_to_xml(serial_num, card_id) base.bottom()