Exemple #1
0
session_start();
//if(empty($_SESSION['customer_id'])){
//header("Location: customer.php");
//}
require_once 'storeScripts/db_connection.php';
$query = "SELECT * FROM customer";
$result = mysql_query($query);
if (!empty($_SESSION['customer_id'])) {
    header('Location: account.php');
}
require_once 'storeScripts/store_functions.php';
$query = "SELECT * FROM customer";
$result = mysql_query($query);
//Set Meta Data
$page = new Page_Class();
$page->setPageTitle('Create a New Account');
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyTitle('');
$page->setPropertyDesc('');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>

<div class="section_container"> 
    <!--Mid Section Starts-->
session_start();
/*BEGIN SEARCH*/
if (!empty($_REQUEST['q'])) {
    $q = $_REQUEST['q'];
    header("Location: listing_categories.php?q={$q}");
    /*END SEARCH*/
}
/*END SEARCH*/
require_once 'storeScripts/store_functions.php';
if (empty($_SESSION['customer_id'])) {
    header("Location: customer.php");
}
//Set the page Meta Data
$page = new Page_Class();
//Class Page to manage the site structure
$page->setPageTitle('Account Setting');
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyTitle('');
$page->setPropertyDesc('');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>
<div class="section_container">
        <!--Mid Section Starts-->
        <section>
Exemple #3
0
        $cart_item += $each_item['quantity'];
        $resp .= "<tr>";
        $resp .= "<td><img src='images/" . $image["image_name"] . "' width='50' height='50' /></td>";
        $resp .= "<td>" . $product_name . "</td>";
        $resp .= "<td>US\$" . number_format($price, 2) . "</td>";
        $resp .= "<td>" . $each_item['quantity'] . "</td>";
        $resp .= "<td>US\$" . number_format($each_item['quantity'] * $price, 2) . "</td>";
        //$resp .= "<td><form action='cart.php' method='post'><input type='hidden' value='".$i." name='index_to_remove'><input type='submit' value='remove' /></form></td>";
        $resp .= "</tr>";
        $resp .= "<tr><td colspan='6'><div style='border-bottom: 1px black dashed;'></div></td></tr>";
        $i++;
    }
}
$_SESSION['item_total'] = $cart_item;
$cart_total = @number_format($total, 2);
$page->setPageTitle('Checkout');
$page->setPageDescription('Louis Vuitton for less');
$page->setPageKeywords('luis vuitton, bags, hand bags');
$page->setPropertyTitle('');
$page->setPropertyDesc('');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>


<div class="section_container" style="border-color: white;"><!--Mid Section Starts-->
        $alt = $image["alt"];
        $out .= '<li>';
        $out .= '<a class="product_image" href="product_details.php?id=' . $id . '"><img src="images/' . $image['image_name'] . '" alt="' . $alt . '"  title="' . $product_name . '"  width="265" height="265" /></a>';
        $out .= '<div class="product_info">';
        $out .= '<h3><a href="product_details.php?id=' . $id . '">' . $data['product_name'] . '</a></h3>';
        $out .= '</div>';
        $out .= '<div class="price_info"> <a href="storeScripts/process_wishlist.php?product_name=' . $product_name . '&id=' . $id . '&price=' . $price . '">+ Add to wishlist</a>';
        //To add product to the cart throught addToCart javascript function
        $out .= '<button onclick="addToCart(' . $id . ')" class="price_add" title="" type="button"><span class="pr_price">' . $configuration->getCurrency() . '&nbsp;' . number_format($data['product_price'], 2) . '</span><span class="pr_add">Add to Cart</span></button>';
        $out .= '</div>';
        $out .= '</li>';
    }
}
//Set the Meta Data
$page = new Page_Class();
$page->setPageTitle('Listing Categories');
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>
    <div class="section_container">
        <!--Mid Section Starts-->
        <section>
            <!--SIDE NAV STARTS-->
Exemple #5
0
        $query = "SELECT * FROM product_image WHERE product_id = {$id} AND image_status = 1 LIMIT 1";
        $image = mysql_fetch_array(mysql_query($query));
        $alt = $image["alt"];
        $out .= '<li>';
        $out .= '<a class="product_image" href="product_details.php?id=' . $id . '"><img src="images/' . $image['image_name'] . '" title="' . $product_name . '" alt="' . $alt . '"  width="265" height="265" /></a>';
        $out .= '<div class="product_info">';
        $out .= '<h3><a href="product_details.php?id=' . $id . '">' . $data['product_name'] . '</a></h3>';
        $out .= '</div>';
        $out .= '<div class="price_info"> <a href="storeScripts/process_wishlist.php?product_name=' . $product_name . '&id=' . $id . '&price=' . $price . '">+ Add to wishlist</a>';
        $out .= '<button onclick="addToCart(' . $id . ')" class="price_add" title="" type="button"><span class="pr_price">' . $configuration->getCurrency() . '&nbsp;' . number_format($data['product_price'], 2) . '</span><span class="pr_add">Add to Cart</span></button>';
        $out .= '</div>';
        $out .= '</li>';
    }
    //Set Meta Data
    $page = new Page_Class();
    $page->setPageTitle('Index Page [buy anything you want in this online store]');
    $page->setPageDescription('e-comerce site');
    $page->setPageKeywords('buy, sales, specials, etc');
    $page->setPropertyTitle('');
    $page->setPropertyDesc('');
    $page->setPropertyType('');
    $page->setPropertyUrl('');
    $page->setPropertySiteName('');
    $page->setPropertyImage('');
    $page->setCssLink(css());
    $page->setJsLink(js());
    $page->getPageHeader();
    ?>

<div class="section_container"><!--Mid Section Starts--> <section> <!-- BEGIN BANNER -->
<?php 
while ($data = mysql_fetch_array($result)) {
    $id = $data["products_id"];
    $name = $data["products_name"];
    $price = $data["products_price"];
    $quantity = $data["products_quantity"];
    $total = $data["total"];
    $resp .= '<tr>';
    $resp .= '<td style="border: 1px gray solid;text-align: center;"><a href="product_details.php?id=' . $id . '" style="text-decoration: none;" target="_blank">' . $name . '</a></td>';
    $resp .= '<td style="border: 1px gray solid;text-align: center;">' . number_format($price, 2) . '</td>';
    $resp .= '<td style="border: 1px gray solid;text-align: center;">' . $quantity . '</td>';
    $resp .= '<td style="border: 1px gray solid;text-align: center;">' . number_format($total, 2) . '</td>';
    $resp .= '</tr>';
}
//Set the Meta Data
$page = new Page_Class();
$page->setPageTitle('Order Details');
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyTitle('');
$page->setPropertyDesc('');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>
<div class="section_container">
        <!--Mid Section Starts-->
        <section>
Exemple #7
0
        while (list($key, $value) = each($each_item)) {
            if ($key == "item_id" && $value == $item_id) {
                array_splice($_SESSION['cart_array'], $i - 1, 1, array(array("item_id" => $item_id, "quantity" => $quantity)));
            }
        }
    }
    header("Location: cart.php");
    exit;
}
//Show the cart items
$resp = "";
if (!empty($_SESSION['customer_id'])) {
    mysql_query("DELETE FROM customer_cart WHERE customer_id =" . $_SESSION['customer_id']);
}
if (!isset($_SESSION['cart_array']) || count($_SESSION['cart_array']) < 1) {
    $page->setPageTitle('My Shopping Cart');
    $page->setPageDescription('e-comerce site');
    $page->setPageKeywords('buy, sales, specials, etc');
    $page->setPropertyTitle('');
    $page->setPropertyDesc('');
    $page->setPropertyType('');
    $page->setPropertyUrl('');
    $page->setPropertySiteName('');
    $page->setPropertyImage('');
    $page->setCssLink(css());
    $page->setJsLink(js());
    $page->getPageHeader();
    echo "<br /><br /><br /><h1 align='center'>You currently have no items in your shopping cart, <a href='listing_categories.php'>browse and find some items to add to your cart now!</a></h1><br />";
    $page->getPageFooter();
    exit;
} else {
        $out .= '</div><br /><br />';
    }
    if (mysql_num_rows($result) < 0) {
        echo 'Sorry productID not found !!!';
        exit;
    }
    //Add 1 to product_viewed field in the product table
    mysql_query("UPDATE product SET product_viewed = product_viewed + 1 WHERE product_id = {$id}");
    if (!empty($_SESSION["customer_id"])) {
        $customer_id = $_SESSION["customer_id"];
        mysql_query("INSERT INTO product_log(product_id, product_name,price, customer_id, date_added) VALUES ({$id}, '{$product_name}', {$price}, {$customer_id}, now())");
    }
}
//Page header setting
$page = new Page_Class();
$page->setPageTitle($product_name);
$page->setPageDescription($descriptions);
$page->setPageKeywords($keywords);
$page->setPropertyTitle($product_name);
$page->setPropertyDesc($description);
$page->setPropertyType('product');
$page->setPropertyUrl('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
$page->setPropertySiteName('http://' . $_SERVER['SERVER_NAME']);
$page->setPropertyImage('http://' . $_SERVER['SERVER_NAME'] . '/php/store/images/' . $image["image_name"]);
$page->getPageHeader();
?>

<script type="text/javascript">

function change_image(id){
	//alert('The ID: ' + id);
Exemple #9
0
// (c) Copyright:
//               Natanael Sanchez Melchor
//               http://www.natanaelsanchez.comxa.com
//               natanaelsm83@gmail.com
//==============================================================+
//Verify is the session is created
session_start();
if (!empty($_SESSION['customer_id'])) {
    header('Location: account.php');
}
require_once 'storeScripts/store_functions.php';
$query = "SELECT * FROM customer";
$result = mysql_query($query);
//Set Meta Data
$page = new Page_Class();
$page->setPageTitle('Login / Create a New Account');
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyTitle('');
$page->setPropertyDesc('');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>

<div class="section_container"> 
    <!--Mid Section Starts-->
Exemple #10
0
//               natanaelsm83@gmail.com
//==============================================================+
//Verify is the session is created
session_start();
/*BEGIN SEARCH*/
if (!empty($_REQUEST['q'])) {
    $q = $_REQUEST['q'];
    header("Location: listing_categories.php?q={$q}");
    /*END SEARCH*/
}
/*END SEARCH*/
$GLOBALS["nav"] = 'contact';
require_once 'storeScripts/store_functions.php';
//Set the Meta Data
$page = new Page_Class();
$page->setPageTitle('Contact Us');
$page->setPageDescription('Contact Us Form');
$page->setPageKeywords('contact, us, contact us');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>

<div class="section_container">
        <!--Mid Section Starts-->
        <section>
Exemple #11
0
    $out .= '<div class="price_info"> <a href="storeScripts/process_wishlist.php?product_name=' . $product_name . '&id=' . $id . '&price=' . $price . '">+ Add to wishlist</a>';
    $out .= '<button onclick="addToCart(' . $id . ')" class="price_add" title="" type="button"><span class="pr_price">' . $configuration->getCurrency() . '&nbsp;' . number_format($data['product_price'], 2) . '</span><span class="pr_add">Add to Cart</span></button>';
    $out .= '</div>';
    $out .= '</li>';
}
//Findind the category Name to display in the heading
$row = '';
$category_id = $_GET['id'];
$sql = "SELECT * FROM category WHERE category_id = {$category_id} LIMIT 1";
$category = mysql_query($sql);
while ($rows = mysql_fetch_array($category)) {
    $row = $rows['category_name'];
}
//Set the Meta Data
$page = new Page_Class();
$page->setPageTitle($row);
$page->setPageDescription('e-comerce site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setPropertyType('');
$page->setPropertyUrl('');
$page->setPropertySiteName('');
$page->setPropertyImage('');
$page->setCssLink(css());
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
?>


    <div class="section_container">
        <!--Mid Section Starts-->
Exemple #12
0
<?php

require_once 'storeScripts/store_functions.php';
$page = new Page_Class();
$page->setPageTitle('My Store');
$page->setPageDescription('Ecomerce Site');
$page->setPageKeywords('buy, sales, specials, etc');
$page->setCssLink(css());
$page->setJsLink(js());
$page->getPageHeader();
$page->setHeading('h1', 'Section 1');
?>

<p>fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text .</p>

<p>fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text .</p>

<p>fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text .</p>

<p>fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text .</p>

<p>fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text 
fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text fake text