Added basic forms, and the ability to add product categories
34 files changed, 190 lines added, 0 lines removed
Changes
--- SBMS/.DS_Store 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/.DS_Store 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,1 +1,2 @@
--- SBMS/CSS 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/CSS 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,2 @@
+40000 tree ddd6bb2a47dc4dcdad231c5741a63034fd5ddf7c _notes
+100644 blob 3a8e6ce9b806c64801799256520bdbd4cd2902e5 style.css
--- SBMS/CSS/_notes 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/CSS/_notes 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,1 @@
+100644 blob 33b186415cd62a48201c967c7481dcb4722dba31 dwsync.xml
--- SBMS/CSS/_notes/dwsync.xml 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/CSS/_notes/dwsync.xml 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="style.css" server="ftp.agnewm.myrpi.org/public_html/" local="3424093702" remote="12014029292" />
+</dwsync>
--- SBMS/CSS/style.css 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/CSS/style.css 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,40 @@
+/* CSS Document */
+
+.formColumn
+{+ width: 400px;
+ height: auto;
+ border-color: #000;
+ border-width:thin;
+ border-style:solid;
+ position:relative;
+ left:500px;
+}
+h1
+{+ position:relative;
+ text-align:center;
+}
+#currencyInput
+{+ width:50px;
+}
+#catDescriptInput
+{+ display:inline;
+ left: 50px;
+ vertical-align:top;
+ position:relative;
+}
+#catNameInput
+{+ display:inline;
+ left:50px;
+ position:relative;
+}
+#labelText
+{+ display: block;
+ left:25px;
+ position:relative;
+}
--- SBMS/DBDesigns/_notes 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/DBDesigns/_notes 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,1 @@
+100644 blob bc45268e9790de900683cf0ea1896feb65a24a40 dwsync.xml
--- SBMS/DBDesigns/_notes/dwsync.xml 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/DBDesigns/_notes/dwsync.xml 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name=".DS_Store" server="ftp.agnewm.myrpi.org/public_html/" local="3422985556" remote="12014029292" />
+<file name="categories.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985422" remote="12012920672" />
+<file name="departments.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3421941402" remote="12012920672" />
+<file name="discounts.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985631" remote="12012920672" />
+<file name="employees.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985762" remote="12014029292" />
+<file name="payroll.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3421941415" remote="12012920672" />
+<file name="products.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985410" remote="12012920672" />
+<file name="productscategories.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985593" remote="12012920672" />
+<file name="productsdiscounts.xml" server="ftp.agnewm.myrpi.org/public_html/" local="3422985642" remote="12012920672" />
+</dwsync>
--- SBMS/_notes 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/_notes 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,1 @@
+100644 blob efdf66a3d023ba3312492f0bb027c18011e91baa dwsync.xml
--- SBMS/_notes/dwsync.xml 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/_notes/dwsync.xml 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name=".DS_Store" server="ftp.agnewm.myrpi.org/public_html/" local="3423670528" remote="12014029292" />
+<file name="README" server="ftp.agnewm.myrpi.org/public_html/" local="3421941049" remote="12014029292" />
+<file name="index.php" server="ftp.agnewm.myrpi.org/public_html/" local="3424092558" remote="12014029292" />
+<file name="connect.php" server="ftp.agnewm.myrpi.org/public_html/" local="3422987524" remote="12014029292" />
+<file name="productentry.php" server="ftp.agnewm.myrpi.org/public_html/" local="3424092065" remote="12014029292" />
+<file name="categoryentry.php" server="ftp.agnewm.myrpi.org/public_html/" local="3424093798" remote="12014029292" />
+<file name="addCategory.php" server="ftp.agnewm.myrpi.org/public_html/" local="3424094681" remote="12014029292" />
+</dwsync>
--- SBMS/addCategory.php 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/addCategory.php 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,24 @@
+<?php
+include("connect.php");+$categoryName = $_POST[categoryName];
+$categoryDescription = $_POST[categoryDescription];
+$dup = mysql_query("SELECT categoryName FROM categories WHERE categoryName='".$_POST['categoryName']."'");+
+ if(mysql_num_rows($dup) >0){+ $errors['categoryName']= 'Category name already in use.';
+ }
+ else
+ {+ $sql = "INSERT INTO categories (categoryName, categoryDescription) VALUES ('$categoryName', '$categoryDescription')";+ }
+
+if (!mysql_query($sql,$con))
+ {+ die('Error: ' . mysql_error());+ }
+
+echo "1 record added";
+
+mysql_close($con);
+
+?>
--- SBMS/categoryentry.php 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/categoryentry.php 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="stylesheet" type="text/css" href="CSS/style.css" />
+<title>Category Entry</title>
+</head>
+
+<body>
+
+<?php include("connect.php"); ?>+
+
+<h1>BizNet</h1>
+
+<br />
+<div class="formColumn">
+<form id="CategoryForm" action="addCategory.php" method="post">
+ <p><div id="labelText">Category Name: </div><input type = "text" name = "categoryName" place = "Product Name" id="catNameInput"/></p>
+ <p><div id="labelText">Category Description:</div> <textarea name="categoryDescription" id="catDescriptInput" rows="15" cols="35"> </textarea></p>
+ <input type="submit" />
+</form>
+</div>
+
+
+</body>
+</html>
--- SBMS/connect.php 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/connect.php 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,14 @@
+<?php
+
+ $USERNAME = "";
+ $PASSWORD = "";
+ $DATABASE = "";
+ $con = mysql_connect("localhost", $USERNAME, $PASSWORD);+ if(!$con)
+ {+ die('Could not connect');+ }
+
+ mysql_select_db($DATABASE, $con);
+
+?>
--- SBMS/index.php 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/index.php 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>BizNet</title>
+</head>
+<body>
+<center>
+<h1>BizNet</h1>
+<br />
+<a href="productentry.php">Product Entry</a><br />
+<a href="categoryentry.php">Category Entry</a>
+</center>
+</body>
+</html>
--- SBMS/productentry.php 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/productentry.php 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="stylesheet" type="text/css" href="CSS/style.css" />
+<title>Product Entry</title>
+</head>
+
+<body>
+
+<?php include("connect.php"); ?>+
+<center>
+<h1>BizNet</h1>
+</center>
+<br />
+<div class="formColumn">
+<form id="ProductForm">
+ <p>Product Name: <input type = "text" name = "productName" place = "Product Name" /></p>
+ <p>Product Category: <select>
+
+ </select></p>
+ <p>Product Cost: $<input type = "text" name = "productDollars" place = "00" id="currencyInput" />.<input type = "text" name = "productCents" place = "00" id="currencyInput" /></p>
+
+</form>
+</div>
+
+
+</body>
+</html>
--- SBMS/root 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/root 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,3 @@
+40000 tree be3475ee8bd707eac8b96f99a0c942ebd6803ad1 _notes
+100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 index.php
+100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 productentry.php
--- SBMS/root/_notes 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/root/_notes 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,1 @@
+100644 blob a858320b9a9234bd4352d926861318f4e84650a6 dwsync.xml
--- SBMS/root/_notes/dwsync.xml 120667e1ed6bb650bd09eae03101673d77553e6d
+++ SBMS/root/_notes/dwsync.xml 8231c75e5f7e1228f399535afbdd50bf7635c876
@@ -1,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<dwsync>
+<file name="index.php" server="ftp.agnewm.myrpi.org/public_html/" local="3422985933" remote="12012920672" />
+<file name="productentry.php" server="ftp.agnewm.myrpi.org/public_html/" local="3422985958" remote="12012920672" />
+</dwsync>