示例#1
0
<?php 
include 'template/header.php';
include 'template/menu.php';
?>


<?php 
if (!empty($_GET['product'])) {
    $product_info = product_info($_GET['product']);
    $product_id = $_GET['product'];
    if (!empty($product_info)) {
        if (!empty($_POST['submit'])) {
            if (!empty($_FILES['product_image']['name'])) {
                $product_image_url = image_upload();
            } else {
                $product_image_url = $product_info['product_image_url'];
            }
            if (isset($product_image_url)) {
                $update_product = update_product($product_id, $_POST['product_name'], $product_image_url, $_POST['category_id'], $_POST['unit_price']);
                if ($update_product == 1) {
                    header('Location:product.php');
                } else {
                    $errormessage = "Something wrong. Please Try Again!!";
                }
            } else {
                $errormessage = "Product Image is invalid. Please Try Again!!";
            }
        }
        $all_category = all_category();
        //for select box
示例#2
0
 * $Id: quotation.php 17217 2011-01-19 06:29:08Z derek $
*/
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
$action = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'default';
if ($action == 'print_quotation') {
    $smarty->template_dir = DATA_DIR;
    $smarty->assign('shop_name', $_CFG['shop_title']);
    $smarty->assign('cfg', $_CFG);
    $where = get_quotation_where($_POST);
    $sql = "SELECT g.goods_id, g.goods_name, g.shop_price, g.goods_number, c.cat_name AS goods_category,p.product_id,p.product_number,p.goods_attr" . " FROM " . $ecs->table('goods') . " AS g LEFT JOIN " . $ecs->table('category') . " AS c ON g.cat_id = c.cat_id LEFT JOIN " . $ecs->table('products') . "as p  On g.goods_id=p.goods_id" . $where . " AND is_on_sale = 1 AND is_alone_sale = 1 ";
    $goods_list = $db->getAll($sql);
    foreach ($goods_list as $key => $val) {
        if (!empty($val['product_id'])) {
            $goods_list[$key]['goods_number'] = $val['product_number'];
            $product_info = product_info($val['goods_attr'], $val['goods_id']);
            $goods_list[$key]['members_price'] = $val['shop_price'];
            $goods_list[$key]['shop_price'] += $product_info['attr_price'];
            $goods_list[$key]['product_name'] = $product_info['attr_value'];
            $goods_list[$key]['attr_price'] = $product_info['attr_price'];
        } else {
            $goods_list[$key]['members_price'] = $val['shop_price'];
            $goods_list[$key]['product_name'] = '&nbsp;';
            $goods_list[$key]['product_price'] = 0;
        }
        $goods_list[$key]['goods_key'] = $key;
    }
    $user_rank = $db->getAll("SELECT * FROM " . $ecs->table('user_rank') . "WHERE show_price = 1 OR rank_id = '{$_SESSION['user_rank']}'");
    $rank_point = 0;
    if (!empty($_SESSION['user_id'])) {
        $rank_point = $db->getOne("SELECT rank_points FROM " . $ecs->table('users') . " WHERE user_id = '{$_SESSION['user_id']}'");
		<div id="wrapper">
			<header class="title-head">
				<h1 class="cim pull-left"><a rel="external" href="/netshop/index.php"><img src="/netshop/img/header.png" alt="Netshop" /></a></h1>

				<?php 
require_once '/template/bejelentkezes-menu.php';
?>
				<br class="clearfix" />

				<nav>
					<ul>
						<?php 
require_once '/php/categories.php';
require_once '/php/products.php';
category_menu();
$termek = product_info($_GET['pid']);
?>
					</ul>
				</nav>
			</header>
			<br class="clearfix" />

			<div id="core" class="product pull-left">
			<img src="<?php 
echo $termek['TERMEK_KEP'];
?>
" alt="<?php 
echo iconv("ISO-8859-1", "UTF-8", $termek['TERMEK_NEV']);
?>
" class="pp-img" />