FINAL PROJECT | ONLINE SHOP (GARAGE SHOES)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Our online shop name Garage Shoes is a shop that sell various type of custom made shoe brands like Nike, Adidas, Converse and etc.
The owners are Nor Shafiqah Dieyana and Nadwatul Assyira.


A) MySQL Database



B) Interface

LOG IN
HOME
CHOOSE ITEM
CART
PAYMENT FORM
PROMOTION VIDEO

C) PHP Coding

PAYMENT

PAYMENT_PROCESS

LAB 09 | ADD NEW DATA TYPE (LONGBLOB) FOR PICTURE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add ONE field in the table for Picture.

1. Add new field in PHPMyAdmin for Picture (type - longblob).
2. Upload the picture in JPG formatted.




3. Edit the coding below.


OUTPUT


LAB 08 | ADD NEW FIELD FOR VIDEO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add ONE field in the table for video MP4 - formatted.

1. Add new field in PHPMyAdmin for video (type - varchar 10000).
2. Add the embed link for video in the value.


3. Edit the coding below.

OUTPUT



LAB 07 | ADD NEW FIELD FOR IMAGE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Add ONE field in the table for image/pic/photo normally PNG/JPG - formatted.

  1. Add new field in PHPMyAdmin for image (type - vachar 10000)
  2. Add the embed link for image into value.

      3. Edit the coding below. 


OUTPUT



LAB 06 | Database + SQL Commands + PHP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Base on previous sample of small system. Develop your own database + SQL commands + PHP.
Coding consists of the following files:-


  • deleteList.php
  • deleleUser.php
  • edit_process.php
  • editList.php
  • editUser.php
  • home.php
  • listAll.php
  • register.php
  • register_process.php
  • searching.php
  • searching_process.php
  • viewUser,php

SQL file:- Lab06.sql

OUTPUT










LAB 05 | SERVER SIDE SCRIPT (PHP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • PHP is one of the server-side scripting languages.
  • PHP was originally called Personal Home Page.
  • PHP is an open source and eventually the name changed to PHP Hypertext Pre-processor.
  • PHP script can be embedded within HTML to create dynamic and interactive web pages.

1. Working with Form

  • PHP is really good at handling data submitted to server in HTML forms.
  • HTML forms allow users to enter data into a web page.
  • On the server, we can use PHP page along the form collection to handle information set.
2. Simple form processing
  • The main purpose of a FORM is to accept user input in a systematic structured manner.

<form METHOD= “GET”
      ACTION= “process.php”>


3. Authentication using USERNAME and PASSWORD
  • Authentication is a mechanism for allowing a user to access private information or for preventing them from doing so.






4. Managing session
  • A session is referred to as the duration for which a user is connected to a site.
  • A session is a block of information that stores variables and values.
  • A session consists of an identification string which is called the session ID.
  • This session ID is sent to the user's computer in a cookie called PHPSESSID.



MIDTERM BREAK | JAVASCRIPT 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interactive Creative Design (STIV2053) subject allocates its mark percentage by 60% and 40% where the 60% represents the coursework and the 40% represents the final exam. 
Coursework is constituted of quizzes, assignments and a final project which carry the percentage of 10%, 20%, and 30% respectively. 
There are 10 quizzes and only the best five are selected to be calculated as a part of the carry mark AUTOMATICALLY. Four assignments must be completed in order to contribute to the carry mark’s total and as for the final project; a complete Interactive Creative Design work along with a written report must be submitted. Both carry the percentages of 20% and 10% respectively.
Develop a system that counts the total percentage of the subject and based on the total percentage obtained by using JavaScript + HTML

The script as below:

<html>
<head>
<script type="text/javascript">
function Calculate()
{
 var quizzes, totalAssignment, totalProject, totalCarryMarkObtained;

 var q1 = parseInt(document.getElementById('quiz1').value);
 var q2 = parseInt(document.getElementById('quiz2').value);
 var q3 = parseInt(document.getElementById('quiz3').value);
 var q4 = parseInt(document.getElementById('quiz4').value);
 var q5 = parseInt(document.getElementById('quiz5').value);
 var q6 = parseInt(document.getElementById('quiz6').value);
 var q7 = parseInt(document.getElementById('quiz7').value);
 var q8 = parseInt(document.getElementById('quiz8').value);
 var q9 = parseInt(document.getElementById('quiz9').value);
 var q10 = parseInt(document.getElementById('quiz10').value);

 var num = [q1,q2,q3,q4,q5,q6,q7,q8,q9,q10];
 num.sort(function(a,b){return a -b});
 var totalQuizzes = num[5] + num[6] + num[7] + num[8] + num[9];
 quizzes = totalQuizzes /50 * 10;

 var a1 = parseInt(document.getElementById('assignment1').value);
 var a2 = parseInt(document.getElementById('assignment2').value);
 var a3 = parseInt(document.getElementById('assignment3').value);
 var a4 = parseInt(document.getElementById('assignment4').value);
 totalAssignment = (a1 + a2 + a3 + a4) /100 * 20;

 var p1 = parseInt(document.getElementById('projectFull').value);
 var p2 = parseInt(document.getElementById('projectReport').value);
 totalProject = (p1/100*20) + (p2/10*10);

 var final = parseInt(document.getElementById('final').value);

 totalCarryMarkObtained= quizzes + totalAssignment + totalProject + final;

 alert("Total Carry Mark Obtained = " + totalCarryMarkObtained);
}
</script>
</head>
<body>
<h1 align="center" style="background-color: lightblue"> STIV2053 Interactive Creative Design </h1>
</br>

<h2 style="background-color: red"> Carry Mark [60%] </h2>
<h3 style="background-color: grey"><u> Quizzes [10%] </u> </h3>
<p style="background-color: lightgrey"> Quiz 1 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz1" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 2 (10%) &emsp;  &emsp;  &emsp;  &emsp;  &emsp;
<input type="text" id="quiz2" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 3 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz3" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey> Quiz 4 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz4" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 5 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz5" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 6 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz6" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 7 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz7" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 8 (10%) &emsp;  &emsp;  &emsp; &emsp;  &emsp;
<input type="text" id="quiz8" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 9 (10%) &emsp;  &emsp;  &emsp;  &emsp;  &emsp;
<input type="text" id="quiz9" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Quiz 10 (10%) &emsp;  &emsp; &ensp;  &emsp;  &emsp;
<input type="text" id="quiz10" size=5 maxlength=2 ></p>
</br>

<h3 style="background-color: grey"><u> Assignments [20%] </u> </h3>
<p style="background-color: lightgrey"> Assignment 1 (20%) &emsp;  &emsp;  &emsp;
<input type="text" id="assignment1" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Assignment 2 (20%) &emsp;  &emsp;  &emsp;
<input type="text" id="assignment2" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Assignment 3 (20%) &emsp;  &emsp;  &emsp;
<input type="text" id="assignment3" size=5 maxlength=2 ></p>
<p style="background-color: lightgrey"> Assignment 4 (20%) &emsp;  &emsp;  &emsp;
<input type="text" id="assignment4" size=5 maxlength=2 ></p>
</br>

<h3 style="background-color: grey"><u> Final Project [30%] </u> </h3>
<p style="background-color: lightgrey"> Interactive Creative Design Project (20%) &emsp;  &emsp;
<input type="text" id="projectFull" size=5 maxlength=3 ></p>
<p style="background-color: lightgrey"> Interactive Creative Design Report (10%) &emsp;  &emsp;
<input type="text" id="projectReport" size=5 maxlength=2 ></p>

</br>
</br>

<h2 style="background-color: red"> Final Exam [40%] &emsp;  &emsp; <input type="text" id="final" size=5 maxlength=3 >
  </h2>
</br>
</br>

<input type="button" value="Calculate!" onClick="Calculate()">
</body>

</html>

The interface as below:



Message box will pop-up: