Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OG Tech PC Solutions
# Computer Store Vault Solutions

E-commerce web app project based on mvc model. Inspired by IdealTechPC. Neon theme.

Expand Down
2 changes: 1 addition & 1 deletion admin_edit_products.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Edit Products</title>
<title>Computer Store Vault - Edit Products</title>
<?php
require "header.php";
include "static/pages/side_nav.html";
Expand Down
2 changes: 1 addition & 1 deletion admin_manage_products.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Manage Products Panel</title>
<title>Computer Store Vault - Manage Products Panel</title>
<?php
include "header.php";
include "static/pages/side_nav.html";
Expand Down
4 changes: 2 additions & 2 deletions admin_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
}
?>

<h4 style="color:white">Total sales of last 7 days: RM<?php echo $data_tot = number_format((float)$data_tot, 2, '.', '');?></h4>
<h4 style="color:white">Total sales of last 7 days: <?php echo $data_tot = number_format((float)$data_tot, 2, '.', '');?></h4>
<h4 style="color:white">Start Date: <?php echo $date7?></h4>
<h4 style="color:white">End Date: <?php echo $date1?></h4>
</div>
Expand Down Expand Up @@ -288,7 +288,7 @@
$month_tot =$row['Amount'];
}
?>
<h4 style="color:white">Total sales of last 90 days: RM<?php echo $month_tot = number_format((float)$month_tot, 2, '.', '');?></h4>
<h4 style="color:white">Total sales of last 90 days: <?php echo $month_tot = number_format((float)$month_tot, 2, '.', '');?></h4>
</div>
<br><br><br>
<div class="row" id="product" name="product"></div>
Expand Down
2 changes: 1 addition & 1 deletion admin_view_orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Admin View Orders</title>
<title>Computer Store Vault - Admin View Orders</title>
</head>
<?php
include "header.php";
Expand Down
2 changes: 1 addition & 1 deletion cart.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<title>OG Tech PC - Cart</title>
<title>Computer Store Vault - Cart</title>
<?php include "header.php"; ?>

<div class="wide-container">
Expand Down
2 changes: 1 addition & 1 deletion classes/admin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function inspectProduct(){
$category = $row["Category"];
$category = Item::CATEGORY_ICON[(int)$category];
$sellingprice = $row["SellingPrice"];
$sellingprice = "RM ". number_format($sellingprice, 2);
$sellingprice = "". number_format($sellingprice, 2);
$quantityinstock = $row["QuantityInStock"];

echo(
Expand Down
16 changes: 16 additions & 0 deletions classes/signupContr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ private function uidExists() {
return $result;
}

private function pwdInvalid() {
$result = null;
if (!preg_match("/[a-zA-Z0-9]*$/", $this->pwd) || !preg_match("/\d/", $this->pwd)) {
$result = false;
}
else{
$result = true;
}
return $result;
}

public function createUser() {
if($this->emptyInput() == false) {
header("location: ../signup.php?error=empty_input");
Expand All @@ -80,6 +91,11 @@ public function createUser() {
exit();
}

if($this->pwdInvalid() == false) {
header("location: ../signup.php?error=password_invalid");
exit();
}

$this->setUser($this->username, $this->pwd, $this->email);
}
}
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<footer class="page-footer" style="margin-top: 120px; box-shadow: 0px 0px 2px white; background-color: rgb(17,17,17)">
<div class="row wide-container">
<div class="col s3">
<h4 class="white-text bold underline">OG Tech PC</h4>
<h4 class="white-text bold underline">Computer Store Vault</h4>
<p class="grey-text text-lighten-4">Your favorite online PC store.</p>
</div>
<div class="col s2">
Expand Down Expand Up @@ -42,7 +42,7 @@
</div>
</div>
<div class="footer-copyright" style="padding-bottom: 20px;">
<div class="wide-container underline">© 2021 OG Tech PC All rights reserved.</div>
<div class="wide-container underline">© 2021 Computer Store Vault All rights reserved.</div>
</div>

<script>
Expand Down
4 changes: 2 additions & 2 deletions includes/order.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function generateOrderDetails($item, $cartItem){

$dateAdded = $cartItem->getAddedDateTime();
$price = $cartItem->getPrice();
$price = "RM" . $price;
$price = "" . $price;
$quantity = $cartItem->getQuantity();
$quantityDisplay = "x" . $quantity;
$orderItemID = $cartItem->getOrderItemID();
Expand Down Expand Up @@ -140,7 +140,7 @@ function generateOrderSum($totalItems, $sumTotal, $displayShipping, $displaySVou
<tr><th>Total Items:</th><td class='left'>$totalItems</td></tr>");
echo("<tr><th>Delivery Charges:</th><td>");echo("$displayShipping $displaySVoucher</td></tr>");
echo("<tr><th >Promo Voucher:</th><td >$displayPVoucher</td></tr>");
echo("<tr><th>Sum Total:</th><td>RM$sumTotal</td></tr>");
echo("<tr><th>Sum Total:</th><td>$sumTotal</td></tr>");
echo("<tr><th>Status:</th><td>Shipped (check email for status)</td></tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion includes/product_catalogue.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function generateItemList($items){
$image = $item->getImage();
$name = $item->getName();
$price = $item->getSellingPrice();
$price = "RM" . number_format($price, 2);
$price = "" . number_format($price, 2);

$hasReviews = $item->HasReviews();
$avgRatings = $item->getAvgRatings();
Expand Down
10 changes: 7 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Landing Page</title>
<title>Computer Store Vault - Landing Page</title>
<?php
require "header.php";
require_once "includes/class_autoloader.php";
Expand Down Expand Up @@ -88,7 +88,7 @@
<div class="wide-container">
<h3 class="white-text center">BUILT BY ENTHUSIASTS FOR ENTHUSIASTS</h3>
<h5 class="white-text center">
At <b class="orange-text">OG Tech PC</b>, We are a team of serious gamers and overclockers with a passion towards customized and fast PCs.
At <b class="orange-text">Computer Store Vault</b>, We are a team of serious gamers and overclockers with a passion towards customized and fast PCs.
</h5>
</div>
</div>
Expand All @@ -112,7 +112,7 @@
</div>
</div>

<h3 class="white-text center">OG Tech PC - White PC Build</h3>
<h3 class="white-text center">Computer Store Vault - White PC Build</h3>
<div onclick="this.nextElementSibling.style.display='block'; this.style.display='none'" style="margin-bottom: 100px">
<img src="static/images/ice_pc.png" style="cursor:pointer; display:block; margin: 0 auto; " />
</div>
Expand Down Expand Up @@ -221,6 +221,10 @@
step: function (now) { $(this).text(Math.ceil(now)); }
});
});

$('.tint-glass-black').click(function() {
alert("hello world");
});
});
</script>
</html>
2 changes: 1 addition & 1 deletion login.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<title>OG Tech PC - Login</title>
<title>Computer Store Vault - Login</title>
<?php include "header.php"; ?>

<form method="POST" action="includes/login.inc.php">
Expand Down
2 changes: 1 addition & 1 deletion payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Payment</title>
<title>Computer Store Vault - Payment</title>
<?php
include "header.php";
require_once "includes/class_autoloader.php";
Expand Down
4 changes: 2 additions & 2 deletions product.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$name = $item->getName();
}
?>
<title>OG Tech PC — <?php echo htmlspecialchars($name) ?></title>
<title>Computer Store Vault — <?php echo htmlspecialchars($name) ?></title>
</head>
<body>

Expand All @@ -34,7 +34,7 @@
$description = $item->getDescription();
$quantityInStock = $item->getQuantityInStock();
$price = $item->getSellingPrice();
$displayPrice = "RM" . number_format($price, 2);
$displayPrice = "" . number_format($price, 2);
$category = $item->getCategory();
$category = Item::CATEGORY[$category];

Expand Down
2 changes: 1 addition & 1 deletion product_catalogue.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OG Tech PC - Product Catalogue</title>
<title>Computer Store Vault - Product Catalogue</title>
<?php
require_once "header.php";
require_once "includes/product_catalogue.inc.php";
Expand Down
5 changes: 4 additions & 1 deletion signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<i class="material-icons prefix white-text"> password</i>
<input name="pwd" id="pwd" type="password" class="validate white-text" minlength="8" maxlength="20">
<label for="pwd" class="white-text"> Password</label>
<span class="helper-text grey-text left-align" data-error="Min 8, Max 20 characters" data-success="Min 8, Max 20 characters">Min 8, Max 20 characters</span>
<span class="helper-text grey-text left-align" data-error="Min 8, Max 20 characters, at least one special character and one digit" data-success="Min 8, Max 20 characters, at least one special character and one digit">Min 8, Max 20 characters, at least one special character and one digit</span>
</div>
</div>
<div class="row">
Expand Down Expand Up @@ -55,6 +55,9 @@

else if ($_GET["error"] == "username_taken")
echo "<p>*Username/Email already taken!</p>";

else if ($_GET["error"] == "password_invalid")
echo "<p>*Password must contain at least one special character and one digit!</p>";

else if ($_GET["error"] == "none")
echo "<p class='green-text bold'>You have signed up! Please go to Login page</p>";
Expand Down
21 changes: 3 additions & 18 deletions static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,16 @@
}

.unglow {
-webkit-text-fill-color: white;
-webkit-text-fill-color: #333333;
}

.page-title {
color: white;
text-shadow: black 4px 0px 8px, black -4px 0px 8px, black 0px 4px 8px,
black 0px -4px 8px;
color: #333333;
}

/* body */
body {
background-color: black;
background-color: #FFFFFF;
}

/* containers */
Expand Down Expand Up @@ -77,19 +75,6 @@ body {
font-weight: bold;
}

.glow-text {
text-shadow: 0px 0px 5px cyan;
font-weight: bold;
}

.glow-title {
background-color: cyan;
color: white;
font-weight: bold;
pointer-events: none;
box-shadow: 2px 2px 10px white;
text-decoration: underline;
}

#bordershadow {
height: 70px;
Expand Down
27 changes: 10 additions & 17 deletions static/css/cards.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* square card boxes */
.selectable-card {
min-height: 350px;
background-color: black;
box-shadow: white 4px 4px 8px 2px;
backdrop-filter: blur(15px);
background-color: #F0F0F0;
border: 1px solid #DDDDDD;
transition: 0.2s cubic-bezier(0.8, 0, 0.2, 1);
}

Expand All @@ -16,37 +15,31 @@
}

#no-hover:hover {
box-shadow: white 4px 4px 8px 2px;
border: 1px solid #DDDDDD;
transition: 0.2s cubic-bezier(0.8, 0, 0.2, 1);
}

.selectable-card:hover {
box-shadow: red 8px 8px 24px 4px;
}

.selectable-card.tint-glass-cyan {
background-color: rgba(0, 170, 200, 0.5);
border: 1px solid #007BFF;
}

/* cart cards */
.collapsible-card {
color: white;
background-color: rgba(0, 52, 63, 0.8);
backdrop-filter: blur(20px);
color: #333333;
background-color: #F0F0F0;
}

.collapsible-card:hover {
box-shadow: black 4px 4px 20px 2px;
background-color: #E0E0E0;
}

/* cart titles */
.title-card {
color: white;
color: #333333;
padding: 20px;
background-color: rgba(56, 56, 56, 0.7);
background-color: #F0F0F0;
border-radius: 20px;
box-shadow: black 4px 4px 8px 2px;
backdrop-filter: blur(15px);
border: 1px solid #DDDDDD;
transition: 0.2s cubic-bezier(0.8, 0, 0.2, 1);
}

Expand Down
25 changes: 5 additions & 20 deletions static/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ nav {
z-index: 5050;
position: fixed;
top: 0;
background-color: #FFFFFF;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.2);
}

.nav {
Expand All @@ -15,28 +17,11 @@ nav {

.page_underline {
font-weight: bold;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 5s infinite linear;
text-shadow: 0px 0px 8px orange;
box-shadow: 0px 2px 5px orange;
color: #007BFF;
border-bottom: 2px solid #007BFF;
}

.underline {
font-weight: bold;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 5s infinite linear;
text-shadow: 0px 0px 8px orange;
}

@-webkit-keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(360deg);
}
color: #007BFF;
}
Loading