Advertisement
Guest User

Untitled

a guest
Nov 30th, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.60 KB | None | 0 0
  1. #modules
  2. import sqlite3
  3. import autopy
  4. import kivy
  5. kivy.require("1.9.0")
  6. from kivy.properties import NumericProperty
  7. from kivy.app import App
  8. from kivy.uix.widget import Widget
  9. from kivy.properties import ObjectProperty
  10. from kivy.core.window import Window
  11. from kivy.properties import StringProperty
  12. import smtplib
  13. from email.mime.multipart import MIMEMultipart
  14. from email.mime.text import MIMEText
  15. Window.clearcolor = (0, 0, 0.5, 1)#SET COLOR
  16. import winsound
  17. import smtplib
  18. import webbrowser
  19. import random
  20. import matplotlib.pyplot as plt
  21. class CustomWidget(Widget):
  22.  
  23.  
  24.  
  25. #login_inputs
  26. password_text_input=ObjectProperty()
  27. user_text_input=ObjectProperty()
  28. #registration inputs
  29. firstnaminp_text_input=ObjectProperty()
  30. lastnameinp_text_input=ObjectProperty()
  31. emailinp_text_input=ObjectProperty()
  32. passwordinp_text_input=ObjectProperty()
  33. countryinp_text_input=ObjectProperty()
  34. cityinp_text_input=ObjectProperty()
  35. addressinp_text_input=ObjectProperty()
  36. postcodeinp_text_input=ObjectProperty()
  37. #settings inputs :
  38. chname_text_input=ObjectProperty()
  39. chlstname_text_input=ObjectProperty()
  40. chemail_text_input=ObjectProperty()
  41. chpassword_text_input=ObjectProperty()
  42. chcountry_text_input=ObjectProperty()
  43. chcity_text_input=ObjectProperty()
  44. chaddress_text_input=ObjectProperty()
  45. chpostal_text_input=ObjectProperty()
  46. #contact
  47. emailinput_text_input=ObjectProperty()
  48. subjectinput_text_input=ObjectProperty()
  49. messageinput_text_input=ObjectProperty()
  50. #shop ammounts:
  51. product1am_text_input=ObjectProperty()
  52. product2am_text_input=ObjectProperty()
  53. product3am_text_input=ObjectProperty()
  54.  
  55.  
  56.  
  57.  
  58.  
  59. #labels(registry)
  60. firstnaminp=""
  61. lastnameinp=""
  62. emailinp=""
  63. passwordinp=""
  64. countryinp=""
  65. cityinp=""
  66. addressinp=""
  67. postcodeinp=""
  68. chname=""
  69. #labels(lgoin)
  70. password=""
  71. user=""
  72. def remove_rgstr(self):#removes about us
  73. self.ids.infoimg.pos=10000,1000
  74. self.ids.infohead.pos=10000,1000
  75. self.ids.infolab.pos=10000,10000
  76. def update_user_name(self):#--------------------------------change some frsnp--------------------------#
  77. conn = sqlite3.connect('accounts.db')
  78. c = conn.cursor()
  79. password=self.password_text_input.text
  80. user=self.user_text_input.text
  81. newfirstname=self.chname_text_input.text
  82. print user
  83. print password
  84. print newfirstname
  85. if (len(newfirstname)<5):
  86. autopy.alert.alert("Your first name should be over 5 characters")
  87. else:
  88. try:
  89. c.execute("UPDATE accounts SET firstname = (?) WHERE email= (?) AND password = (?) ",(newfirstname, user, password))
  90. conn.commit()
  91. autopy.alert.alert("Your new name saved succesfully")
  92. self.ids.chname.text=""
  93. except:
  94. autopy.alert.alert("Something wrong happened")
  95.  
  96. def update_user_lstname(self):#--------------------------------change some lstnm--------------------------#
  97. conn = sqlite3.connect('accounts.db')
  98. c = conn.cursor()
  99. password=self.password_text_input.text
  100. user=self.user_text_input.text
  101. newlastname=self.chlstname_text_input.text
  102. print user
  103. print password
  104. print newlastname
  105. if (len(newlastname)<5):
  106. autopy.alert.alert("Your last name should be over 5 characters")
  107. else:
  108. try:
  109. c.execute("UPDATE accounts SET lastname = (?) WHERE email= (?) AND password = (?) ",(newlastname, user, password))
  110. conn.commit()
  111. autopy.alert.alert("Your new lastname saved succesfully")
  112. self.ids.chlstname.text=""
  113. except:
  114. autopy.alert.alert("Something wrong happened")
  115.  
  116.  
  117.  
  118. def update_user_email(self):#--------------------------------change some email--------------------------#
  119. conn = sqlite3.connect('accounts.db')
  120. c = conn.cursor()
  121. password=self.password_text_input.text
  122. user=self.user_text_input.text
  123. newemail=self.chemail_text_input.text
  124. print user
  125. print password
  126. print newemail
  127. if (len(newemail)<5):
  128. autopy.alert.alert("Your email should be over 5 characters")
  129. else:
  130. try:
  131. conn = sqlite3.connect('accounts.db')
  132. c = conn.cursor()
  133. c.execute("SELECT * FROM accounts WHERE email= ?",(newemail,))
  134. if c.fetchone() is not None :
  135. autopy.alert.alert("This email is used !")
  136. autopy.alert.alert("Try again! !")
  137.  
  138. else:
  139. msg="This email is just to verify that this mail works !"
  140. mail=smtplib.SMTP('smtp.gmail.com',587)
  141. mail.ehlo()
  142. mail.starttls()
  143. mail.login("kostas2372@gmail.com","myllwcutinlyswpw")
  144. mail.sendmail("kostas2372@gmail.com",newemail,msg)
  145. mail.sendmail("kostas2372@gmail.com",user,"Your email has been changed ,if you didn't do that send us an email now in kostas2372@gmail.com")
  146.  
  147. c.execute("UPDATE accounts SET email = (?) WHERE email= (?) AND password = (?) ",(newemail, user, password))
  148. conn.commit()
  149. autopy.alert.alert("Your new email saved succesfully")
  150. self.ids.chemail.text=""
  151. except:
  152. autopy.alert.alert("Your email does not works!")
  153. def update_user_password(self):#--------------------------------change some password--------------------------#
  154. conn = sqlite3.connect('accounts.db')
  155. c = conn.cursor()
  156. password=self.password_text_input.text
  157. user=self.user_text_input.text
  158. newpassword=self.chpassword_text_input.text
  159. print user
  160. print password
  161. print newpassword
  162. if (len(newpassword)<5):
  163. autopy.alert.alert("Your password should be over 5 characters")
  164. else:
  165. try:
  166. msg=newpassword
  167. password=self.password_text_input.text
  168. user=self.user_text_input.text
  169. newemail=self.user_text_input.text
  170. mail=smtplib.SMTP('smtp.gmail.com',587)
  171. mail.ehlo()
  172. mail.starttls()
  173. mail.login("kostas2372@gmail.com","myllwcutinlyswpw")
  174. mail.sendmail("kostas2372@gmail.com",newemail,"Your new password will be sent in some minutes !!!")
  175. mail.sendmail("kostas2372@gmail.com",newemail,msg)
  176.  
  177. c.execute("UPDATE accounts SET password = (?) WHERE email= (?) AND password = (?) ",(newpassword, user, password))
  178. conn.commit()
  179. autopy.alert.alert("Your new password saved succesfully")
  180. self.ids.chpassword.text=""
  181.  
  182.  
  183. except:
  184. autopy.alert.alert("Something wrong happened")
  185.  
  186.  
  187. def update_user_country(self):#--------------------------------change some country--------------------------#
  188. conn = sqlite3.connect('accounts.db')
  189. c = conn.cursor()
  190. password=self.password_text_input.text
  191. user=self.user_text_input.text
  192. newcountry=self.chcountry_text_input.text
  193. print user
  194. print password
  195. print newcountry
  196. if (len(newcountry)<5):
  197. autopy.alert.alert("Your country should be over 5 characters")
  198. else:
  199. try:
  200. c.execute("UPDATE accounts SET country = (?) WHERE email= (?) AND password = (?) ",(newcountry, user, password))
  201. conn.commit()
  202. autopy.alert.alert("Your new country saved succesfully")
  203. self.ids.chcountry.text=""
  204. except:
  205. autopy.alert.alert("Something wrong happened")
  206.  
  207. def update_user_city(self):#--------------------------------change some city--------------------------#
  208. conn = sqlite3.connect('accounts.db')
  209. c = conn.cursor()
  210. password=self.password_text_input.text
  211. user=self.user_text_input.text
  212. newcity=self.chcity_text_input.text
  213. print user
  214. print password
  215. print newcity
  216. if (len(newcity)<5):
  217. autopy.alert.alert("Your city should be over 5 characters")
  218. else:
  219. try:
  220. c.execute("UPDATE accounts SET city = (?) WHERE email= (?) AND password = (?) ",(newcity, user, password))
  221. conn.commit()
  222. autopy.alert.alert("Your new city saved succesfully")
  223. self.ids.chcity.text=""
  224. except:
  225. autopy.alert.alert("Something wrong happened")
  226.  
  227. def update_user_address(self):#--------------------------------change some address--------------------------#
  228. conn = sqlite3.connect('accounts.db')
  229. c = conn.cursor()
  230. password=self.password_text_input.text
  231. user=self.user_text_input.text
  232. newaddress=self.chaddress_text_input.text
  233. print user
  234. print password
  235. print newaddress
  236. if (len(newaddress)<5):
  237. autopy.alert.alert("Your address should be over 5 characters")
  238. else:
  239. try:
  240. c.execute("UPDATE accounts SET address = (?) WHERE email= (?) AND password = (?) ",(newaddress, user, password))
  241. conn.commit()
  242. autopy.alert.alert("Your new address saved succesfully")
  243. self.ids.chaddress.text=""
  244. except:
  245. autopy.alert.alert("Something wrong happened")
  246.  
  247. def update_user_postal(self):#--------------------------------change some postal--------------------------#
  248. conn = sqlite3.connect('accounts.db')
  249. c = conn.cursor()
  250. password=self.password_text_input.text
  251. user=self.user_text_input.text
  252. newpostal=self.chpostal_text_input.text
  253. print user
  254. print password
  255. print newpostal
  256. if (len(newpostal)<=4):
  257. autopy.alert.alert("Your postal should be 5 characters")
  258. else:
  259. try:
  260. c.execute("UPDATE accounts SET postcode = (?) WHERE email= (?) AND password = (?) ",(newpostal, user, password))
  261. conn.commit()
  262. autopy.alert.alert("Your new postal saved succesfully")
  263. self.ids.chpostal.text=""
  264. except:
  265. autopy.alert.alert("Something wrong happened")
  266.  
  267.  
  268. def delete_my_acc_vrf(self):
  269. self.removecontact()
  270. self.remove_settings()
  271. self.ids.verification_del.pos=900,600
  272. self.ids.verification_yes.pos=720,550
  273. self.ids.verification_no.pos=1020,550
  274. def delete_my_acc_yes(self):
  275. self.removecontact()
  276. try:
  277. passworddel=self.password_text_input.text
  278. userdel=self.user_text_input.text
  279. print userdel
  280. conn = sqlite3.connect('accounts.db')
  281. c = conn.cursor()
  282. print passworddel
  283.  
  284. c.execute("DELETE FROM accounts WHERE email = ?",(userdel,))
  285. autopy.alert.alert("Your account deleted !")
  286. conn.commit()
  287. self.remove_dels()
  288. self.ret()
  289.  
  290. except:
  291. autopy.alert.alert("Something wrong happened")
  292.  
  293. def delete_my_acc_no(self):
  294. self.settings()
  295. self.remove_dels()
  296. def remove_dels(self):
  297. self.ids.verification_del.pos=90000,60000
  298. self.ids.verification_yes.pos=72000,55000
  299. self.ids.verification_no.pos=10020,55000
  300.  
  301. def settings(self):#---------------------------------settings----------------------------------
  302. self.rembuy()
  303. self.rempb()
  304. self.removecontact()
  305. self.remove_dels()
  306. self.remove_rgstr()
  307. winsound.Beep(50,50)
  308. self.ids.chname.pos=900,650
  309. self.ids.chnamebtn.pos=1100,650
  310. self.ids.chfrstnmlbl.pos=700,620
  311. #lastname
  312. self.ids.chlstname.pos=900,600
  313. self.ids.chlstnamebtn.pos=1100,600
  314. self.ids.chlstsnmlbl.pos=700,570
  315. #email
  316. self.ids.chemail.pos=900,550
  317. self.ids.chemailbtn.pos=1100,550
  318. self.ids.chemaillbl.pos=700,520
  319. #password
  320. self.ids.chpassword.pos=900,500
  321. self.ids.chpasswordbtn.pos=1100,500
  322. self.ids.chpasswordlbl.pos=700,470
  323. #country
  324. self.ids.chcountry.pos=900,450
  325. self.ids.chcountrybtn.pos=1100,450
  326. self.ids.chcountrylbl.pos=700,420
  327. #city
  328. self.ids.chcity.pos=900,400
  329. self.ids.chcitybtn.pos=1100,400
  330. self.ids.chcitylbl.pos=700,370
  331. #address
  332. self.ids.chaddress.pos=900,350
  333. self.ids.chaddressbtn.pos=1100,350
  334. self.ids.chaddresslbl.pos=700,320
  335. #postal
  336. self.ids.chpostal.pos=900,300
  337. self.ids.chpostalbtn.pos=1100,300
  338. self.ids.chpostallbl.pos=700,270
  339. #delete
  340. self.ids.delv.pos=810,250
  341. def remove_settings (self):
  342. self.ids.chname.pos=9000,6500
  343. self.ids.chnamebtn.pos=11000,6500
  344. self.ids.chfrstnmlbl.pos=7000,6200
  345. #lastname
  346. self.ids.chlstname.pos=9000,6000
  347. self.ids.chlstnamebtn.pos=11000,6000
  348. self.ids.chlstsnmlbl.pos=7000,5700
  349. #email
  350. self.ids.chemail.pos=9000,55000
  351. self.ids.chemailbtn.pos=11000,55000
  352. self.ids.chemaillbl.pos=70000,52000
  353. #password
  354. self.ids.chpassword.pos=9000,5000
  355. self.ids.chpasswordbtn.pos=11000,50000
  356. self.ids.chpasswordlbl.pos=70000,47000
  357. #password
  358. self.ids.chcountry.pos=90000,45000
  359. self.ids.chcountrybtn.pos=11000,45000
  360. self.ids.chcountrylbl.pos=70000,42000
  361. #city
  362. self.ids.chcity.pos=90000,40000
  363. self.ids.chcitybtn.pos=11000,40000
  364. self.ids.chcitylbl.pos=70000,370000
  365. #address
  366. self.ids.chaddress.pos=90000,35000
  367. self.ids.chaddressbtn.pos=11000,35000
  368. self.ids.chaddresslbl.pos=700,32000
  369. #postal
  370. self.ids.chpostal.pos=90000,30000
  371. self.ids.chpostalbtn.pos=11000,30000
  372. self.ids.chpostallbl.pos=70000,27000
  373. self.ids.delv.pos=11000,25000
  374.  
  375.  
  376.  
  377. def remove_logn(self):#afairei to logn
  378. self.remove_dels()
  379. self.ids.password.pos=9999,9999
  380. self.ids.passlab.pos=9999,9999
  381. self.ids.user.pos=9999,9999
  382. self.ids.userlab.pos=9999,9999
  383. self.ids.registera.pos=9999,9999
  384. self.ids.login.pos=9999,9999
  385. self.ids.aply.pos=9999,9999
  386. self.ids.hidepassword.pos=15555,15555
  387. self.ids.showpassword.pos=15555,15555
  388. def user(self):#------------------------------------------user-------------------------------------------------------
  389. self.remove_logn()
  390. autopy.alert.alert("User logined")
  391. self.ids.peas.pos=30,900
  392. self.ids.infobtn.pos=245,900
  393. self.ids.set.pos=400,900
  394. self.ids.contactmainbtn.pos=615,900
  395. self.ids.shop.pos=770,900
  396. def admin(self):#------------------------------------------------admin------------------------------------------------
  397. autopy.alert.alert("Admin logined")
  398. self.remove_settings()
  399. self.remove_logn()
  400. self.ids.peas.pos=30,900
  401. self.ids.password.pos=9999,9999
  402. self.ids.passlab.pos=9999,9999
  403. self.ids.user.pos=9999,9999
  404. self.ids.userlab.pos=9999,9999
  405. self.ids.registera.pos=9999,9999
  406. self.ids.login.pos=9999,9999
  407. self.ids.aply.pos=9999,9999
  408. self.ids.infobtn.pos=245,900
  409.  
  410. def peos(self):#test
  411. print 10
  412. def ret(self):#__________________________________________________relogin________________________________________________
  413. self.rembuy()
  414. self.rempb()
  415. self.removecontact()
  416. self.remove_dels()
  417. winsound.Beep(300,300)
  418. self.ids.user.text=""
  419. self.ids.password.text=""
  420. self.ids.shop.pos=700700,90000
  421. self.ids.chname.text=""
  422. self.ids.chlstname.text=""
  423. self.ids.chemail.text=""
  424. self.ids.chpassword.text=""
  425. self.ids.chcountry.text=""
  426. self.ids.product1am.text=""
  427. self.ids.product2am.text=""
  428. self.ids.product3am.text=""
  429. self.ids.login.pos=900,500
  430. self.ids.registera.pos=1000,500
  431. self.ids.infobtn.pos=10000,10000
  432. self.ids.contactmainbtn.pos=61005,90000
  433. self.login()
  434. self.remove_rgstr()
  435. self.remove_settings()
  436. def login(self):#------------------------------------------------login---------------------------------------------------------
  437. self.removecontact()
  438. self.remove_dels()
  439. self.remove_settings()
  440. self.peos()#removes all registery labels and texts
  441. self.ids.set.pos=100000,10000
  442. self.ids.showpassword.pos=1240,540
  443. self.ids.peas.pos=9999,9999
  444. self.ids.firstnaminp.pos=9999,9999
  445. self.ids.lastnameinp.pos=9999,9999
  446. self.ids.emailinp.pos=9999,9999
  447. self.ids.passwordinp.pos=9999,9999
  448. self.ids.countryinp.pos=9999,9999
  449. self.ids.cityinp.pos=9999,9999
  450. self.ids.addressinp.pos=9999,9999
  451. self.ids.postcodeinp.pos=9999,9999
  452.  
  453. self.ids.password.pos=990,540
  454. self.ids.passlab.pos=860,510
  455. self.ids.user.pos=990,590
  456. self.ids.userlab.pos=860,563
  457.  
  458. self.ids.aply.pos=9999,9999
  459. self.ids.firstnamlab.pos=9999,9999
  460. self.ids.lastnamelab.pos=9999,9999
  461. self.ids.emaillab.pos=9999,9999
  462. self.ids.passwordlab.pos=9999,9999
  463. self.ids.countrylab.pos=9999,9999
  464. self.ids.citylab.pos=9999,9999
  465. self.ids.addresslab.pos=9999,9999
  466. self.ids.postcodelab.pos=9999,9999
  467. password_text_input=ObjectProperty()#--------------------------------------lgn_txt_Nnp
  468. user_text_input=ObjectProperty()
  469. password=""
  470. user=""
  471. try:
  472. password=self.password_text_input.text
  473. user=self.user_text_input.text
  474. passlen=len(password)
  475. userlen=len(user)
  476. conn = sqlite3.connect('accounts.db')
  477. c = conn.cursor()
  478. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))#-----------------------------------------connection and login in database-----------------------
  479. fes=c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))#nothing special
  480.  
  481. if(userlen==0 and passlen==0):#if someone do not write anything in user and psw inputs
  482. autopy.alert.alert("No username and no password input")
  483. elif c.fetchone() is not None:#connection
  484. winsound.Beep(300,300)
  485. self.user()
  486. else:
  487.  
  488.  
  489. if (password=="admin" and user=="admin"):#--admin--#
  490. winsound.Beep(300,300)
  491. self.admin()
  492.  
  493. elif(userlen==0 and passlen==0):#pithanotites
  494. autopy.alert.alert("No username and no password input")
  495. elif (userlen==0):
  496. autopy.alert.alert("No username input")
  497. elif (passlen==0):
  498. autopy.alert.alert("No password input")
  499. elif (userlen!=0 and passlen!=0):
  500. autopy.alert.alert("Wrong password or wrong username")
  501. else:
  502. autopy.alert.alert("A bug occured")
  503.  
  504. except:
  505. print "aek"
  506. def register(self):
  507. self.rempb()
  508. self.remove_dels()
  509. self.remove_settings()
  510. self.remove_logn()
  511. self.ids.password.pos=9999,9999
  512. self.ids.passlab.pos=9999,9999
  513. self.ids.user.pos=9999,9999
  514. self.ids.userlab.pos=9999,9999
  515. self.ids.login.pos=895,400
  516. self.ids.registera.pos=1000,400
  517. self.ids.aply.pos=1000,500
  518. #xxx
  519. self.ids.firstnamlab.pos=800,725
  520. self.ids.lastnamelab.pos=800,695
  521. self.ids.emaillab.pos=800,670
  522. self.ids.passwordlab.pos=800,650
  523. self.ids.countrylab.pos=800,630
  524. self.ids.citylab.pos=800,610
  525. self.ids.addresslab.pos=800,590
  526. self.ids.postcodelab.pos=800,570
  527. #yyy
  528. self.ids.firstnaminp.pos=930,755
  529. self.ids.lastnameinp.pos=930,710.9
  530. self.ids.emailinp.pos=930,735
  531. self.ids.passwordinp.pos=930,691.5
  532. self.ids.countryinp.pos=930,670
  533. self.ids.cityinp.pos=930,650
  534. self.ids.addressinp.pos=930,627
  535. self.ids.postcodeinp.pos=930,600
  536. winsound.Beep(300,300)
  537.  
  538. def aply(self):
  539. self.remove_dels()
  540. firstnaminp=self.firstnaminp_text_input.text
  541. lastnameinp=self.emailinp_text_input.text
  542. emailinp=self.lastnameinp_text_input.text
  543. passwordinp=self.passwordinp_text_input.text
  544. countryinp=self.countryinp_text_input.text
  545. cityinp=self.cityinp_text_input.text
  546. addressinp=self.addressinp_text_input.text
  547. postcodeinp=self.postcodeinp_text_input.text
  548. pos=str("user")
  549. conn = sqlite3.connect('accounts.db')
  550. c = conn.cursor()
  551. c.execute("CREATE TABLE IF NOT EXISTS accounts(firstname TEXT, lastname TEXT, email TEXT, password TEXT, country TEXT, city TEXT, address TEXT, postcode TEXT)")
  552. c.execute("SELECT * FROM accounts WHERE email= ?",(emailinp,))
  553.  
  554. winsound.Beep(300,300)
  555.  
  556. firstnameinplen=len(firstnaminp)
  557. lastnameinplen=len(lastnameinp)
  558. emailinplen=len(emailinp)
  559. passwordinplen=len(passwordinp)
  560. countryinplen=len(countryinp)
  561. cityinplen=len(cityinp)
  562. addressinplen=len(addressinp)
  563. postcodeinplen=len(postcodeinp)
  564.  
  565. if(firstnameinplen<=5 or lastnameinplen <= 5 or emailinplen <= 5 or passwordinplen<=5 or countryinplen <=5 or cityinplen <= 5 or addressinplen <= 5 or postcodeinplen <=5):
  566. autopy.alert.alert("You have to answer all the questions with at least 5 characters !")
  567. elif c.fetchone() is not None:
  568. self.ids.lastnameinp.text=""
  569. autopy.alert.alert("Email is used")
  570.  
  571.  
  572. else:
  573. try:
  574. msg="This email is just to verify that this mail works !"
  575. mail=smtplib.SMTP('smtp.gmail.com',587)
  576. mail.ehlo()
  577. mail.starttls()
  578. mail.login("kostas2372@gmail.com","myllwcutinlyswpw")
  579. mail.sendmail("kostas2372@gmail.com",emailinp,msg)
  580. c.execute("INSERT INTO accounts (firstname, lastname, email, password, country, city, address, postcode) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
  581. (firstnaminp, lastnameinp , emailinp , passwordinp, countryinp, cityinp, addressinp, postcodeinp,))
  582. conn.commit()
  583. autopy.alert.alert("You are in our database ! you can login in our program !")
  584. self.login()
  585. self.ids.firstnaminp.text=""
  586. self.ids.lastnameinp.text=""
  587. self.ids.emailinp.text=""
  588. self.ids.passwordinp.text=""
  589. self.ids.countryinp.text=""
  590. self.ids.cityinp.text=""
  591. self.ids.addressinp.text=""
  592. self.ids.postcodeinp.text=""
  593.  
  594. except:
  595. autopy.alert.alert("This email does not work !")
  596. autopy.alert.alert("Try again !")
  597.  
  598. def contactfunc(self):#--------------------------------------------------------CONTACT-----------------------------------------------------
  599. self.rembuy()
  600. self.remove_dels()
  601. self.remove_rgstr()
  602. self.remove_settings()
  603. self.rempb()
  604. #-----POSITIONS-----#
  605. self.ids.ourmail.pos=140,800
  606. self.ids.emailinputlbl.pos=540,600
  607. self.ids.emailinput.pos=620,630
  608. self.ids.subjectinputlbl.pos=540,550
  609. self.ids.subjectinput.pos=620,580
  610. self.ids.messageinputlbl.pos=540,500
  611. self.ids.messageinput.pos=630,230
  612. self.ids.sendmail.pos=640,150
  613. def sendml(self):
  614. self.rembuy()
  615. self.rempb()
  616. self.remove_dels()
  617. self.remove_rgstr()
  618. self.remove_settings()
  619. #------SHMASIES-----
  620. email=self.emailinput_text_input.text
  621. subject=self.subjectinput_text_input.text
  622. message=self.messageinput_text_input.text
  623. #--acc---
  624. myemail="kostas2372@gmail.com"
  625. mypassword="myllwcutinlyswpw"
  626. print "contactfunc"
  627.  
  628.  
  629.  
  630. try:
  631. msg="We have received your message!"
  632. mail=smtplib.SMTP('smtp.gmail.com',587)
  633. mail.ehlo()
  634. mail.starttls()
  635. mail.login(myemail,mypassword)
  636. mail.sendmail(myemail,email,msg)
  637. try:
  638. lensub=len(subject)
  639. lenmsg=len(message)
  640. if(lensub == 0):
  641. autopy.alert.alert("You have to write a subject !")
  642. elif(lenmsg==0):
  643. autopy.alert.alert("You have to write a message !")
  644. else:
  645. try:
  646. conn = sqlite3.connect('accounts.db')
  647. c = conn.cursor()
  648. c.execute("CREATE TABLE IF NOT EXISTS messages(email TEXT, subject TEXT ,message TEXT)")
  649. c.execute("INSERT INTO messages(email,subject,message) VALUES (?,?,?)",(email,subject,message))
  650. conn.commit()
  651. autopy.alert.alert("We have put your mail in our database")
  652. self.ids.messageinput.text=""
  653. self.ids.subjectinput.text=""
  654. self.ids.emailinput.text=""
  655. except:
  656. autopy.alert.alert("ERROR occured")
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663. except:
  664. autopy.alert.alert("ERROR occured")
  665.  
  666.  
  667. except:
  668. autopy.alert.alert("This email does not work !")
  669.  
  670. def removecontact(self):
  671. print "remv"
  672. #POSITIONS
  673. self.ids.ourmail.pos=10040,10800
  674. self.ids.emailinputlbl.pos=54000,60000
  675. self.ids.emailinput.pos=62000,630000
  676. self.ids.subjectinputlbl.pos=54000,55000
  677. self.ids.subjectinput.pos=62000,58000
  678. self.ids.messageinputlbl.pos=540000,50000
  679. self.ids.messageinput.pos=600030,230000
  680. self.ids.sendmail.pos=640000,150000
  681.  
  682. def product1info(self):
  683. webbrowser.open("https://www.galinos.gr/web/drugs/main/drugs/kabiven")
  684. winsound.Beep(500,500)
  685. def product2info(self):
  686. webbrowser.open("https://www.galinos.gr/web/drugs/main/substances/levothyroxine")
  687. winsound.Beep(500,500)
  688.  
  689. def product3info(self):
  690. webbrowser.open("https://www.galinos.gr/web/drugs/main/drugs/pabal")
  691. winsound.Beep(500,500)
  692.  
  693. def movpb(self):
  694.  
  695. self.rembuy()
  696. self.removecontact()
  697. self.remove_dels()
  698. self.remove_rgstr()
  699. self.remove_settings()
  700. self.ids.amount.pos=220,800
  701. self.ids.product1.pos=100,700
  702. self.ids.product2.pos=100,500
  703. self.ids.product3.pos=100,300
  704.  
  705. self.ids.product1am.pos=220,730
  706. self.ids.product2am.pos=220,530
  707. self.ids.product3am.pos=220,330
  708.  
  709.  
  710. self.ids.product1pr.pos=340,700
  711. self.ids.product2pr.pos=340,500
  712. self.ids.product3pr.pos=340,300
  713.  
  714. self.ids.product1info.pos=470,730
  715. self.ids.product2info.pos=470,530
  716. self.ids.product3info.pos=470,330
  717.  
  718. self.ids.product1ord.pos=650,730
  719. self.ids.product2ord.pos=650,530
  720. self.ids.product3ord.pos=650,330
  721.  
  722. self.ids.product1calc.pos=850,730
  723. self.ids.product2calc.pos=850,530
  724. self.ids.product3calc.pos=850,330
  725.  
  726. def rempb(self):
  727. self.ids.amount.pos=22000,80000
  728. self.ids.product1.pos=10000,70000
  729. self.ids.product2.pos=10000,50000
  730. self.ids.product3.pos=10000,30000
  731.  
  732. self.ids.product1am.pos=2000020,73000
  733. self.ids.product2am.pos=20020,53000
  734. self.ids.product3am.pos=22000,330
  735.  
  736.  
  737. self.ids.product1pr.pos=34000,700000
  738. self.ids.product2pr.pos=34000,50000
  739. self.ids.product3pr.pos=34000,30000
  740.  
  741. self.ids.product1info.pos=470000,730000
  742. self.ids.product2info.pos=470000,530000
  743. self.ids.product3info.pos=47000,330000
  744.  
  745. self.ids.product1ord.pos=100000,100000
  746. self.ids.product2ord.pos=100000,100000
  747. self.ids.product3ord.pos=100000,100000
  748.  
  749. self.ids.product1calc.pos=82250,73022
  750. self.ids.product2calc.pos=85220,53022
  751. self.ids.product3calc.pos=85220,33220
  752.  
  753. self.ids.product1alpr.text=""
  754. self.ids.product2alpr.text=""
  755. self.ids.product3alpr.text=""
  756. def buyno(self):
  757. self.rembuy()
  758. self.shopfunc()
  759.  
  760.  
  761. def calcprice1(self):
  762. try:
  763. product1am=self.product1am_text_input.text
  764. d=product1am
  765. f=eval(d + "* 70")
  766.  
  767. finalpay=f
  768. self.ids.product1alpr.text="You have to pay :"+str(finalpay)
  769. except:
  770. lnpr1=len(product1am)
  771. if(lnpr1==0):
  772. print "broo"
  773. self.ids.product3am.text=""
  774. self.ids.product3pr.text=""
  775. finalpay=0
  776. else:
  777. autopy.alert.alert("You have to put only numbers")
  778. self.ids.product1am.text=""
  779.  
  780. def calcprice2(self):
  781. try:
  782. product2am=self.product2am_text_input.text
  783. d=product2am
  784. f=eval(d + "* 50")
  785.  
  786. finalpay=f
  787. self.ids.product2alpr.text="You have to pay :"+str(finalpay)
  788. except:
  789. lnpr2=len(product2am)
  790. if(lnpr2==0):
  791. print "broo"
  792. self.ids.product2am.text=""
  793. self.ids.product2pr.text=""
  794. finalpay=0
  795.  
  796. else:
  797. autopy.alert.alert("You have to put only numbers")
  798. self.ids.product2am.text=""
  799. def calcprice3(self):
  800. try:
  801. product3am=self.product3am_text_input.text
  802. d=product3am
  803. f=eval(d + "* 100")
  804.  
  805. finalpay=f
  806. self.ids.product3alpr.text="You have to pay :"+str(finalpay)
  807. except:
  808. lnpr3=len(product3am)
  809. if(lnpr3==0):
  810. self.ids.product3am.text=""
  811. self.ids.product3alpr.text=""
  812. finalpay=0
  813. print "broo"
  814.  
  815.  
  816. else:
  817. autopy.alert.alert("You have to put only numbers")
  818. self.ids.product3am.text=""
  819. def buyyes(self):
  820. try:
  821. myemail="kostas2372@gmail.com"
  822. mypassword="myllwcutinlyswpw"
  823. product1am=self.product1am_text_input.text
  824. farank1=len(product1am)
  825. product2am=self.product2am_text_input.text
  826. farank2=len(product2am)
  827. product3am=self.product3am_text_input.text
  828. farank3=len(product3am)
  829. if (farank1 >= 1):
  830. password=self.password_text_input.text
  831. user=self.user_text_input.text
  832. conn = sqlite3.connect('accounts.db')
  833. c = conn.cursor()
  834. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  835. for row in c.fetchall():
  836. name=row[0]
  837. lstname=row[1]
  838. email=row[2]
  839. passw=row[3]
  840. country=row[4]
  841. city=row[5]
  842. address=row[6]
  843. postalcode=row[7]
  844. product="KABIVEN"
  845. d=product1am
  846. g=eval(d + "* 70 + 20")
  847. price=str(g)
  848. c.execute("CREATE TABLE IF NOT EXISTS orders(name TEXT, lastname TEXT, email TEXT, country TEXT, city TEXT, address TEXT, postal TEXT, product TEXT, amount TEXT, price TEXT)")
  849. c.execute("INSERT INTO orders(name,lastname,email,country,city,address,postal,product,amount,price) VALUES (?,?,?,?,?,?,?,?,?,?)",(name,lstname,email,country,city,address,postalcode,product,product1am,price))
  850. autopy.alert.alert("THANK YOU FOR YOUR ORDER")
  851. conn.commit()
  852. self.shopfunc()
  853. msg="We have received your order !"
  854. mail=smtplib.SMTP('smtp.gmail.com',587)
  855. mail.ehlo()
  856. mail.starttls()
  857. mail.login(myemail,mypassword)
  858. mail.sendmail(myemail,user,msg)
  859.  
  860. elif(farank2 >= 1):
  861. password=self.password_text_input.text
  862. user=self.user_text_input.text
  863. conn = sqlite3.connect('accounts.db')
  864. c = conn.cursor()
  865. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  866. for row in c.fetchall():
  867. name=row[0]
  868. lstname=row[1]
  869. email=row[2]
  870. passw=row[3]
  871. country=row[4]
  872. city=row[5]
  873. address=row[6]
  874. postalcode=row[7]
  875. product="L-THYROXIN"
  876. d=product2am
  877. f=eval(d + "* 50 + 20")
  878. price=str(f)
  879. c.execute("CREATE TABLE IF NOT EXISTS orders(name TEXT, lastname TEXT, email TEXT, country TEXT, city TEXT, address TEXT, postal TEXT, product TEXT, amount TEXT, price TEXT)")
  880. c.execute("INSERT INTO orders(name,lastname,email,country,city,address,postal,product,amount,price) VALUES (?,?,?,?,?,?,?,?,?,?)",(name,lstname,email,country,city,address,postalcode,product,product2am,price))
  881. autopy.alert.alert("THANK YOU FOR YOUR ORDER")
  882. conn.commit()
  883. msg="We have received your order !"
  884. mail=smtplib.SMTP('smtp.gmail.com',587)
  885. mail.ehlo()
  886. mail.starttls()
  887. mail.login(myemail,mypassword)
  888. mail.sendmail(myemail,user,msg)
  889. self.shopfunc()
  890. elif(farank3>=1):
  891.  
  892. password=self.password_text_input.text
  893. user=self.user_text_input.text
  894. conn = sqlite3.connect('accounts.db')
  895. c = conn.cursor()
  896. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  897. for row in c.fetchall():
  898. name=row[0]
  899. lstname=row[1]
  900. email=row[2]
  901. passw=row[3]
  902. country=row[4]
  903. city=row[5]
  904. address=row[6]
  905. postalcode=row[7]
  906. product="PABAL"
  907. d=product3am
  908. f=eval(d + "* 100 + 20")
  909. price=str(f)
  910. c.execute("CREATE TABLE IF NOT EXISTS orders(name TEXT, lastname TEXT, email TEXT, country TEXT, city TEXT, address TEXT, postal TEXT, product TEXT, amount TEXT, price TEXT)")
  911. c.execute("INSERT INTO orders(name,lastname,email,country,city,address,postal,product,amount,price) VALUES (?,?,?,?,?,?,?,?,?,?)",(name,lstname,email,country,city,address,postalcode,product,product3am,price))
  912. autopy.alert.alert("THANK YOU FOR YOUR ORDER")
  913. conn.commit()
  914. msg="We have received your order !"
  915. mail=smtplib.SMTP('smtp.gmail.com',587)
  916. mail.ehlo()
  917. mail.starttls()
  918. mail.login(myemail,mypassword)
  919. mail.sendmail(myemail,user,msg)
  920. self.shopfunc()
  921. else:
  922. autopy.alert.alert("ERROR OCCURED")
  923. autopy.alert.alert("AN ERROR OCCURED OR WRONG EMAIL")
  924. except:
  925. autopy.alert.alert("!!!! NO INTERNET CONNECTION !!!!")
  926.  
  927.  
  928.  
  929.  
  930. def ordpr1(self):
  931.  
  932. product1am=self.product1am_text_input.text
  933. frank1=len(product1am)
  934. product2am=self.product2am_text_input.text
  935. frank2=len(product2am)
  936. product3am=self.product3am_text_input.text
  937. frank3=len(product3am)
  938.  
  939. if (frank1>=1):
  940. self.rempb()
  941. d=product1am
  942. g=eval(d + "* 70 + 20")
  943. f=str(g)
  944. self.ids.amandpr.text=str("You will order KABIVEN ! Amount : "+product1am+" and you will pay : "+f+" euros (with shipping )")
  945. self.ids.product3am.text=""
  946. self.ids.product2am.text=""
  947. password=self.password_text_input.text
  948. user=self.user_text_input.text
  949. conn = sqlite3.connect('accounts.db')
  950. c = conn.cursor()
  951. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  952. for row in c.fetchall():
  953. name=row[0]
  954. lstname=row[1]
  955. email=row[2]
  956. passw=row[3]
  957. country=row[4]
  958. city=row[5]
  959. address=row[6]
  960. postalcode=row[7]
  961. self.ids.vershipping.text=str("Are you sure about your shipping information ?\n Name : "+name+"\n Last name : "+lstname+"\n Email : "+email+"\n Country : "+country+"\n City : "+city+"\n Address : "+address+"\n Postal Code : "+postalcode)
  962. self.ids.yesbuy.pos=400,400
  963. self.ids.nobuy.pos=600,400
  964. else:
  965. print "ok"
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972. def ordpr2(self):
  973. self.rempb()
  974. product1am=self.product1am_text_input.text
  975. frank1=len(product1am)
  976. product2am=self.product2am_text_input.text
  977. frank2=len(product2am)
  978. product3am=self.product3am_text_input.text
  979. frank3=len(product3am)
  980. self.ids.yesbuy.pos=400,400
  981. if (frank2>=1):
  982. d=product2am
  983. g=eval(d + "* 50" + "+ 20")
  984. f=str(g)
  985. self.ids.amandpr.text=str("You will order L-THYROXIN ! Amount : "+product2am+" and you will pay : "+f+" euros (with shipping)")
  986. self.ids.product3am.text=""
  987. self.ids.product1am.text=""
  988. password=self.password_text_input.text
  989. user=self.user_text_input.text
  990. conn = sqlite3.connect('accounts.db')
  991. c = conn.cursor()
  992. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  993. for row in c.fetchall():
  994. name=row[0]
  995. lstname=row[1]
  996. email=row[2]
  997. passw=row[3]
  998. country=row[4]
  999. city=row[5]
  1000. address=row[6]
  1001. postalcode=row[7]
  1002. self.ids.vershipping.text=str("Are you sure about your shipping information ?\n Name : "+name+"\n Last name : "+lstname+"\n Email : "+email+"\n Country : "+country+"\n City : "+city+"\n Address : "+address+"\n Postal Code : "+postalcode)
  1003. self.ids.yesbuy.pos=400,400
  1004. self.ids.nobuy.pos=600,400
  1005.  
  1006.  
  1007. else:
  1008. print "ok"
  1009. def ordpr3(self):
  1010. self.rempb()
  1011. product1am=self.product1am_text_input.text
  1012. frank1=len(product1am)
  1013. product2am=self.product2am_text_input.text
  1014. frank2=len(product2am)
  1015. product3am=self.product3am_text_input.text
  1016. frank3=len(product3am)
  1017. if (frank3>=1):
  1018. d=product3am
  1019. g=eval(d + "* 100 + 20")
  1020. f=str(g)
  1021. self.ids.amandpr.text=str("You will order PABAL ! Amount : "+product3am+" and you will pay : "+f+" euros (with shipping)")
  1022. self.ids.product2am.text=""
  1023. self.ids.product1am.text=""
  1024. password=self.password_text_input.text
  1025. user=self.user_text_input.text
  1026. conn = sqlite3.connect('accounts.db')
  1027. c = conn.cursor()
  1028. c.execute("SELECT * FROM accounts WHERE email= ? AND password= ? ",(user,password))
  1029. for row in c.fetchall():
  1030. name=row[0]
  1031. lstname=row[1]
  1032. email=row[2]
  1033. passw=row[3]
  1034. country=row[4]
  1035. city=row[5]
  1036. address=row[6]
  1037. postalcode=row[7]
  1038. self.ids.vershipping.text=str("Are you sure about your shipping information ?\n Name : "+name+"\n Last name : "+lstname+"\n Email : "+email+"\n Country : "+country+"\n City : "+city+"\n Address : "+address+"\n Postal Code : "+postalcode)
  1039. self.ids.yesbuy.pos=400,400
  1040. self.ids.nobuy.pos=600,400
  1041. else:
  1042. print "ok"
  1043. def rembuy(self):
  1044. self.ids.amandpr.text=""
  1045. self.ids.vershipping.text=""
  1046. self.ids.yesbuy.pos=1000000000000,10000000000
  1047. self.ids.nobuy.pos=600222,4222200
  1048. def shopfunc(self):
  1049. self.rembuy()
  1050. self.remove_dels()
  1051. self.remove_rgstr()
  1052. self.remove_settings()
  1053. self.movpb()
  1054.  
  1055.  
  1056. pass
  1057.  
  1058.  
  1059. class CustomWidgetApp(App):
  1060. def build(self):
  1061. self.title = 'GMD(GREEK MEDICINES DISTRIBUTOR)'
  1062. self.icon = 'icon.png'
  1063. return CustomWidget()
  1064.  
  1065. customWidget = CustomWidgetApp()
  1066. customWidget.run()
  1067. #i have to do the login and registration database and program COMPLETED
  1068. #I have to do the contacts I COMPLETED
  1069. #I have to do the db for product ii
  1070. #I have to do the settings III COMPLETED
  1071. #I have to do the about us option IIII COMPLETED
  1072. #I have to do the shop func and we are done ! COMPLETED
  1073. """
  1074. row[0]=First_Name
  1075. row[1]=Last_name
  1076. row[2]=email
  1077. row[3]=password
  1078. row[4]=country
  1079. row[5]=city
  1080. row[6]=address
  1081. row[7]=postal_code
  1082. row[8]=position
  1083.  
  1084. 4/9/2018 :
  1085. We have to make the user settings
  1086. 7/9/2018:
  1087. We have completed the fucking settings and we have completed some registrations options
  1088. 10/9/2018:
  1089. We have completed the about us option and now we have started the contact form !
  1090. 29/9/2018 :
  1091. The program has been delayed but we have done the contact form and now we have done the design for shopfunc ,and the price calculation funvtion
  1092. 4/10/2018 :
  1093. The program is ready , Good job Kostas !!!!!!
  1094. """
  1095. #c.execute("UPDATE accounts SET position = 'user' WHERE email = (?) and password = (?)) VALUES (?, ?) ",(emailinp, passwordinp,))
  1096.  
  1097.  
  1098. # ------------------------KIVY-------------
  1099. # file name: home.py
  1100. #:kivy 1.10.0
  1101. <CustomWidget>:
  1102. #login
  1103. password_text_input: password
  1104. user_text_input: user
  1105. #-----register
  1106. firstnaminp_text_input: firstnaminp
  1107. lastnameinp_text_input: lastnameinp
  1108. emailinp_text_input: emailinp
  1109. passwordinp_text_input: passwordinp
  1110. countryinp_text_input: countryinp
  1111. cityinp_text_input: cityinp
  1112. addressinp_text_input: addressinp
  1113. postcodeinp_text_input: postcodeinp
  1114. #-----settings
  1115. chname_text_input: chname
  1116. chlstname_text_input: chlstname
  1117. chemail_text_input: chemail
  1118. chpassword_text_input: chpassword
  1119. chcountry_text_input: chcountry
  1120. chcity_text_input: chcity
  1121. chaddress_text_input: chaddress
  1122. chpostal_text_input: chpostal
  1123. #----Contact form
  1124. emailinput_text_input: emailinput
  1125. subjectinput_text_input: subjectinput
  1126. messageinput_text_input: messageinput
  1127. #----Shop
  1128. product1am_text_input: product1am
  1129. product2am_text_input: product2am
  1130. product3am_text_input: product3am
  1131. #XEKINAME
  1132. TextInput:
  1133. id:password
  1134. size:200,30
  1135. password:True
  1136. multiline:True
  1137. pos:990,540
  1138. Label:
  1139. id:passlab
  1140. font_size:24
  1141. color:0.7,0,0,1
  1142. pos:860,510
  1143. text:"Password :"
  1144. Button:
  1145. id:showpassword
  1146. size:150,30
  1147. text:"Show Password"
  1148. on_release:password.password=False
  1149. color:0,0.7,0,1
  1150. on_release:self.pos=14000,14000
  1151. pos:1240,540
  1152. on_release:hidepassword.pos=1240,540
  1153.  
  1154. Button:
  1155. color:0,0.7,0,1
  1156. id:hidepassword
  1157. size:150,30
  1158. pos:15000,15000
  1159. on_release:self.pos=10000,10000
  1160. on_release:showpassword.pos=1240,540
  1161. on_release:password.password=True
  1162. text:"Hide password"
  1163. TextInput:
  1164. id:user
  1165. size:200,30
  1166. password:False
  1167. multiline:True
  1168. pos:990,590
  1169. Label:
  1170. id:userlab
  1171. font_size:24
  1172. color:0.7,0,0,1
  1173. pos:860,563
  1174. text:"Email :"
  1175. color:0.7,0,0,1
  1176. Button:
  1177. id:login
  1178. on_release:root.login()
  1179. pos:900,500
  1180. size:100,10
  1181. text:"Login"
  1182. color:0,0.6,0,1
  1183. Button:
  1184. id:registera
  1185. on_release:root.register()
  1186. pos:1000,500
  1187. size:100,10
  1188. text:"Register"
  1189. color:0,0.6,0,1
  1190. Button:
  1191. id:aply
  1192. text:"Apply"
  1193. pos:9999,9999
  1194. size:100,20
  1195. color:1,0,0.2,1
  1196. on_release:root.aply()
  1197. Label:
  1198. pos:9999,9999
  1199. font_size:24
  1200. id:firstnamlab
  1201. text:"First Name :"
  1202. color:1,0,0,1
  1203. Label:
  1204. pos:9999,9999
  1205. font_size:24
  1206. text:"Last Name :"
  1207. id:lastnamelab
  1208. color:1,0,0,1
  1209. Label:
  1210. pos:9999,9999
  1211. text:"Email :"
  1212. font_size:24
  1213. color:1,0,0,1
  1214. id:emaillab
  1215. Label:
  1216. pos:9999,9999
  1217. color:1,0,0,1
  1218. text:"Password :"
  1219. font_size:24
  1220. id:passwordlab
  1221. Label:
  1222. pos:9999,9999
  1223. font_size:24
  1224. color:1,0,0,1
  1225. text:"Country :"
  1226. id:countrylab
  1227. Label:
  1228. pos:9999,9999
  1229. font_size:24
  1230. color:1,0,0,1
  1231. text:"City :"
  1232. id:citylab
  1233. Label:
  1234. pos:9999,9999
  1235. font_size:24
  1236. color:1,0,0,1
  1237. text:"Address :"
  1238. id:addresslab
  1239. Label:
  1240. pos:9999,9999
  1241. font_size:24
  1242. text:"Post Number :"
  1243. id:postcodelab
  1244. color:1,0,0,1
  1245. TextInput:
  1246. id:firstnaminp
  1247. size:200,25
  1248. pos:9999,9999
  1249. font_size:12
  1250. TextInput:
  1251. size:200,25
  1252. id:lastnameinp
  1253. pos:9999,9999
  1254. font_size:12
  1255. TextInput:
  1256. size:200,25
  1257. id:emailinp
  1258. pos:9999,9999
  1259. font_size:12
  1260. TextInput:
  1261. size:200,25
  1262. id:passwordinp
  1263. password:True
  1264. pos:9999,9999
  1265. font_size:12
  1266. TextInput:
  1267. size:200,25
  1268. id:countryinp
  1269. pos:9999,9999
  1270. font_size:12
  1271. TextInput:
  1272. size:200,25
  1273. id:cityinp
  1274. pos:9999,9999
  1275. font_size:12
  1276. TextInput:
  1277. size:200,25
  1278. id:addressinp
  1279. pos:9999,9999
  1280. font_size:12
  1281. TextInput:
  1282. size:200,25
  1283. id:postcodeinp
  1284. pos:9999,9999
  1285. font_size:12
  1286. Button:
  1287. pos:9999,9999
  1288. on_release:root.ret()
  1289. text:"change account"
  1290. size:210,30
  1291. id:peas
  1292. on_release:infolab.pos=15000,15000
  1293. Button:
  1294. id:infobtn
  1295. size:150,30
  1296. pos:10000,10000
  1297. color:0.3,0,0,1
  1298. text:"About us"
  1299. on_release:infolab.pos=1000,550
  1300. on_release:infohead.pos=920,700
  1301. on_release:infoimg.pos=580,30
  1302. on_release:root.remove_settings()
  1303. on_release:root.remove_dels()
  1304. on_release:root.removecontact()
  1305. on_release:root.rempb()
  1306. on_release:root.rembuy()
  1307. Label:
  1308. id:infolab
  1309. text:'“Morris & Dickson has established a solid reputation that distinguishes\n us from our competition. We understand that a reputation for th\n highest level of quality and service and visionary innovation must\nbe constantly renewed. We supply our customers with exactly what’s needed \n to provide their patients with the highest level of pharmaceutical care.\n We do so consistently, on time, at the right place and at the right price.\nPaul Dickson, President'
  1310. markup: True
  1311. color:0.4,0,0,1
  1312. pos:14000,14000
  1313. font_size:24
  1314. shorten: True
  1315. ellipsis_options: {'color':(1,0.5,0.5,1),'underline':True}
  1316. italic: True
  1317. Label:
  1318. id:infohead
  1319. text:"About us :"
  1320. color:0.5,0,0,1
  1321. bold:True
  1322. italic:True
  1323. pos:9999,9999
  1324. font_size:48
  1325. Image:
  1326. id:infoimg
  1327. source:'farmak.jpg'
  1328. size:780,420
  1329. pos:9999,9999
  1330. Button:
  1331. id:set
  1332. text:"Settings"
  1333. pos:9999,9999
  1334. color:0.8,0,0,1
  1335. size:210,30
  1336. on_release:root.settings()
  1337.  
  1338. TextInput:
  1339. id:chname
  1340. pos:9999,9999
  1341. size:200,30
  1342. Button:
  1343. id:chnamebtn
  1344. text:"Apply"
  1345. size:300,30
  1346. on_release:root.update_user_name()
  1347. pos:10000,10000
  1348. Label:
  1349. pos:10000,10000
  1350. id:chfrstnmlbl
  1351. font_size:24
  1352. color:0.5,0.5,0,1
  1353. text:"Change first name :"
  1354.  
  1355. TextInput:
  1356. id:chlstname
  1357. pos:9999,9999
  1358. size:200,30
  1359. Button:
  1360. id:chlstnamebtn
  1361. text:"Apply"
  1362. size:300,30
  1363. on_release:root.update_user_lstname()
  1364. pos:10000,10000
  1365. Label:
  1366. pos:10000,10000
  1367. id:chlstsnmlbl
  1368. font_size:24
  1369. color:0.5,0.5,0,1
  1370. text:"Change Last name :"
  1371. #email
  1372. TextInput:
  1373. id:chemail
  1374. pos:9999,9999
  1375. size:200,30
  1376. Button:
  1377. id:chemailbtn
  1378. text:"Apply"
  1379. size:300,30
  1380. on_release:root.update_user_email()
  1381. pos:10000,10000
  1382. Label:
  1383. pos:10000,10000
  1384. id:chemaillbl
  1385. font_size:24
  1386. color:0.5,0.5,0,1
  1387. text:"Change Your email :"
  1388. #password
  1389. TextInput:
  1390. id:chpassword
  1391. pos:9999,9999
  1392. size:200,30
  1393. password:True
  1394. Button:
  1395. id:chpasswordbtn
  1396. text:"Apply"
  1397. size:300,30
  1398. on_release:root.update_user_password()
  1399. pos:10000,10000
  1400. Label:
  1401. pos:10000,10000
  1402. id:chpasswordlbl
  1403. font_size:24
  1404. color:0.5,0.5,0,1
  1405. text:"Change Your password :"
  1406. # """
  1407. # Label:
  1408. # pos:50000,50000
  1409. # text:"PUT THE CODE WE SENT IN YOUR EMAIL"
  1410. # color:0.5,0.5,0,1
  1411. # id:verfpass
  1412. # TextInput:
  1413. # id:verippass
  1414. # po
  1415. # """
  1416.  
  1417. #country
  1418. TextInput:
  1419. id:chcountry
  1420. pos:9999,9999
  1421. size:200,30
  1422. password:False
  1423. Button:
  1424. id:chcountrybtn
  1425. text:"Apply"
  1426. size:300,30
  1427. on_release:root.update_user_country()
  1428. pos:10000,10000
  1429. Label:
  1430. pos:10000,10000
  1431. id:chcountrylbl
  1432. font_size:24
  1433. color:0.5,0.5,0,1
  1434. text:"Change Your Country :"
  1435. #city
  1436. TextInput:
  1437. id:chcity
  1438. pos:9999,9999
  1439. size:200,30
  1440. password:False
  1441. Button:
  1442. id:chcitybtn
  1443. text:"Apply"
  1444. size:300,30
  1445. on_release:root.update_user_city()
  1446. pos:10000,10000
  1447. Label:
  1448. pos:10000,10000
  1449. id:chcitylbl
  1450. font_size:24
  1451. color:0.5,0.5,0,1
  1452. text:"Change Your City :"
  1453. #address
  1454. TextInput:
  1455. id:chaddress
  1456. pos:9999,9999
  1457. size:200,30
  1458. password:False
  1459. Button:
  1460. id:chaddressbtn
  1461. text:"Apply"
  1462. size:300,30
  1463. on_release:root.update_user_address()
  1464. pos:10000,10000
  1465. Label:
  1466. pos:10000,10000
  1467. id:chaddresslbl
  1468. font_size:24
  1469. color:0.5,0.5,0,1
  1470. text:"Change Your address :"
  1471. #postal
  1472. TextInput:
  1473. id:chpostal
  1474. pos:9999,9999
  1475. size:200,30
  1476. password:False
  1477. Button:
  1478. id:chpostalbtn
  1479. text:"Apply"
  1480. size:300,30
  1481. on_release:root.update_user_postal()
  1482. pos:10000,10000
  1483. Label:
  1484. pos:10000,10000
  1485. id:chpostallbl
  1486. font_size:24
  1487. color:0.5,0.5,0,1
  1488. text:"Change Your postal :"
  1489. Button:
  1490. pos:10000,10000
  1491. text:"Delete my Account !!!"
  1492. color:0.5,0,0,1
  1493. size:500,30
  1494. on_release:root.delete_my_acc_vrf()
  1495. id:delv
  1496. Label:
  1497. italic: True
  1498. id:verification_del
  1499. text:"Are you sure that you want to delete your account ?"
  1500. color:0.7,0,0,1
  1501. pos:10000,10000
  1502. font_size:24
  1503. Button:
  1504. pos:10000,10000
  1505. text:"Yes"
  1506. color:1,0,0,1
  1507. size:150,30
  1508. on_release:root.delete_my_acc_yes()
  1509. id:verification_yes
  1510. Button:
  1511. pos:10000,10000
  1512. text:"No"
  1513. color:1,0,0,1
  1514. size:150,30
  1515. on_release:root.delete_my_acc_no()
  1516. id:verification_no
  1517. Button:
  1518. pos:10000,10000
  1519. text:"Contact"
  1520. color:0,0.5,0.5,1
  1521. size:150,30
  1522. id:contactmainbtn
  1523. on_release:root.contactfunc()
  1524.  
  1525.  
  1526.  
  1527. #Contact EMAIL
  1528. Label:
  1529. pos:10000,10000
  1530. text: "Our email : kostas2372@gmail.com"
  1531. italic:True
  1532. color:0.5,0.7,0,1
  1533. id:ourmail
  1534. font_size:24
  1535.  
  1536. #CONTACT FORM
  1537. Label:
  1538. pos:10000,10000
  1539. text: "Email :"
  1540. italic:True
  1541. color:0.5,0.7,0,1
  1542. id:emailinputlbl
  1543. font_size:20
  1544.  
  1545. TextInput:
  1546. pos:10000,10000
  1547. italic:True
  1548. color:0.5,0.7,0,1
  1549. id:emailinput
  1550. size:200,30
  1551. #SUBJECT
  1552. Label:
  1553. pos:10000,10000
  1554. text: "Subject :"
  1555. italic:True
  1556. color:0.5,0.7,0,1
  1557. id:subjectinputlbl
  1558. font_size:20
  1559.  
  1560. TextInput:
  1561. pos:10000,10000
  1562. italic:True
  1563. color:0.5,0.7,0,1
  1564. id:subjectinput
  1565. size:200,30
  1566. #Message
  1567. Label:
  1568. pos:10000,10000
  1569. text: "Message :"
  1570. italic:True
  1571. color:0.5,0.7,0,1
  1572. id:messageinputlbl
  1573. font_size:20
  1574.  
  1575. TextInput:
  1576. pos:10000,10000
  1577. italic:True
  1578. color:0.5,0.7,0,1
  1579. id:messageinput
  1580. size:350,300
  1581. Button:
  1582. pos:10000,10000
  1583. italic:True
  1584. color:0.5,0.7,0,1
  1585. id:sendmail
  1586. size:150,30
  1587. text:"Send..."
  1588. on_release:root.sendml()#----------------------------------------------STOP-------------------------------------------
  1589. Button:
  1590. pos:100000,10000
  1591. color:0.6,0.3,0,1
  1592. id:shop
  1593. size:150,30
  1594. text:"Shop"
  1595. on_release:root.shopfunc()
  1596.  
  1597. Label:
  1598. pos:100000,10000
  1599. color:0.6,0.3,0,1
  1600. id:amount
  1601. font_size:24
  1602. text:"Amount"
  1603.  
  1604. Label:#----------------------------product 1---------------------------------
  1605. pos:100000,10000
  1606. color:0.6,0.3,0,1
  1607. id:product1
  1608. font_size:24
  1609. text:"KABIVEN"
  1610. TextInput:
  1611. size:100,40
  1612. multiline:False
  1613. pos:10000,10000
  1614. id:product1am
  1615. input_filter: "int"
  1616. Label:
  1617. color:0.1,0.9,0,1
  1618. pos:10000,10000
  1619. id:product1pr
  1620. text:"2566ml :70 dollars"
  1621. Button:
  1622. pos:10000,10000
  1623. color:0.9,0,0.1,1
  1624. text:"Check more !"
  1625. id:product1info
  1626. size:150,30
  1627. on_release:root.product1info()
  1628.  
  1629. Button:
  1630. pos:10000,15000
  1631. color:0.6,0,0.5,1
  1632. text:"Order..."
  1633. id:product1ord
  1634. size:150,30
  1635. on_release:root.ordpr1()
  1636. Button:
  1637. pos:10000,15000
  1638. color:0.6,0.1,0.5,1
  1639. text:"Calculate..."
  1640. id:product1calc
  1641. size:150,30
  1642. on_release:root.calcprice1()
  1643.  
  1644. Label:
  1645. color:0.1,0.9,0,1
  1646. pos:1080,700
  1647. id:product1alpr
  1648. text:""
  1649.  
  1650.  
  1651. Label:#----------------------------product 2---------------------------------
  1652. pos:100000,10000
  1653. color:0.6,0.3,0,1
  1654. id:product2
  1655. font_size:24
  1656. text:" L-THYROXIN "
  1657.  
  1658. TextInput:
  1659. size:100,40
  1660. multiline:False
  1661. pos:10000,10000
  1662. id:product2am
  1663. input_filter: "int"
  1664. Label:
  1665. color:0.1,0.9,0,1
  1666. pos:10000,10000
  1667. id:product2pr
  1668. text:"100mg :50 dollars"
  1669.  
  1670.  
  1671. Button:
  1672. pos:10000,10000
  1673. color:0.9,0,0.1,1
  1674. text:"Check more !"
  1675. id:product2info
  1676. size:150,30
  1677. on_release:root.product2info()
  1678. Button:
  1679. pos:10000,15000
  1680. color:0.6,0,0.5,1
  1681. text:"Order..."
  1682. id:product2ord
  1683. size:150,30
  1684. on_release:root.ordpr2()
  1685. Button:
  1686. pos:10000,15000
  1687. color:0.6,0.1,0.5,1
  1688. text:"Calculate..."
  1689. id:product2calc
  1690. size:150,30
  1691. on_release:root.calcprice2()
  1692. Label:
  1693. color:0.1,0.9,0,1
  1694. pos:1080,500
  1695. id:product2alpr
  1696. text:""
  1697.  
  1698. Label:
  1699. text:
  1700.  
  1701. Label:#----------------------------product 3---------------------------------
  1702. pos:100000,10000
  1703. color:0.6,0.3,0,1
  1704. id:product3
  1705. font_size:24
  1706. text:" PABAL "
  1707. TextInput:
  1708. size:100,40
  1709. multiline:False
  1710. id:product3am
  1711. pos:19999,11999
  1712.  
  1713. Label:
  1714. color:0.1,0.9,0,1
  1715. pos:10000,10000
  1716. id:product3pr
  1717. text:"100msg :100 dollars"
  1718.  
  1719. Button:
  1720. pos:10000,10000
  1721. color:0.9,0,0.1,1
  1722. text:"Check more !"
  1723. id:product3info
  1724. size:150,30
  1725. on_release:root.product3info()
  1726. input_filter: "int"
  1727. Button:
  1728. pos:10000,15000
  1729. color:0.6,0,0.5,1
  1730. text:"Order..."
  1731. id:product3ord
  1732. size:150,30
  1733. on_release:root.ordpr3()
  1734. Button:
  1735. pos:10000,15000
  1736. color:0.6,0.1,0.5,1
  1737. text:"Calculate..."
  1738. id:product3calc
  1739. size:150,30
  1740. on_release:root.calcprice3()
  1741.  
  1742. Label:
  1743. color:0.1,0.9,0,1
  1744. pos:1080,300
  1745. id:product3alpr
  1746. text:""
  1747. #----------------------order-----------------------
  1748. Label:
  1749. color:0.1,0.9,0,1
  1750. pos:550,760
  1751. text:""
  1752. id:amandpr
  1753. font_size:24
  1754. italic:True
  1755. Label:
  1756. text:""
  1757. id:vershipping
  1758. pos:350,600
  1759. color:0.1,0.9,0,1
  1760. font_size:22
  1761. italic:True
  1762. Button:
  1763. text:"Yes"
  1764. color:0.9,0.1,0,1
  1765. size:150,30
  1766. id:yesbuy
  1767. pos:1000,1000000
  1768. on_release:root.buyyes()
  1769. Button:
  1770. text:"No"
  1771. color:0.9,0.1,0,1
  1772. size:150,30
  1773. id:nobuy
  1774. pos:1000,1000000
  1775. on_release:root.buyno()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement