Welcome to bitten-U-designs Designer Clothing range especially for children.

Bitten-u-designs offers original designs at an affordable price.

Please browse our catalogue and we look forward to making your original outfit for that special occasion.

 

%s', $sql); $result = mysql_query($sql, $conn) or die(mysql_error()); } //---------------------------- END update a record ---------------------- //--------------------------- START add a record ------------------------ if ($_REQUEST["hdnAdd"] == "true") { //add a new record and its image file $upload = $_FILES["filAddPicture"]; //the $_FILES superglobal is an array of arrays, that is an // array of file information for each file being uploaded //printf('Uploading picture %s from %s with %s bytes of type %s to %s
', $upload["name"], $upload["tmp_name"], $upload["size"], $upload["type"], dirname(__FILE__)."/".IMGFLD); //dirname() returns the directory portion of a pathname move_uploaded_file($upload["tmp_name"], dirname(__FILE__)."/".IMGFLD.$upload["name"]); // or die("Couldn't upload file!"); //make directory can be uploaded to with write permissions eg // # chmod 777 /var/www/users/images $sql = sprintf('INSERT INTO products (catID, name, shortDesc, description, picture, price) VALUES ("%s", "%s", "%s", "%s", "%s", "%.2f");', $_REQUEST["txtAddCatID"], $_REQUEST["txtAddName"], $_REQUEST["txtShortDesc"], $_REQUEST["txtAddDescription"], $upload["name"], $_REQUEST["txtAddPrice"]); // printf('
%s', $sql); $result = mysql_query($sql, $conn) or die(mysql_error()); } //---------------------------- END add a record ------------------------ //-------------------------- START delete a record --------------------- if ($_REQUEST["delete"] != "") { $sql = sprintf('SELECT picture FROM products WHERE productID = "%s";', $_REQUEST["delete"]); $result = mysql_query($sql, $conn) or die(mysql_error()); $row = mysql_fetch_array($result); if ($row["picture"] != "") { unlink(dirname(__FILE__)."/".IMGFLD.$row["picture"]); //delete any picture file for this record } $sql = sprintf('DELETE FROM products WHERE productID = "%s";', $_REQUEST["delete"]); //printf('
%s', $sql); $result = mysql_query($sql, $conn) or die(mysql_error()); } //------------------------------ END delete a record ------------------- //-------------------------- START display pricelist ------------------- printf(''); $sql = sprintf('SELECT * FROM cat;'); $result = mysql_query($sql, $conn) or die(mysql_error()); $row = mysql_fetch_array($result); // ------------------------START display select categories-------------- printf('
'); printf('

Please select a category '); printf('

'); printf('

'); if ($_REQUEST["selCat"] == "") { // display welcome message if no categries are selected printf('', "90%"); printf(''); printf(''); printf(''); printf(''); printf(''); printf(''); printf(''); printf(''); printf('

Hello and welcome.

Select a category and press \'go\' to get started or view all products.
'); printf('We have that perfect outfit for you this party season.
Sample of DressesSample of DressesSample of DressesSample of Dresses
Check out our
Dresses here
Check out our
Tops here
Check out our
pants here
Check out our
skirts here

'); } if ($_REQUEST["selCat"] == 5) { $sql = sprintf('SELECT * FROM products;'); } else { $sql = sprintf('SELECT * FROM products WHERE catID = "%s";', $_REQUEST["selCat"]); } //set up an sql command $result = mysql_query($sql, $conn) or die(mysql_error()); //run query or display error and stop script $row_count = mysql_num_rows($result); //get the number of rows returned by the query //echo "
$row_count"; mysql_close($conn); //close database connection to free up server resources if ($_SESSION["admin"]) { //---------------------------- START display admin pricelist --------- printf('', '90%'); //---------------------------------- START add row ------------------- printf('', $_REQUEST["selCat"]); //to upload files, the form's encoding type has be changed // and make sure the method is set to post printf(''); printf(''); printf(''); printf('', '25%', '25%'); printf('', '25%', '25%'); printf(''); printf(''); printf(''); printf(''); printf(''); printf(''); printf('

Add A New Product Here

Category ID
Dresses = 1, Tops = 2, Shorts = 3, Skirts = 4
Categaory IDPrice
NameUpload Picture  
Short Description
Long Description

'); //------------------------------ END add row ------------------------ while ($row = mysql_fetch_array($result)) { //each $row is the next array of fields from the table //when the rows run out, $row is null and the while loop terminates printf('
', $_REQUEST["selCat"]); printf('', '90%'); printf(''); //------------------------------- START option to edit --------------- if ($row["productID"] != $_REQUEST["edit"]) { //display a row that is not being edited printf(''); printf('', '25%', '25%', $row["catID"]); printf('', '25%', '25%', $row["price"]); printf('', $row["name"]); printf('', IMGFLD.$row["picture"], $row["picture"], IMGFLD.$row["picture"]); printf('', $row["shortDesc"]); printf('', $row["description"]); printf('', $row["productID"]); //each element of the $row array is named the same as the db field //format price as currency printf('', $row["productID"], $_REQUEST["selCat"]); //this way of creating a hyperlink button does not work in IE //------------------------------ END option to edit ------------------ } else { //------------------------------ START update row --------------------- printf('', $row["productID"]); //tell page to update this row's product printf('', '25%', '25%', $row["catID"]); printf('', '25%', '25%', $row["price"]); printf('', $row["name"]); printf('', IMGFLD.$row["picture"], $row["picture"]); printf('', $row["shortDesc"]); printf('', $row["description"]); printf('', $row["productID"]); printf('', $_REQUEST["selCat"]); } //----------------------------- END update row ------------------------- printf(''); printf('

Edit/Delete This Product

Category ID %sPrice $%.2f
Name %sUpload Image %s 
%s
Short Decription
%s
Long Description
%s 
Product Id = %s ', "'index.php?edit=".$row["productID"]."&selCat=".$_REQUEST["selCat"]."'"); //turns a button into a hyperlink, but needs javascript enabled //make sure type=button so button does not submit the form //needed to quote value of href printf(' top of pageCategory ID Price
Name Upload Image %s
Short Decription
Long Description
Product Id = %s '); printf(' top of page 
'); printf('

'); } //-------------------------- END display admin pricelist --------------- } else { //------------------------- START display user pricelist ---------------- while ($row = mysql_fetch_array($result)) { //each $row is the next array of fields from the table //when the rows run out, $row is null and the while loop terminates printf('', '90%'); printf('', $row["productID"], $row["name"]); printf('', '20%', $row["productID"], IMGFLD.$row["picture"] ,$row["picture"]); printf('', nl2br($row["shortDesc"])); // nl2br() - Inserts HTML line breaks before all newlines in a string // this is an inbuilt function used here to sperate each new line of data entered into the database // used to help format returned data. printf('', $row["price"]); printf(''); printf('

%s

%s
$%.2fTop of page

'); } //-------------------------- END display user pricelist ------------------ } //----------------------------- END display pricelist -------------------- ?>