Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch01 #1

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions 01 LOGIN DETAILS & PROJECT INFO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**Database Name: sinventoryphp**

**Developed by Luoh Woei**

**Recommended PHP Version 5.6**


**Admin Login Details**

Username: admin
Password: Password@123

**Staff Login Details**

Username: staff
Password: staff

Username: Fanny
Password: Fanny@123
6 changes: 0 additions & 6 deletions CHANGELOG.md

This file was deleted.

Binary file removed Gift Coupon - Skydash.jpg
Binary file not shown.
103 changes: 0 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,104 +1 @@
# Skydash - Free Bootstrap Template

Skydash is the latest Bootstrap admin template from BootstrapDash. This template has been meticulously crafted to ensure the best possible experience for developers and users alike. This admin template is super easy to set up, modify and use. The clean design minimizes clutter and improves the overall user experience. Skydash is packed with all the features that fit your needs but not cramped with components you would not even use. It is an excellent fit to build admin panels, e-commerce systems, project management systems, CMS or CRM. It comes with a clean and well-commented code that makes it easy to work with the template. Thus making it an ideal pick for jump-starting your project.

<h1>Demo</h1>
Click below to check out the live demo.

[![N|Solid](preview.jpg)](https://bootstrapdash.com/demo/skydash-free/template/)


#### Credits:

- Bootstrap 4

- Font Awesome

- jQuery

- Gulp

- Chart.js

- Google Maps

- Perfect Scrollbar



#### Browser Support:

- Chrome (latest)

- FireFox (latest)

- Safari (latest)

- Opera (latest)

- IE10+


#### License Information:

Skydash is released under MIT license. Skydash is a free Bootstrap 4 admin template developed from BootstrapDash. Feel free to download it, use it, share it, get creative with it.

#### How to use Skydash?

-Install node-gyp package. If you don’t know the installation steps, please click [here](https://github.com/nodejs/node-gyp)

- Click the Clone or Download button in GitHub and download as a ZIP file or you can enter the command git clone https://github.com/BootstrapDash/skydash-free-bootstrap-admin-template.git in your terminal to get a copy of this template.

- After the files have been downloaded you will get a folder with all the required files

- Open your terminal (Run as Administrator). You can install all the dependencies in the template by running the command npm install. All the required files are in the node modules. If you didn't run with admin authorities, you can see errors.

- Find the file named index.html, check what components you need. Open the file in a text editor and you can start editing.

- Now that your project has now kick-started, all you need to do now is to code, code, and code to your heart's content.

#### How to Contribute?:

We love your contributions and we welcome them wholeheartedly. We believe the more the merrier. To contribute make sure you have Node.js and npm installed. Now run the command gulp --version. If the command returns with the Gulp version number, it means you have Gulp installed. If not you need to run the command npm install --global gulp-cli to install Gulp.


#### Next

After Gulp has been installed, follow the steps below to contribute.

- Fork and clone the repo.

- Run the command npm install to install all the dependencies.

- Enter the command gulp serve. This will open Skydash in your default browser.

- Make your valuable contribution.

- Submit a pull request.


### More from BootstrapDash
Here are some of our most popular templates:

- [StarAdmin Free Bootstrap Admin Template](https://github.com/BootstrapDash/StarAdmin-Free-Bootstrap-Admin-Template)
- [PurpleAdmin Free Admin Template](https://github.com/BootstrapDash/PurpleAdmin-Free-Admin-Template)
- [MajesticAdmin Free Bootstrap Admin Template](https://github.com/BootstrapDash/MajesticAdmin-Free-Bootstrap-Admin-Template)

### Like what you see?
Please leave a star on our GitHub repo.
Submit bugs and help us improve Corona Angular!
Find us on
- [Twitter](https://twitter.com/bootstrapdash?lang=en),
- [Facebook](https://www.facebook.com/bootstrapdash/),
- [Instagram](https://www.instagram.com/bootstrapdash/?hl=en),
- [Behance](https://www.behance.net/bootstrapdash),
- [Pinterest](https://www.pinterest.com/bootstrapdash/),
- [Dribbble](https://dribbble.com/bootstrapdash),
- [LinkedIn](https://in.linkedin.com/in/bootstrapdash)


#### Go Premium!!

Do you need a template with more features and functionalities? Get more with our collection of premium templates with more plugins, eye-catching animations, UI components, and sample pages all fitting together with a high-quality design. Visit https://www.bootstrapdash.com for more admin templates.

Check out the premium version of [Skydash Bootstrap admin template](https://www.bootstrapdash.com/product/skydash-admin-template/)
225 changes: 225 additions & 0 deletions RFID Hardware code/FYP.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
#!/usr/bin/env python

import RPi.GPIO as GPIO
from gpiozero import Button, Buzzer
from time import sleep
from mfrc522 import SimpleMFRC522
import pandas as pd
import sys
import base64
from datetime import datetime

# datetime object containing current date and time
# now = datetime.now()

# date_time_now = now.strftime("%d/%m/%Y %H:%M:%S")
# print("date_time_now")

def test_csv():
df = pd.DataFrame({'Time': ["aaa"],
'ID': ["this is id"],
'Description': ["description"]})

#view DataFrame
print("---This is what to add--- ")
print(df)



def write_only():
# id = "123"
# oldText = "000"

#read current data
id, oldText = reader.read()
buzzer.beep(0.1, 0.1, 1)


#key in new data
text = input("New data:")
print("Now place your tag to write")
buzzer.beep(0.1, 0.1, 1)

#encrypt the new data
convert2byte = bytes(text,encoding="utf-8")
encoded_data_in_byte = base64.b64encode(convert2byte)
#convert data into string type so able to write
final_encode_data_in_str = encoded_data_in_byte.decode('UTF-8')
print("---New Data---\n" + "Text: " + final_encode_data_in_str)

#write the new_encrypted_data
reader.write(final_encode_data_in_str)

#record to database
now = datetime.now()
date_time_now = now.strftime("%d/%m/%Y %H:%M:%S")

df = pd.DataFrame({'Time': [date_time_now],
'ID': [id],
'Description': [final_encode_data_in_str]})

#view DataFrame
print("---This is what to add--- ")
print(df)

df.to_csv('database.csv', mode='a', index=False, header=False)

df.to_csv('what2add.csv', mode='w', index=False, header=True)

def read_and_record_to_database():

#read current data
id, oldText = reader.read()
buzzer.beep(0.1, 0.1, 1)
pre_decode = oldText.encode('UTF-8') #change to bytes
decoded_data = base64.b64decode(pre_decode) #must decode in byte format
final_decoded_data = decoded_data.decode('UTF-8')

print("---Detected Data---\n" + "ID: %s\nText: %s" % (id,final_decoded_data))

#record to database
now = datetime.now()
date_time_now = now.strftime("%d/%m/%Y %H:%M:%S")

df = pd.DataFrame({'Time': [date_time_now],
'ID': [id],
'Description': [oldText]})

#view DataFrame
print("---This is what to add--- ")
# print(df)

df.to_csv('database.csv', mode='a', index=False, header=True)

df.to_csv('what2add.csv', mode='w', index=False, header=True)

dataframe.to_csv('database.csv',
index = False)
print(dataframe)

def read_and_update():

# id = "123"
# oldText = "000"

#read current data
id, oldText = reader.read()
buzzer.beep(0.1, 0.1, 1)
pre_decode = oldText.encode('UTF-8') #change to bytes
decoded_data = base64.b64decode(pre_decode) #must decode in byte format
final_decoded_data = decoded_data.decode('UTF-8')

print("---Old Data---\n" + "ID: %s\nText: %s" % (id,final_decoded_data))

#key in new data
text = input("New data:")
print("Now place your tag to write")
buzzer.beep(0.1, 0.1, 1)

#encrypt the new data
convert2byte = bytes(text,encoding="utf-8")
encoded_data_in_byte = base64.b64encode(convert2byte)
#convert data into string type so able to write
final_encode_data_in_str = encoded_data_in_byte.decode('UTF-8')
print("---New Data---\n" + "Text: " + final_encode_data_in_str)

#write the new_encrypted_data
reader.write(final_encode_data_in_str)

# replace new data to existing csv
# making data frame from the csv file
dataframe = pd.read_csv("database.csv")
a = str.strip(oldText)

print(a)
print("This is the old csv:")
print(dataframe)
# using the replace() method
dataframe.replace(to_replace = a,
value = final_encode_data_in_str,
inplace = True)

dataframe.to_csv('database.csv',
index = False)

dataframe = pd.read_csv("database.csv")
print("This is the new csv:")
print(dataframe)

#This part is to generate csv for what had changes
now = datetime.now()
date_time_now = now.strftime("%d/%m/%Y %H:%M:%S")

df = pd.DataFrame({'Time': [date_time_now],
'ID': [id],
'Description': [final_encode_data_in_str]})

df.to_csv('what2replace.csv', mode='w', index=False, header=True)


# def encrypt():

# convert2byte = bytes("encrypt this message",encoding="utf-8")

# encoded_data = base64.b64encode(convert2byte)

# pre_encode = encoded_data.decode('UTF-8')
# print(pre_encode)


def only_read_and_decrypt():
#!!! NO RECORD!!!
#read current data
id, oldText = reader.read()
buzzer.beep(0.1, 0.1, 1)
pre_decode = oldText.encode('UTF-8') #change to bytes
decoded_data = base64.b64decode(pre_decode) #must decode in byte format
final_decoded_data = decoded_data.decode('UTF-8')

print("---Detected Data---\n" + "ID: %s\nText: %s" % (id,final_decoded_data))
print(id,oldText)



GPIO.setwarnings(False)

sw1 = Button(21)
sw2 = Button(16)
sw3 = Button(20)
buzzer = Buzzer(26)

reader = SimpleMFRC522()

buzzer.beep(0.1, 0.1, 2)

try:
while True:
#read tag
if sw1.is_pressed:
print("Hold a tag near the reader")
# read_and_record_to_database()
write_only()

elif sw2.is_pressed:
print("Hold a tag near the reader")
read_and_update()

elif sw3.is_pressed:
print("Hold a tag near the reader")
only_read_and_decrypt()
# reader.write("dGVzdGluZw==")
# print("ID: %s\nText: %s" % (id,oldText))
# text = input('New data:')
# print("Now place your tag to write")
# #reader.write(text)
# buzzer.beep(0.1, 0.1, 1)
# update()
# #print(oldText +',new Text ='+ text)
# print("Written")
# print()


except KeyboardInterrupt:
GPIO.cleanup()
raise

15 changes: 15 additions & 0 deletions assests/01 LOGIN DETAILS & PROJECT INFO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**Log on to codeastro.com for more projects!***

**Database Name: sinventoryphp**

**Developed by Kshitij Soni**

**Recommended PHP Version 5.6**


**Admin Login Details**

Username: admin
Password: Password@123


Loading