@@ -41,7 +41,7 @@ def do_welcome(connection):
4141 #SEND HEADER FILE (.SEQ)
4242 # print ("STATUS > will send seq")
4343 send_ln (connection , "\n \n " ) #sends text
44- send_seq (connection , "welcome.seq" ) #sends a seq file to screen
44+ send_seq (connection , "seq/ welcome.seq" ) #sends a seq file to screen
4545
4646 #THIS SECTION SENDS RANDOM THINGS (FOR YOU TO LEARN HOW)
4747 send_cr (connection , "red" ) #cbmcursor sends color red code
@@ -57,6 +57,14 @@ def do_welcome(connection):
5757 send_ln (connection , "up1" )
5858 cursorxy (connection ,1 ,25 )
5959 send_ln (connection , "down25" )
60+ cursorxy (connection ,10 ,20 )
61+ get_char (connection )
62+
63+ send_cr (connection , "clear" ) #sends a coded cursor
64+ send_cr (connection , "home" ) #sends a coded cursor
65+ send_seq (connection , "seq/colaburger.seq" )
66+ cursorxy (connection ,30 ,5 )
67+ get_char (connection )
6068
6169def do_login (connection ):
6270
@@ -74,7 +82,7 @@ def do_login(connection):
7482
7583 if (uname == "new" ):
7684 uname ,realid = do_newuser (connection )
77- print ("new user created" )
85+ print ("NEW user created" )
7886 break
7987
8088 connection .send (cbmencode ("Password: " ))
@@ -97,16 +105,14 @@ def do_login(connection):
97105
98106 # Check if there is a match
99107 if (realpass == upass ):
100- print ("match!!" )
101108 break
102109 else :
103110 send_ln (connection , "\n \n Incorrect username or password.\n \n " )
104111 attempts = attempts + 1
105112 if (attempts >= maxtries ):
106113 connection .send (cbmencode ("\n \n Sorry maximum number of attempts reached..\n \n " ))
107114 connection .close ()
108- print ("ok" )
109- print ("uname->" ,uname ,"realid->" ,realid )
115+ print ("JUST LOGGED IN -> uname->" ,uname ,"realid->" ,realid )
110116 return uname ,realid ;
111117
112118def do_newuser (connection ):
@@ -136,11 +142,9 @@ def do_newuser(connection):
136142 if (myresult == None and uname != "" and uname != "new" ):
137143 send_ln (connection , "Your username is: " + uname + "\n Are you sure? (y/n): " )
138144 letter = get_char (connection )
139- print ("letra: " ,letter )
140145 send_ln (connection , "\n \n " )
141146 attempts = attempts + 1
142147 if (letter == "y" or letter == "Y" ):
143- print ("YES!" )
144148 break
145149 else :
146150 send_ln (connection , "\n Error: User already exists.\n " )
@@ -159,7 +163,6 @@ def do_newuser(connection):
159163 send_ln (connection , "\n Repeat your password: " )
160164 pass2 = input_pass (connection ) #input_line function reads a line
161165 if (pass1 != "" and pass2 == pass1 ):
162- print ("->" + pass1 + "<-" )
163166 break
164167 attempts = attempts + 1
165168 if attempts >= maxtries :
@@ -176,7 +179,6 @@ def do_newuser(connection):
176179 send_ln (connection , "\n Repeat your email: " )
177180 mail2 = input_line (connection ) #input_line function reads a line
178181 if (mail1 != "" and mail2 == mail1 ):
179- print ("email matches!" )
180182 break
181183 attempts = attempts + 1
182184 if attempts >= maxtries :
@@ -191,14 +193,14 @@ def do_newuser(connection):
191193 mycursor .execute (query )
192194 mydb .commit () #imperative
193195 realid = mycursor .lastrowid
194- print ("new id:" ,realid )
196+ print ("NEW User just registered with id:" ,realid )
195197 return uname ,realid ;
196198
197199def do_bucle (connection ,namex ,idx ):
198200
199201 while True :
200202 #Clears Screen and sends MENU
201- print ("USER -> " ,namex ,"->" ,idx )
203+ print ("USER -> " ,namex ,"->" ,idx , "Main Menu" ) #Outputs for sysop
202204 send_ln (connection , "\n \n Choose an option: " )
203205 bucl = get_char (connection )
204206 print (bucl )
@@ -215,10 +217,9 @@ def user_session(connection):
215217 send_cr (connection ,"clear" )
216218 send_cr (connection ,"home" )
217219 send_ln (connection , "Connected. Hit any key..." )
218- bucl = get_char (connection )
220+ bucl = input_line (connection )
219221
220222 do_welcome (connection )
221- time .sleep (6 )
222223
223224 userx ,idx = do_login (connection )
224225
0 commit comments