Example #1
0
    hm = stop.split(':')
    if len(hm) == 2:
        (h2, m2) = hm
        if (0 <= int(h2) < 24) and (0 <= int(m2) < 60):
            stopOK = True
        else:
            print "Numerical Error in Stop time<br>"
            stopOK = False
    else:
        print "Stop time format error <br>"
        stopOK = False

    if startOK and stopOK:
        minute1 = 60 * int(h1) + int(m1)
        minute2 = 60 * int(h2) + int(m2)
        if minute1 > minute2:
            print "Stop time must be later than Start time <br>"
            stopOK = False

if dateOK:
    if output == 'Measure' or output == 'Compare' or (startOK and stopOK):
        if output == 'Measure' or output == 'Compare':
            pages.MeasurePlot(camera, year, date, output)
        if output == 'Model':
            pages.ModelPlot(camera, year, date, output, start, stop)
    else:
        pages.page2(output, year, camera, response)  # Go back to page 2
else:
    print "Not Ready <br>"
    pages.page2(output, year, camera, response)  # Go back to page 2
Example #2
0
#!/usr/bin/python
import cgi
import cgitb; cgitb.enable()
import sys
import pages

sys.stderr = sys.stdout
response = cgi.FieldStorage()
print "Content-type: text/html\n\n"
        
output = response.getvalue('Output')
year = response.getvalue('Year')
camera = response.getvalue('Camera')
pages.page2(output, year, camera, response)
Example #3
0
    hm = stop.split(':')
    if len(hm) == 2:
        (h2,m2) = hm
        if (0 <= int(h2) < 24) and (0 <= int(m2) < 60) :
            stopOK = True
        else: 
            print "Numerical Error in Stop time<br>"
            stopOK = False 
    else: 
        print "Stop time format error <br>"
        stopOK = False                            

    if startOK and stopOK:
        minute1 = 60*int(h1) + int(m1)
        minute2 = 60*int(h2) + int(m2)
        if minute1 > minute2:
            print "Stop time must be later than Start time <br>"
            stopOK = False 
                    
if dateOK:
    if output == 'Measure' or output == 'Compare' or ( startOK and stopOK) :
        if output == 'Measure'or output == 'Compare': pages.MeasurePlot(camera, year, date, output)
        if output == 'Model' : pages.ModelPlot(camera, year, date, output, start, stop)
    else: 
        pages.page2(output,year,camera,response) # Go back to page 2
else: 
    print "Not Ready <br>"
    pages.page2(output,year,camera,response) # Go back to page 2