<?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/>.
*
*/
?>
<div id="left">
<div id="login_form">
<?php
$user = Visitor::getInstance();
if(!$user->isUserLoggedIn())
{
?>
<form action="formparser/user.php?action=login" method="post">
Username <input type="text" name="username" style="width: 100px;"><br>
Parola <input type="password" name="password" style="width: 100px;"><br>
<input type="checkbox" name="remember_password" value="1" id="remember_password2"> <label for="remember_password2">Tine minte parola mea</label>
<input type="submit" value="Login" class="button">
</form>
<?php
}
elseif (!$user->isAdminLoggedIn())
{
$title = ($user->gender == "female") ? "Doamna" : "Domnule";
?>
<p id="welcome">
Bun venit, <br><a href="profile.php"><?php echo Escape::html($title . " " . $user->first_name . " " . $user->last_name); ?></a>
<br>
<a href="javascript:logout(); ">Logout</a>
<br>
<br>
<a href="orders_list.php" style="font-weight: bold; ">Comenzile mele</a>
</p>
<?php
}
else
{
?>
<p id="welcome">Bun venit, <br><a href="profile.php"><?php echo Escape::html($user->username); ?></a></p>
<?php
}
?>
</div>
<?php require_once(WEB_DIR . "/includes/shopping_cart_box.php"); ?>
<div id="search_box">
<form action="search.php" method="get">
<b style="display: block; ">Cautare produse</b>
<?php
$searchText = empty($_GET["keywords"]) ? "... by keywords" : $_GET["keywords"];
?>
<input type="text" name="keywords" value="<?php echo Escape::htmlValue($searchText); ?>" style="width: 130px; " onfocus="this.select(); ">
<input type="submit" value="Cauta!" class="button">
<a href="advanced_search.php?<?php echo Tools::http_build_query2($_GET); ?>">Click aici pentru cautare avansata</a>
</form>
</div>
<div class="categories">
<a href="index.php">Categorii</a>
<?php
$db = Application::getDb();
$c = Application::getCurrentCategory();
$breadCrumb = $db->tbCategory->getBreadcrumb($c->id);
displayTree($breadCrumb, -1, "category.php", true);
?>
</div>
</div>