Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
518 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
BIN
+437 KB
Product1.jfif
Binary file not shown.
BIN
+34.6 KB
Product10.jfif
Binary file not shown.
BIN
+555 KB
Product2.jfif
Binary file not shown.
BIN
+186 KB
Product3.jfif
Binary file not shown.
BIN
+25.5 KB
Product4.jfif
Binary file not shown.
BIN
+435 KB
Product5.jfif
Binary file not shown.
BIN
+15.1 KB
Product6.jfif
Binary file not shown.
BIN
+82.9 KB
Product7.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+94.5 KB
Product8.jfif
Binary file not shown.
BIN
+753 KB
Product9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+113 KB
TechnicalD1.jfif
Binary file not shown.
BIN
+288 KB
TechnicalD2.jfif
Binary file not shown.
BIN
+119 KB
TechnicalD3.jfif
Binary file not shown.
BIN
+362 KB
TechnicalD4.jfif
Binary file not shown.
BIN
+86.7 KB
TechnicalD5.jfif
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import sqlite3 as sql | ||
|
||
mydb = sql.connect("jawaraDB") | ||
c = mydb.cursor() | ||
|
||
def CheckLogin(username, password): | ||
c.execute("""SELECT Username FROM tblUsers""") | ||
values = c.fetchall() | ||
validUser = False | ||
valid = False | ||
for i in values: | ||
if i[0][:] == username: | ||
validUser = True | ||
user = i[0][:] | ||
if validUser: | ||
c.execute("""SELECT Password FROM tblUsers WHERE Username = '{0}'""".format(user)) | ||
userPassword = c.fetchone() | ||
if password == userPassword[0][:]: | ||
valid = True | ||
return valid | ||
|
||
def CheckJob(username): | ||
c.execute("""SELECT Job FROM tblUsers WHERE Username = '{0}'""".format(username)) | ||
job = c.fetchone() | ||
return job | ||
|