<?php
/**
* Product: Katyshop
* @version 0.3.2.1
* @author Catalin Hulea - hide@address.com
* @copyright Copyright (C) 2007 Catalin Hulea
* @license GNU General Public License version 3
* You can find a copy of GNU GPL v3 at this path: /docs/LICENSE
* @link https://sourceforge.net/projects/katyshop
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once(dirname(__FILE__) . "/init.php");
?>
<html>
<head>
<title><?php echo APP_NAME; ?></title>
<?php require_once(WEB_DIR . "/includes/html_head.php"); ?>
</head>
<body>
<div id="container">
<?php require_once(WEB_DIR . "/includes/header.php"); ?>
<div id="middle">
<div id="left_vertical_line">
<?php require_once(WEB_DIR . "/includes/left.php"); ?>
<div id="content">
<h1>Detalii produs</h1>
<?php require_once(WEB_DIR . "/includes/print_messages.php"); ?>
<?php require_once(WEB_DIR . "/includes/breadcrumb.php"); ?>
<?php
$p = Application::getCurrentProduct();
if($p->id > 0 && $p->canBeDisplayed())
{
?>
<dl>
<dt class="title"><b><?php echo Escape::html($p->title); ?></b></dt>
<dd>
<table cellpadding="0" cellspacing="0" style="margin: 0px; width: 98%; ">
<tr>
<td>
<p class="content">
<?php
if(!empty($p->picture) && is_file(WEB_DIR . "/img/products/medium/{$p->picture}"))
{
?>
<a href="javascript:popupImage('popupimage.php?img_src=img/products/large/<?php echo Escape::htmlValue($p->picture); ?>'); "><img src="img/products/medium/<?php echo Escape::htmlValue($p->picture); ?>"></a><br>
<?php
}
?>
</p>
<ul class="actions">
<?php
if($p->id_manufacturer > 0)
{
?>
<li style="font-size: 12pt; color: #555555; font-weight: bold; ">Producator: <?php echo Escape::html($p->manufacturer); ?></li>
<?php
}
?>
<li style="font-size: 14pt; color: red; font-weight: bold; "><?php echo displayPrice($p->price); ?> <?php echo Escape::html(Application::getConfigValue("default_currency")); ?></li>
<?php
$user = Application::getUser();
if($user->isAdminLoggedIn())
{
?>
<li><a href="admin/product.php?action=edit&id_product=<?php echo Escape::htmlValue($p->id); ?>">Editati produsul</a></li>
<?php
}
?>
<li>
<form action="formparser/order.php?action=add_to_cart" method="post">
<input type="hidden" name="id_product" value="<?php echo Escape::htmlValue(@$p->id); ?>">
<input type="submit" value="Adaugati in cos" class="button">
</form>
</li>
</ul>
<br clear="all">
</td>
</tr>
</table>
<hr style="margin-bottom: 10px; ">
<h3 style="border:0px;">Description</h3>
<?php echo nl2br(Escape::html($p->content)); ?>
<hr style="margin-bottom: 10px; margin-top: 10px; ">
<h3 style="border:0px;">Technical details</h3>
<?php echo nl2br(Escape::html($p->technical_details)); ?>
</dd>
</dl>
<?php
}
?>
</div>
<?php require_once(WEB_DIR . "/includes/right.php"); ?>
<?php require_once(WEB_DIR . "/includes/footer.php"); ?>
</div>
</div>
</div>
</body>
</html>