catch when the user tries to view the application before they've made one
This commit is contained in:
parent
142f401eca
commit
76f9c62a52
@ -112,9 +112,12 @@ def loadFile() :
|
|||||||
global application
|
global application
|
||||||
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
applicationFile = applicationDir+"/"+handle+".dat"
|
applicationFile = applicationDir+"/"+handle+".dat"
|
||||||
file = open(applicationFile, 'rb')
|
if os.path.exists(applicationFile) :
|
||||||
application = pickle.load(file)
|
file = open(applicationFile, 'rb')
|
||||||
file.close()
|
application = pickle.load(file)
|
||||||
|
file.close()
|
||||||
|
else :
|
||||||
|
writeln("|CLSorry you need to create an application first|CL|PA")
|
||||||
|
|
||||||
def sendEmail() :
|
def sendEmail() :
|
||||||
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
@ -212,6 +215,7 @@ def addEditApplication() :
|
|||||||
pktPassword = ""
|
pktPassword = ""
|
||||||
ticPassword = ""
|
ticPassword = ""
|
||||||
numNodes = ""
|
numNodes = ""
|
||||||
|
cramMD5 = ""
|
||||||
bbsSoftware = ""
|
bbsSoftware = ""
|
||||||
|
|
||||||
# left side
|
# left side
|
||||||
@ -281,46 +285,52 @@ def addEditApplication() :
|
|||||||
# view existing application
|
# view existing application
|
||||||
def viewApplication() :
|
def viewApplication() :
|
||||||
initMainScreen()
|
initMainScreen()
|
||||||
loadFile()
|
applicationDir = NETSPATH+"/"+ARG+"/applications"
|
||||||
apDict = application[handle]
|
applicationFile = applicationDir+"/"+handle+".dat"
|
||||||
realName = apDict["realName"]
|
if os.path.exists(applicationFile) :
|
||||||
bbsName = apDict["bbsName"]
|
loadFile()
|
||||||
telnetAddress = apDict["telnetAddress"]
|
apDict = application[handle]
|
||||||
cityState = apDict["cityState"]
|
realName = apDict["realName"]
|
||||||
sysopName = apDict["sysopName"]
|
bbsName = apDict["bbsName"]
|
||||||
emailAddress = apDict["emailAddress"]
|
telnetAddress = apDict["telnetAddress"]
|
||||||
binkpAddress = apDict["binkpAddress"]
|
cityState = apDict["cityState"]
|
||||||
binkpPort = apDict["binkpPort"]
|
sysopName = apDict["sysopName"]
|
||||||
sessionPassword = apDict["sessionPassword"]
|
emailAddress = apDict["emailAddress"]
|
||||||
allfixPassword = apDict["allfixPassword"]
|
binkpAddress = apDict["binkpAddress"]
|
||||||
pktPassword = apDict["pktPassword"]
|
binkpPort = apDict["binkpPort"]
|
||||||
ticPassword = apDict["ticPassword"]
|
sessionPassword = apDict["sessionPassword"]
|
||||||
numNodes = apDict["numNodes"]
|
allfixPassword = apDict["allfixPassword"]
|
||||||
if apDict["cramMD5"] :
|
pktPassword = apDict["pktPassword"]
|
||||||
cramMD5 = "Yes"
|
ticPassword = apDict["ticPassword"]
|
||||||
|
numNodes = apDict["numNodes"]
|
||||||
|
if apDict["cramMD5"] :
|
||||||
|
cramMD5 = "Yes"
|
||||||
|
else :
|
||||||
|
cramMD5 = "No"
|
||||||
|
bbsSoftware = apDict["bbsSoftware"]
|
||||||
|
|
||||||
|
# left side
|
||||||
|
gotoxy(18,12); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(7,12); write("|"+normBG+"|"+normColour+"Real Name: "+"|"+fieldBG+"|"+fieldFG+realName+"|"+normBG)
|
||||||
|
gotoxy(18,13); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(8,13); write("|"+normBG+"|"+normColour+"BBS Name: "+"|"+fieldBG+"|"+fieldFG+bbsName+"|"+normBG)
|
||||||
|
gotoxy(18,14); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(2,14); write("|"+normBG+"|"+normColour+"Telnet Address: "+"|"+fieldBG+"|"+fieldFG+telnetAddress+"|"+normBG)
|
||||||
|
gotoxy(18,15); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(6,15); write("|"+normBG+"|"+normColour+"City/State: "+"|"+fieldBG+"|"+fieldFG+cityState+"|"+normBG)
|
||||||
|
gotoxy(18,16); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(6,16); write("|"+normBG+"|"+normColour+"Sysop Name: "+"|"+fieldBG+"|"+fieldFG+sysopName+"|"+normBG)
|
||||||
|
gotoxy(18,17); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(3,17); write("|"+normBG+"|"+normColour+"Email Address: "+"|"+fieldBG+"|"+fieldFG+emailAddress+"|"+normBG)
|
||||||
|
gotoxy(18,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(3,18); write("|"+normBG+"|"+normColour+"BinkP Address: "+"|"+fieldBG+"|"+fieldFG+binkpAddress+"|"+normBG)
|
||||||
|
gotoxy(18,19); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(4,19); write("|"+normBG+"|"+normColour+"BinkP Port #: "+"|"+fieldBG+"|"+fieldFG+binkpPort+"|"+normBG)
|
||||||
|
|
||||||
|
# right side
|
||||||
|
gotoxy(59,12); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(41,12); write("|"+normBG+"|"+normColour+"Session Password: "+"|"+fieldBG+"|"+fieldFG+sessionPassword+"|"+normBG)
|
||||||
|
gotoxy(59,13); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(42,13); write("|"+normBG+"|"+normColour+"Allfix Password: "+"|"+fieldBG+"|"+fieldFG+allfixPassword+"|"+normBG)
|
||||||
|
gotoxy(59,14); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,14); write("|"+normBG+"|"+normColour+"PKT Password: "+"|"+fieldBG+"|"+fieldFG+pktPassword+"|"+normBG)
|
||||||
|
gotoxy(59,15); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,15); write("|"+normBG+"|"+normColour+"TIC Password: "+"|"+fieldBG+"|"+fieldFG+ticPassword+"|"+normBG)
|
||||||
|
gotoxy(59,16); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(47,16); write("|"+normBG+"|"+normColour+"# of Nodes: "+"|"+fieldBG+"|"+fieldFG+numNodes+"|"+normBG)
|
||||||
|
gotoxy(59,17); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(49,17); write("|"+normBG+"|"+normColour+"Cram-MD5: |"+fieldBG+"|"+fieldFG+cramMD5+"|"+normBG)
|
||||||
|
gotoxy(59,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,18); write("|"+normBG+"|"+normColour+"BBS Software: "+"|"+fieldBG+"|"+fieldFG+bbsSoftware+"|"+normBG)
|
||||||
|
gotoxy(1,23); write("|PA")
|
||||||
|
|
||||||
else :
|
else :
|
||||||
cramMD5 = "No"
|
writeln("|CRYou don't yet have a saved application.|CR|PA")
|
||||||
bbsSoftware = apDict["bbsSoftware"]
|
|
||||||
|
|
||||||
# left side
|
|
||||||
gotoxy(18,12); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(7,12); write("|"+normBG+"|"+normColour+"Real Name: "+"|"+fieldBG+"|"+fieldFG+realName+"|"+normBG)
|
|
||||||
gotoxy(18,13); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(8,13); write("|"+normBG+"|"+normColour+"BBS Name: "+"|"+fieldBG+"|"+fieldFG+bbsName+"|"+normBG)
|
|
||||||
gotoxy(18,14); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(2,14); write("|"+normBG+"|"+normColour+"Telnet Address: "+"|"+fieldBG+"|"+fieldFG+telnetAddress+"|"+normBG)
|
|
||||||
gotoxy(18,15); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(6,15); write("|"+normBG+"|"+normColour+"City/State: "+"|"+fieldBG+"|"+fieldFG+cityState+"|"+normBG)
|
|
||||||
gotoxy(18,16); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(6,16); write("|"+normBG+"|"+normColour+"Sysop Name: "+"|"+fieldBG+"|"+fieldFG+sysopName+"|"+normBG)
|
|
||||||
gotoxy(18,17); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(3,17); write("|"+normBG+"|"+normColour+"Email Address: "+"|"+fieldBG+"|"+fieldFG+emailAddress+"|"+normBG)
|
|
||||||
gotoxy(18,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(3,18); write("|"+normBG+"|"+normColour+"BinkP Address: "+"|"+fieldBG+"|"+fieldFG+binkpAddress+"|"+normBG)
|
|
||||||
gotoxy(18,19); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(4,19); write("|"+normBG+"|"+normColour+"BinkP Port #: "+"|"+fieldBG+"|"+fieldFG+binkpPort+"|"+normBG)
|
|
||||||
|
|
||||||
# right side
|
|
||||||
gotoxy(59,12); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(41,12); write("|"+normBG+"|"+normColour+"Session Password: "+"|"+fieldBG+"|"+fieldFG+sessionPassword+"|"+normBG)
|
|
||||||
gotoxy(59,13); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(42,13); write("|"+normBG+"|"+normColour+"Allfix Password: "+"|"+fieldBG+"|"+fieldFG+allfixPassword+"|"+normBG)
|
|
||||||
gotoxy(59,14); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,14); write("|"+normBG+"|"+normColour+"PKT Password: "+"|"+fieldBG+"|"+fieldFG+pktPassword+"|"+normBG)
|
|
||||||
gotoxy(59,15); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,15); write("|"+normBG+"|"+normColour+"TIC Password: "+"|"+fieldBG+"|"+fieldFG+ticPassword+"|"+normBG)
|
|
||||||
gotoxy(59,16); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(47,16); write("|"+normBG+"|"+normColour+"# of Nodes: "+"|"+fieldBG+"|"+fieldFG+numNodes+"|"+normBG)
|
|
||||||
gotoxy(59,17); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(49,17); write("|"+normBG+"|"+normColour+"Cram-MD5: |"+fieldBG+"|"+fieldFG+cramMD5+"|"+normBG)
|
|
||||||
gotoxy(59,18); write("|"+fieldBG+" "*20+"|"+normBG); gotoxy(45,18); write("|"+normBG+"|"+normColour+"BBS Software: "+"|"+fieldBG+"|"+fieldFG+bbsSoftware+"|"+normBG)
|
|
||||||
gotoxy(1,23); write("|PA")
|
|
||||||
|
|
||||||
# pull network config first ready for main program to start
|
# pull network config first ready for main program to start
|
||||||
getNetCfg(ARG)
|
getNetCfg(ARG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user